Is the differential equation $y'=x+y$ separable? I'm at a loss. My guess is no, but I'm new to doing these problems. It can not be solved with cross multiplication but there are other ways of solving these problems I'm sure. Thank you for any help.
 A: It is not separable.  A separable differential equation has the form $dy/dx = f(x)g(y)$.  But if $x+y = f(x)g(y)$ for all $x$ and $y$ then we would have
\begin{align*}
(x+x)(y+y) &= f(x)g(x)f(y)g(y)\\
&= f(x)g(y)f(y)g(x) =(x+y)(y+x)
\end{align*}
for all $x$ and $y$, which you can see is false by taking $x=0$ and $y=1$, for example.
A: No. There is no way to manipulate this ODE so that the method of separation of variables can be used. This is a first-order linear differential equation since it has the form ${dy\over dx}+P(x)y=Q(x)$. We must use an integrating factor $I(x)=e^{\int P(x)dx}$ in order to solve this ODE. $${dy\over dx}-y=x$$
Let $I(x)=e^{-x}$. We now multiply both sides of the above equation by $e^{-x}$ and obtain $$e^{-x}{dy\over dx}-e^{-x}y=e^{-x}x$$ which becomes $${d\over dx}(e^{-x}y)=e^{-x}x.$$ Now we must integrate both sides with respect to x. $$(e^{-x}y)=\int e^{-x}x dx.$$ Using integration by parts on the right-hand side integral we obtain $$(e^{-x}y)=-e^{-x}x-e^{-x}+C$$ where $C$ is a constant. So multiplying both sides of the equation by $e^x$ we obtain $$y=-x-1+Ce^{x}.$$ Thus this is the desired solution of the ODE $${dy\over dx}-y=x.$$
A: This is a linear first order ordinary differential equation.  It's integrating factor time.
A: A differential equation is separable when you can write it as $y'=f(x)g(y)$, where $f(x)$ is only a function of $x$ and $g(y)$ is only a function of $y$.  That isn't the case, here.
However, we know how to solve more than just separable differential equations.  This is an example of a linear first-order differential equation, which we often solve with integrating factors.  If you multiply your differential equation by an integrating factor, which, in this case, is $e^{-y}$, and use the product rule, then you have
$$
\left(e^{-y}y\right)'=-e^{-y}y+e^{-y}y'=e^{-y}x,
$$
which you can integrate to find the solution to your differential equation.  There is a general procedure to find integrating factors for general linear first-order differential equations of the form $y'+p(x)y=q(x)$.
A: $\large\tt Hint:$
$$
{{\rm d}\left({\rm e}^{-x}\,y\right) \over {\rm d}x}
=
x{\rm e}^{-x}
$$
A: I know this question has been answered for more than 8 years now, but I thought I'd throw in some interesting observations that a student of mine made about this problem the other day (shout out to Danny F.)

While I agree that $y' = x + y$ isn't a separable differential equation as stated -- since $y'$ is not the product of the form $f(x)g(y)$ -- I have to strongly disagree with @1233dfv when they say:

No. There is no way to manipulate this ODE so that the method of separation of variables can be used.

On the contrary. We can in fact turn this into a separable EQ through a clever use of substitution: $u(x) := x + y = x + y(x)$. This means
\begin{align*}
u'(x) &= 1 + y'\\
&= 1 + (x+y)\\
&= 1 + u
\end{align*}
which means that the original equation is now transformed into
\begin{align*}
\int \frac{1}{1+u} \,du &= \int \,dx \\
\log|1+u| &= x + C \\
u &= Ae^{x} - 1 \\
y + x &= Ae^{x} - 1\\
y &= Ae^{x} - x - 1
\end{align*}
which is easily verified as the correct solution to the original differential equation. In fact, this same trick would easily give solutions to the more general equation: $y' = ax + by$.
