Method for solving differential equation I am looking for help with what method to solve this ordinary differential equation with,
$$\frac {dy}{dx}=x+y $$ 
I know it's not separation of variables since it's not in the form of
$$\frac {dy}{dx}=f (y)g (x) $$
 A: Let us first try a polynomial solution. As the RHS has a first order term ($x$), a linear solution of the form $y_1=ax+b$ might do. We have
$$(ax+b)'=a=x+(ax+b),$$
which is fulfilled with $a=b=-1$, hence $y_1=-x-1$.
Now if we subtract memberwise
$$y'=x+y$$ and
$$y'_1=x+y_1$$ we eliminate $x$ and get
$$(y-y_1)'=y-y_1$$ or $$y'_2=y_2$$ which is separable.
Now
$$\frac{y'_2}{y_2}=1,\\\log y_2=x+c,\\y_2=ce^x$$ and
$$y=y_1+y_2=-x-1+ce^x.$$
A: If you write 
$$y'-y = x$$
and multiply by $e^{-x}$, you get
$$e^{-x}y'-e^{-x}y = e^{-x}x.$$
The left side is the product rule for $e^{-x}y$, so we have
$$\left(e^{-x}y\right)' =  e^{-x}x .$$
Integrate both sides and then multiply through by $e^x.$
A: Hint: The differential equation is a linear differential equation with constant coefficients.
First, solve: $$\dfrac{dy_h}{dx}=y_h$$ and then determine the particular solution by the ansatz $y_p=ax+b$ or use variation of paramters ansatz $y_p(x)=c(x)y_h(x)$ and determine $c(x)$. The general solution is given by
$$y = y_h+y_p.$$
