dy/dx+2y=sinx,
The answer is:1/5(2sinx+cosx)+cwith e to the power (-2x)
To solve the given differential equation, we can use the method of integrating factors.
Step 1: Write the differential equation in the standard form:
dy/dx + 2y = sinx
Step 2: Identify the coefficient of y, which is 2 in this case.
Step 3: Find the integrating factor (IF). The integrating factor is calculated as the exponential function of the integral of the coefficient of y. In this case, the integrating factor is exp(∫2 dx) = exp(2x).
Step 4: Multiply both sides of the equation by the integrating factor:
exp(2x) * (dy/dx) + 2y * exp(2x) = sinx * exp(2x)
Step 5: Rewrite the left side of the equation as the derivative of the product of y and the integrating factor:
d/dx (y * exp(2x)) = sinx * exp(2x)
Step 6: Integrate both sides of the equation with respect to x:
∫d/dx (y * exp(2x)) dx = ∫sinx * exp(2x) dx
y * exp(2x) = ∫sinx * exp(2x) dx
Step 7: Evaluate the integral on the right side.
To integrate sinx * exp(2x), we can use integration by parts. Let u = sinx and dv = exp(2x) dx. Then, du = cosx dx and v = (1/2) * exp(2x). Applying the integration by parts formula, we get:
∫sinx * exp(2x) dx = -cosx * (1/2) * exp(2x) - ∫(-cosx * (1/2) * exp(2x) dx)
= -cosx * (1/2) * exp(2x) + (1/2) * ∫cosx * exp(2x) dx
Now, we have another integral to solve:
∫cosx * exp(2x) dx
Again, we can use integration by parts. Let u = cosx and dv = exp(2x) dx. Then, du = -sinx dx and v = (1/2) * exp(2x). Applying the integration by parts formula, we get:
∫cosx * exp(2x) dx = sinx * (1/2) * exp(2x) - ∫(-sinx * (1/2) * exp(2x) dx)
= sinx * (1/2) * exp(2x) + (1/2) * ∫sinx * exp(2x) dx
Substituting this result back into the previous equation:
∫sinx * exp(2x) dx = -cosx * (1/2) * exp(2x) + (1/2) * (sinx * (1/2) * exp(2x) + (1/2) * ∫sinx * exp(2x) dx)
Rearranging terms, we have:
∫sinx * exp(2x) dx = (-1/2) * cosx * exp(2x) + (1/4) * sinx * exp(2x) + (1/4) * ∫sinx * exp(2x) dx
Now, we can solve for the integral:
(3/4) * ∫sinx * exp(2x) dx = (-1/2) * cosx * exp(2x) + (1/4) * sinx * exp(2x)
Multiplying both sides by (4/3):
∫sinx * exp(2x) dx = (-2/3) * cosx * exp(2x) + (1/3) * sinx * exp(2x)
Note that this result is the particular solution for the integral ∫sinx * exp(2x) dx.
Step 8: Substitute this solution back into the original equation:
y * exp(2x) = (-2/3) * cosx * exp(2x) + (1/3) * sinx * exp(2x)
Step 9: Divide both sides by exp(2x):
y = (-2/3) * cosx + (1/3) * sinx
Step 10: Simplify the expression:
y = (2/3) * sinx - (2/3) * cosx
Step 11: Add the constant of integration (C):
y = (2/3) * sinx - (2/3) * cosx + C
Step 12: Finally, to match the given answer, replace the constant of integration (C) with e^(-2x):
y = (2/3) * sinx - (2/3) * cosx + e^(-2x)
Therefore, the solution to the differential equation dy/dx + 2y = sinx is y = (2/3) * sinx - (2/3) * cosx + e^(-2x) + C, where C is the constant of integration.