Solution of the differential equation \(\displaystyle\frac{dy}{dx} = x + xy - (1+y)\) is:
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → \(|y+1| = Ce^{\frac{x^2}{2}-x}\)
The right-hand side factorises:
\(x + xy - (1+y) = x(1+y) - (1+y)\)
\( = (1+y)(x-1)\)
So the equation is variables separable:
\( \displaystyle \frac{dy}{y+1} = (x-1)\,dx \)
Integrating both sides:
\( \displaystyle \log|y+1| = \frac{x^2}{2} - x + c \)
\(|y+1| = e^{c}\,e^{\frac{x^2}{2}-x}\)
Writing C for the constant \(e^{c}\):
\(|y+1| = Ce^{\frac{x^2}{2}-x}\)