<s>[INST] $ydx - (4x^2y + x)dy = 0$, where is my mistake? $ydx - (4x^2y + x)dy = 0$
I found two ways to solve this equation and they give two different answers, but I couldnt find where I did mistake.
Solution 1:
Write $x$ as a function of $y$
$y\frac{dx}{dy} - (4x^2y + x) = 0$
$x' - \frac{x}{y} - 4x^2 = 0$
It is a Bernoulli equation, so divide by $x^2$ and make substitution
$z' - \frac{z}{y} = 4$
Solve first $z' - \frac{z}{y} = 0$
We get $z = yC(y)$, $z' = C(y) + C'(y)y$
Plugging back to the equation:
$C(y) + C'(y)y - C(y) = 4$
$C(y) = 4ln(y) + C$
Finally $z = y(4ln(y)+C) = \frac{1}{x}$
Solution 2
$ydx - (4x^2y + x)dy = 0$
$ydx - xdy = 4x^2ydy$
Dividing by $-x^2$ both sides we get:
$d\frac{y}{x} + d2y^2 = 0$
Integrating we get:
$\frac{y}{x} + 2y^2 = C$
So I got two solutions:
$y(4ln(y)+C) = \frac{1}{x}$ and $\frac{y}{x} + 2y^2 = C$.
My question is where did I do a mistake?
 [/INST] You made a sign mistake here since $z=\frac 1x \implies z'=-\frac {x'}{x^2}$
$$z' - \frac{z}{y} = 4$$
It should be
$$z' + \frac{z}{y} =- 4 \implies  z' =- \frac{z}{y} \implies z=\frac {C(y)}{y}$$
$$\implies C(y)=-2y^2+K$$

For the first one. The Bernouilli equation gives the same answer:
$$yx'-4x^2y-x=0$$
$$x'-\frac x y=4{x^2}$$
$$\frac {x'}{x^2}-\frac 1 {xy}=4$$
$$y(-\frac {1}{x})'-\frac 1 {x}=4y$$
$$\left (-\frac {y}{x} \right )'=4y$$
Integration gives:
$$-\frac {y}{x}=2y^2+K$$
</s>