Given:
Slope of the tangent to the curve at any point (x,y)
=Sum of coordinates of the point (x,y)
⇒dxdy=x+y
⇒dxdy−y=x
Linear Differential Equation
Comparing with
dxdy+Py=Q,
we have
P=−1,Q=x
Integrating Factor
∫Pdx=∫(−1)dx=−x
I.F.=e∫Pdx=e−x
General Solution
y(I.F.)=∫Q(I.F.)dx+c
⇒ye−x=∫xe−xdx+c
Applying Integration by Parts
Let
I=x,II=e−x
Using the product rule,
∫I⋅IIdx=I∫IIdx−∫(dxdI∫IIdx)dx
=x(−1e−x)−∫1(−1e−x)dx
=−xe−x+∫e−xdx
=−xe−x−e−x
Substituting Back
ye−x=−xe−x−e−x+c
Dividing every term by e−x,
y=−x−1+cex(i)
To Find c
Given: the curve passes through the origin (0,0).
Putting x=0 and y=0 in (i),
0=0−1+c
⇒c=1
Equation of the Required Curve
Putting c=1 in (i),
y=−x−1+ex
or
x+y+1=ex
which is the required equation of the curve.