The general solution of differential equation \(\displaystyle\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.
The equation is linear, of the form \(\frac{dy}{dx} + Py = Q\) with
\(P = -x,\quad Q = e^{x^2/2}\)
The integrating factor is
\( \displaystyle \text{I.F.} = e^{\int -x\,dx} = e^{-x^2/2} \)
The solution is \(y \times \text{I.F.} = \int Q \times \text{I.F.}\,dx + c\):
\( \displaystyle y\,e^{-x^2/2} = \int e^{x^2/2}\,e^{-x^2/2}\,dx \)
\( \displaystyle = \int 1\,dx \)
\(= x + c\)
Multiplying by \(e^{x^2/2}\):
\(y = (x + c)\,e^{x^2/2}\)