The general solution of differential equation $\frac{dy}{dx}-xy =e^{\frac{x^2}{2}}$ is :
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → $y=(x+c)e^{\frac{x^2}{2}}$, Where C is a constant.
$\frac{dy}{dx}-xy =e^{\frac{x^2}{2}}$
$I.F.=e^{\int -xdx}=e^{-\frac{x^2}{2}}$
so multiplying eq. by I.F. and integrating wrt x
$\int e^{-\frac{x^2}{2}}\frac{dy}{dx}-e^{-\frac{x^2}{2}}xydx=\int e^{\frac{x^2}{2}-\frac{x^2}{2}}dx$
$=ye^{-\frac{x^2}{2}}=(x+c)$
$y=(x+c)e^{\frac{x^2}{2}}$