The solution of the differential equation \(\displaystyle\frac{dy}{dx}=1+x+y+xy\), where C is an arbitrary constant, is:
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → \(\log(1+y)=x+\displaystyle\frac{x^2}{2}+C\)
The right side factorises:
\(1 + x + y + xy = (1 + x) + y(1 + x) = (1 + x)(1 + y)\)
So the variables separate:
\( \displaystyle \frac{dy}{1+y} = (1 + x)\,dx \)
Integrating both sides:
\( \displaystyle \log|1+y| = x + \frac{x^2}{2} + C \)
Why the other options are incorrect
Option (1) \(\log(1+y)=x-\displaystyle\frac{x^2}{2}+C\) — Incorrect. \(\int x\,dx = +\frac{x^2}{2}\); the sign of the \(x^2\) term is wrong.
Option (2) \(\log(1-y)=x+\displaystyle\frac{x^2}{2}+C\) — Incorrect. The factor is 1 + y, not 1 − y; also \(\int\frac{dy}{1-y} = -\log|1-y|\).
Option (4) \(\log(1+y)=-x-\displaystyle\frac{x^2}{2}+C\) — Incorrect. Differentiating gives \(\frac{y'}{1+y} = -(1+x)\), so \(y' = -(1+x)(1+y)\), the wrong sign.