Check solution to DE I was solving the following DE 
$$\frac{y+x}{x}=y'$$
and my solution was 
$$xdy = (y+x)dx$$
Letting $y=xv$ then $dy=xdv+vdx$ and so the above equation becomes
$$x^2dv + xvdx  =xvdx+xdx$$
From here I get 
$$x^2dv=xdx$$
Now here is where things get interesting.  I can write this as 
$$\int 1 dv = \int \frac{1}{x}dx$$
And get the solution $$y=x\ln(x)+cx$$
But when I took my exam, I didn't do this.... instead I did this:
$$\int x^2dv = \int x dx$$
Which gives
$$x^2v=\frac{1}{2}x^2+C$$
$$xy=\frac{1}{2}x^2+c$$
$$y=\frac{1}{2}x+\frac{c}{x}$$
How can I reconcile these apparently different solutions?
 A: Note that in the exam, you incorrectly wrote that 
$$ \int x^2\, dv = x^2 v $$
As $v$ depends on $x$, $x$ depends on $v$, so treating $x$ as a constant with respect ot $v$ is wrong. 
That the second 'solution' is wrong can also be seen by just checking, we have for $y(x) := \frac 12x + \frac{c}x$ that
$$ y'(x) = \frac 12 - \frac c{x^2} $$
and 
$$ \frac{y(x)+x}{x} = \frac{\frac 32x+\frac cx}x = \frac 32 + \frac c{x^2} \ne y'(x). $$
A: The mistake is in the second attempt of yours performed at school. It is when you go from this to this:

$$\int x^2dv = \int x dx \implies x^2v=\frac{1}{2}x^2+C$$

This is totally wrong.
Actually, $\int x^2dv = \int x dx \not \implies x^2v=\frac{1}{2}x^2+C$
You must remember $x$ is not a constant, but a function of $v$ related as $x=\frac{y}{v}$. So, that integration of $\int x^2dv$ to $x^2v$ is wrong.
The first procedure is the correct one.
A: You have stumbled on a subtle point which is usually not explained very well (or at all). Consider a first order differential equation given by $y'(x) = F(x,y)$. Written in "differential" notation, we have
$$ \frac{dy}{dx} = F(x,y). $$
Performing the regular "mindless" manipulations one does when solving ODEs, we can rewrite it as
$$ dy = F(x,y) dx. $$
If your second method would be legal, then we could have just integrated immediately both sides and get
$$ y = \int F(x,y) \, dx + C. $$
Does this mean we have managed to solve all first order equations and render the first few weeks of an ODE course irrelevant? Of course not. 

The question you should ask yourself is not why this method doesn't work but why the other method works. That is, why, when you have an equation of the form $y'(x) = \frac{g(x)}{f(y)}$ and you rewrite it as
$$ f(y) dy = g(x) dx $$
and integrate formally both sides, you actually get an implicit solution $F(y) = G(x) + C$ to the equation. If you formulate it as a theorem and prove it rigorously without introducing the differential bullshit, you'll see that it is actually a non-trivial result that depends on the implicit function theorem and the chain rule. I really recommend you to do this exercise and then return to the "wrong formula" 
$$ y = \int F(x,y) \, dx + C $$
and interpret it in a way so that it actually holds (then you'll see it is, unlike in the separable case, completely useless).
