1. **State the problem:** We need to 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} (e^x y) = -e^x \sin x$$
5. **Integrate both sides:**
$$e^x y = -\int e^x \sin x \, dx + C$$
6. **Evaluate the integral $$\int e^x \sin x \, dx$$:**
Use integration by parts or the known formula:
$$\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 = - \left( \frac{e^x}{2} (\sin x - \cos x) \right) + C = -\frac{e^x}{2} (\sin x - \cos x) + C$$
8. **Solve for $$y$$:**
$$y = e^{-x} \left( -\frac{e^x}{2} (\sin x - \cos x) + C \right) = -\frac{1}{2} (\sin x - \cos x) + C e^{-x}$$
**Final answer:**
$$y = -\frac{1}{2} (\sin x - \cos x) + C e^{-x}$$
Solve Differential 82E8B9
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.