I have got
y'+y = sin x.
How do I start this question?
Help please!.
THank you.
Really? It's not a second order linear DE, it's first order linear... The integrating factor is $\displaystyle \displaystyle \begin{align*} e^{\int{1\,dx}} = e^x \end{align*}$, so we have
$\displaystyle \displaystyle \begin{align*} \frac{dy}{dx} + y &= \sin{x} \\ e^{x}\,\frac{dy}{dx} + e^{x}\,y &= e^x\,\sin{x} \\ \frac{d}{dx}\left( e^x\, y \right) &= e^x\,\sin{x} \\ e^x\,y &= \int{ e^x\, \sin{x} \, dx} \\ y &= e^{-x} \int{ e^x \, \sin{x} \, dx} \end{align*}$
Now to solve that ugly integral, use integration by parts...
$\displaystyle \displaystyle \begin{align*} I &= \int{e^x \, \sin{x}\, dx} \\ I &= e^x\,\sin{x} - \int{ e^x \, \cos{x} \, dx } \\ I &= e^x\, \sin{x} - \left( e^x\,\cos{x} - \int{ -e^x\, \sin{x} \, dx } \right) \\ I &= e^x \, \sin{x} - e^x\, \cos{x} - \int{e^x\, \sin{x} \, dx} \\ I &= e^x\,\sin{x} - e^x\,\cos{x} - I \\ 2I &= e^x\,\sin{x} - e^x\,\cos{x} \\ I &= \frac{1}{2} \, e^x\left( \sin{x} - \cos{x} \right) \end{align*}$
So the solution to your DE is $\displaystyle \displaystyle \begin{align*} y = e^{-x} \left[ \frac{1}{2} \, e^x \left( \sin{x} - \cos{x} \right) \right] + C = \frac{1}{2} \left( \sin{x} - \cos{x} \right) + C \end{align*}$