TITLE: Solve $xy(1+xy^2)\frac {dy}{dx}=1$
QUESTION [5 upvotes]: Solve $xy(1+xy^2)\frac {dy}{dx}=1$

Tried to solve it as an exact ODE, but it didnt work.

REPLY [5 votes]: Hint: First solve $\frac{dx}{dy} = xy(1+xy^2)$ for $x(y)$ instead. To solve this, let $v(y) = 1/x(y)$. Also, don't forget to pick up both branches of the solution by noting that if $y(x)$ is a solution, so too is $-y(x)$.
Update: Alright, here's how to do it: Let $v(y) = 1/x(y)$. Then 
$$
\frac{dx}{dy} = -\frac{1}{v(y)^{2}}\frac{dv}{dy}
$$
giving
\begin{align}
\frac{dv}{dy} +yv(y) + y^{3} = 0
\end{align}
which has solution $v(y) = 2 -y^2 + C\exp(-y^2/2)$.
Hence 
\begin{align}
x = \frac{1}{2-y^2 + C\exp(-y^2/2)} =: f(y)
\end{align}
and your solution is $y = \pm f^{-1}(x)$.