The general solution of the differential equation
\(x\,dy+e^{-y}dx=xe^{x-y}dx\) is (given C is constant of integration)
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → \(e^y-e^x+\log x=C\)
Since \(e^{x-y} = e^x e^{-y}\), the dx terms have the common factor \(e^{-y}\):
\(x\,dy = xe^xe^{-y}\,dx - e^{-y}\,dx\)
\(x\,dy = e^{-y}\left(xe^x - 1\right)dx\)
Multiplying by \(e^y\) and dividing by x separates the variables:
\( \displaystyle e^y\,dy = \left(e^x - \frac{1}{x}\right)dx \)
Integrating both sides:
\(e^y = e^x - \log x + C\)
\(e^y - e^x + \log x = C\)