June 2019 p32 q7
2337
The variables x and y satisfy the differential equation \(\frac{dy}{dx} = xe^{x+y}\), and it is given that \(y = 0\) when \(x = 0\).
- Solve the differential equation and obtain an expression for y in terms of x.
- Explain briefly why x can only take values less than 1.
Solution
(i) Separate variables: \(\frac{dy}{dx} = xe^{x+y}\) becomes \(e^{-y} dy = x e^x dx\).
Integrate both sides: \(\int e^{-y} dy = -e^{-y}\) and \(\int x e^x dx\) by parts gives \(x e^x - e^x\).
Combine: \(-e^{-y} = x e^x - e^x + C\).
Use initial condition \(y = 0\) when \(x = 0\): \(-1 = 0 - 1 + C\), so \(C = 0\).
Final solution: \(-e^{-y} = e^x(1-x)\), thus \(y = -\ln(e^x(1-x))\).
(ii) For \(y\) to be real, \(e^x(1-x) > 0\). Since \(e^x > 0\), it follows that \(1-x > 0\), so \(x < 1\).
Log in to record attempts.