Step 1:

With the given information:

Let the curve be $F(x,y)$ and $\large\frac{dy}{dx}$ be the slope.

Hence the equation is $\large\frac{dy}{dx }$$ = x + y$

$\large\frac{dy}{dx}$$ - y = x$

Hence the equation is a first order linear equation, where $P = - 1$ and $Q = x$

$\int Pdx = \int-dx = - x$

Hence the $ I.F = e^{-x}$

Hence the required solution is $ye^{-x} =\int x. e^{-x} dx + C$

Step 2:

$ye^{-x} =\int x. e^{-x} dx + C$ can be done by parts.

Let $u = x$, hence $du = dx$ and $dv = e^{-x}dx ;v = -e^{-x}$

$\int ye^{-x} = x(-e^{-x}) - \int- e^{-x}dx$

$\qquad\;\;\;= -xe^{-x} +\int e^{-x}dx$

$\qquad\;\;\;= -(xe^{-x}) + (-e^{-x}) + C$

$\qquad\;\;\;= -e^{-x(x + 1)} + C$

Hence the required solution is $ye^{-x}=-e^{-x(x+1)}+C$

Step 3:

To evaluate $C$ let us substitute the given values of $x$ and $y$

It is given that the curve passes through the origin, hence $x = 0$ and $y = 0$

$0 = - e^{0(0+1)} + C$

$C = 1$

Hence the solution is $ye^{-x} = -e^{-x(x + 1)} + 1$

divide throughout by $e^{-x}$

$y=-(x+1)+\large\frac{1}{e^{-x}}$

$x+y+1=e^x$

This is the required solution.