Find the general solution for the differential equation $\frac{\text{dy}}{\text{dx}}\text{+2y=sinx}$.
Show solutionHide solution
Ans: The given differential equation is:
$\frac{dy}{dx}+2y=\sin x$
It is a linear differential equation of the form $\frac{\text{dy}}{\text{dx}}\text{+py=Q}$, with:
$p=2$
$Q=\sin x$
Calculate the integrating factor:
$I.F={{e}^{\int pdx}}$
$\Rightarrow I.F={{e}^{\int 2dx}}$
$\Rightarrow I.F={{e}^{2x}}$
General solution is of the form:
$y\left( I.F \right)=\int \left( Q\times I.F \right)dx+C$
$y{{e}^{2x}}=\int \sin x\left( {{e}^{2x}} \right)dx+C$
\[\Rightarrow y{{e}^{2x}}=I+C\,\,\,\left( I=\int \sin x\left( {{e}^{2x}} \right)dx \right)\] ……(1)
\[I=\int \sin x\left( {{e}^{2x}} \right)dx\]
$\Rightarrow I=\left( \sin x \right)\int {{e}^{2x}}dx-\int \left( \left( \sin x \right)'\int {{e}^{2x}}dx \right)dx$
$\Rightarrow I=\frac{{{e}^{2x}}}{2}\sin x-\int \left( \cos x\left( \frac{{{e}^{2x}}}{2} \right) \right)dx$
$\Rightarrow I=\frac{{{e}^{2x}}}{2}\sin x-\frac{1}{2}\left[ \cos x\int {{e}^{2x}}dx-\int \left( \left( \cos x \right)'\left( \int {{e}^{2x}}dx \right) \right)dx \right]$
$\Rightarrow I=\frac{{{e}^{2x}}}{2}\sin x-\frac{1}{2}\left[ \frac{{{e}^{2x}}}{2}\cos x+\frac{1}{2}\int {{e}^{2x}}\left( \sin x \right)dx \right]$
$\Rightarrow I=\frac{{{e}^{2x}}}{2}\sin x-\frac{1}{2}\left[ \frac{{{e}^{2x}}}{2}\cos x+\frac{1}{2}I \right]$
$\Rightarrow I=\frac{{{e}^{2x}}}{2}\sin x-\frac{{{e}^{2x}}}{4}\cos x-\frac{1}{4}I$
$\Rightarrow \frac{5}{4}I=\frac{{{e}^{2x}}}{2}\sin x-\frac{{{e}^{2x}}}{4}\cos x$
\[\Rightarrow I=\frac{2{{e}^{2x}}}{5}\sin x-\frac{{{e}^{2x}}}{5}\cos x\]
\[\Rightarrow I=\frac{{{e}^{2x}}}{5}\left[ 2\sin x-\cos x \right]\]
Back substituting $\text{I}$ in expression (1):
\[\Rightarrow y{{e}^{2x}}=\frac{{{e}^{2x}}}{5}\left[ 2\sin x-\cos x \right]+C\,\]
\[\Rightarrow y=\frac{1}{5}\left( 2\sin x-\cos x \right)+C{{e}^{-2x}}\]
The general solution for given differential equation is \[\text{y=}\frac{\text{1}}{\text{5}}\left( \text{2sinx-cosx} \right)\text{+C}{{\text{e}}^{\text{-2x}}}\].