Solution of differential equation \( \displaystyle\frac{dy}{dx}=e^{x+y}-x\,e^{y} \) is
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → \( e^x+e^{-y}-\displaystyle\frac{x^2}{2}=C \) , where C is an arbitrary constant
Taking \( e^y \) common separates the variables:
\( \displaystyle \frac{dy}{dx}=e^y(e^x-x) \)
\( \displaystyle e^{-y}\,dy=(e^x-x)\,dx \)
Integrating both sides:
\( \displaystyle -e^{-y}=e^x-\frac{x^2}{2}+k \)
\( \displaystyle e^x+e^{-y}-\frac{x^2}{2}=-k=C \)
Why the other options are incorrect
Option (1) \( e^x+e^y-\displaystyle\frac{x^2}{2}=C \) , where C is an arbitrary constant — Incorrect. The y-term should be \( e^{-y} \), not \( e^{y} \).
Option (3) \( e^x+e^y+\displaystyle\frac{x^2}{2}=C \) , where C is an arbitrary constant — Incorrect. The y-term should be \( e^{-y} \), and \( \frac{x^2}{2} \) should be subtracted.
Option (4) \( e^x-e^{-y}-\displaystyle\frac{x^2}{2}=C \) , where C is an arbitrary constant — Incorrect. This takes \( \int e^{-y}\,dy \) as \( e^{-y} \); it is \( -e^{-y} \), which gives \( +e^{-y} \) on the left.