Separable equation $y'=y+x$ I have this differential equation which I'm having a hard time to solve.
$y'=y+x$
I have to decide the linear function $y=ax+b$, which is the solution to the differential equation. Any help is grately appreciated.
 A: If you already know some linear function $\,y=ax+b\,$ must be the (a) solution, do what Ilya proposes: substitute.
$$y=ax+b\Longrightarrow a=y'=y+x=(a+1)x+b\Longrightarrow a= (a+1)x+b\Longleftrightarrow a=-1\, a= b= -1$$
comparing degrees in both sides, so your solution is $\,y=-x-1\,$
A: Introduce new function $u(x)=y(x)+x.$ Then $y(x)=u(x)-x$ and $y'(x)=u'(x)-1.$ Substitution into equation yields
$$u'(x)-1=u(x)$$ or
$$u'(x)=u(x)+1, \\
\dfrac{u'(x)}{u(x)+1}=1, \\
\dfrac{\dfrac{d}{dx}(u(x)+1)}{u(x)+1}=1, \\
\dfrac{d}{dx}(\ln(u(x)+1))=1.
$$
Now you can simply integrate it.
A: You can get the answer also as follows. Let $y'-y=x$ is our OE. this is a first linear ODE and can be solve by setting a proper integrating factor $\mu(x)=\text{e}^{\int p(x)dx}$ where $p(x)$ is the coefficient of $y$ when the coefficient of $y'$ be $1$. Now you have : $$\mu(x)=\exp(\int(-1)dx)=\exp(-x)$$ Multiply this to your OE: $$\exp(-x)y'-\exp(-x)y=x\exp(-x)$$ Or $$d\left(\exp(-x)y\right)=x\exp(-x)$$. Integrate from both sides of the last identity.
A: This is a linear DE of 1st order.
write dy/dx-y=x
IF = e^(integral -xdx) = e^(-x)
Multiply both sides of the DE with the IF to get:
d[(e^-x)(y)]/dx = xe^(-x)
Integrate both sides to get:
(e^-x)(y) = Integral xe^(-x)dx
Use ILATE to solve integral on right hand side by taking x as 1 st function and integrating by parts to get:
(e^-x)(y) = (e^-x)(-x) - (e^-x)
Cancel e^-x on both sides to get:
y = -x-1
Regards,
Prakash Mudholkar
A: generally   you can represent  you equation as 
$dy/dx-y(x)=x$
which is called first-order linear ordinary differential equation,because i  can't use Latex for formating math,there is link for solution of this  kind of problem
http://www.sosmath.com/diffeq/first/lineareq/lineareq.html
by the way  if  purpose is to find linear  form.then general form of linear form is
$y=a*x+b$
A: $ y'=y+x  $ $\implies$ $y'-y=x$ 
Multiplies both side by $e^{-x}$
$(y'-y)e^{-x}=xe^{-x}$
Note that $(y'-y)e^{-x}=(ye^{-x})'$
Therefore
$(ye^{-x})'=xe^{-x}$ $\implies$ $(ye^{-x})=\int xe^{-x}dx+C$ $\implies$$y(x)=e^{x}\int xe^{-x}dx+Ce^x $ 
Can you calculate $\int e^{-x}xdx$ 
