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 \)