Solving the Differential Equation: (1+x)dy/dx - xy = x + x^2
This article will guide you through the process of solving the first-order linear differential equation:
(1 + x) dy/dx - xy = x + x^2
1. Identifying the Form
The given differential equation is in the form of a linear first-order differential equation:
dy/dx + P(x)y = Q(x)
where:
- P(x) = -x / (1 + x)
- Q(x) = (x + x^2) / (1 + x)
2. Finding the Integrating Factor
The integrating factor (IF) is calculated as:
IF = exp(∫P(x)dx)
Let's find the IF for our equation:
IF = exp(∫(-x / (1 + x))dx)
Using integration by substitution (u = 1 + x), we get:
IF = exp(-∫(u - 1) / u du)
IF = exp(-(u - ln|u|))
IF = exp(-(1 + x) + ln|1 + x|)
IF = (1 + x) * exp(-(1 + x))
3. Multiplying the Equation by the Integrating Factor
Multiply both sides of the original equation by the integrating factor:
(1 + x) * exp(-(1 + x)) * (dy/dx) - x * (1 + x) * exp(-(1 + x)) * y = (x + x^2) * exp(-(1 + x))
4. Simplifying and Integrating
Notice that the left side of the equation is the derivative of a product:
d/dx [y * (1 + x) * exp(-(1 + x))] = (x + x^2) * exp(-(1 + x))
Integrate both sides with respect to x:
y * (1 + x) * exp(-(1 + x)) = ∫(x + x^2) * exp(-(1 + x)) dx + C
To solve the integral on the right side, you can use integration by parts twice. After solving the integral, you'll get:
y * (1 + x) * exp(-(1 + x)) = -x * exp(-(1 + x)) + C
5. Solving for y
Finally, solve for y to obtain the general solution:
y = (-x + C * exp(1 + x)) / (1 + x)
Conclusion
The solution to the differential equation (1 + x) dy/dx - xy = x + x^2 is:
y = (-x + C * exp(1 + x)) / (1 + x)
This general solution incorporates an arbitrary constant 'C', reflecting the infinite solutions possible for the given differential equation. You can obtain a specific solution by using initial conditions to determine the value of 'C'.