If \(y = y(x)\) is the solution of the differential equation \(\displaystyle\frac{dy}{dx} = 1 + x + y + xy\) satisfying \(y(0) = 0\), then \(y(2)\) is equal to
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → \(e^{4} - 1\)
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 \)
Using \(y(0) = 0\): \(\log 1 = 0 + C\), so \(C = 0\). Near x = 0, 1 + y is positive, so
\( \displaystyle 1 + y = e^{x + \frac{x^2}{2}} \)
At x = 2 the power is \(2 + 2 = 4\):
\( 1 + y(2) = e^{4} \)
\( y(2) = e^{4} - 1 \)
Why the other options are incorrect
Option (1) \(e^{2} - 1\) — Incorrect. This integrates only the x part of \(1 + x\), giving the power \(\frac{x^2}{2} = 2\).
Option (2) \(e^{4}\) — Incorrect. This is the value of \(1 + y(2)\), not of \(y(2)\).
Option (3) \(e^{6} - 1\) — Incorrect. This takes \(\int x\,dx = x^2\), missing the factor \(\frac{1}{2}\), so the power becomes \(2 + 4 = 6\).