Subjects differential equations

Linear Ode Aab362

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **State the problem:** Solve the differential equation $$\frac{dy}{dx} = -y - \sin x$$. 2. **Identify the type of equation:** This is a first-order linear ordinary differential equation of the form $$\frac{dy}{dx} + y = -\sin x$$. 3. **Use the integrating factor method:** The integrating factor (IF) is given by $$\mu(x) = e^{\int 1 \, dx} = e^x$$. 4. **Multiply both sides by the integrating factor:** $$e^x \frac{dy}{dx} + e^x y = -e^x \sin x$$ This simplifies to: $$\frac{d}{dx} \left(e^x y\right) = -e^x \sin x$$. 5. **Integrate both sides:** $$e^x y = -\int e^x \sin x \, dx + C$$ 6. **Evaluate the integral:** Use integration by parts or the standard formula for $$\int e^{ax} \sin(bx) \, dx$$. Recall: $$\int e^{ax} \sin(bx) \, dx = \frac{e^{ax}}{a^2 + b^2} (a \sin bx - b \cos bx) + C$$ Here, $$a=1$$ and $$b=1$$, so: $$\int e^x \sin x \, dx = \frac{e^x}{1^2 + 1^2} (1 \cdot \sin x - 1 \cdot \cos x) + C = \frac{e^x}{2} (\sin x - \cos x) + C$$ 7. **Substitute back:** $$e^x y = - \frac{e^x}{2} (\sin x - \cos x) + C$$ 8. **Solve for $$y$$:** $$y = -\frac{1}{2} (\sin x - \cos x) + C e^{-x} = \frac{\cos x - \sin x}{2} + C e^{-x}$$ **Final answer:** $$y = \frac{\cos x - \sin x}{2} + C e^{-x}$$