The given differential equation is
(x+y)dxdy=1
⇒dx=(x+y)dy
⇒dydx=x+y
⇒dydx−x=y
This is the standard form of a linear differential equation.
Comparing with
dydx+Px=Q,
we have
P=−1,Q=y
Integrating Factor
∫Pdy=∫(−1)dy=−∫1dy=−y
I.F.=e∫Pdy=e−y
General Solution
x(I.F.)=∫Q(I.F.)dy+c
⇒xe−y=∫ye−ydy+c
Applying Integration by Parts
Let
I=y,II=e−y
Using the product rule,
∫I⋅IIdy=I∫IIdy−∫(dydI∫IIdy)dy
=y(−1e−y)−∫1(−1e−y)dy
=−ye−y+∫e−ydy
=−ye−y−e−y
Substituting Back
xe−y=−ye−y−e−y+c
Dividing every term by e−y,
x=−y−1+e−yc
or
x+y+1=cey
x+y+1=cey
which is the required general solution.