Help with this differential equation $(3x^2y+2xy+y^3)dx + (x^2+y^2)dy = 0$ We have:
$(3x^2y+2xy+y^3)dx + (x^2+y^2)dy = 0$
Say
$M(x, y) = 3x^2y+2xy+y^3$
and
$N(x, y) = x^2+y^2$
We want $M_y = N_x$, but they are not. So we suppose there is a $π(x, y)$ so that
$π(x, y)M(x, y)dx + π(x, y)N(x, y)dy = 0$.
The method I know is that $π(x, y) = μ(φ(x, y))$ with $φ(x, y)$ given, but in this equation there is no such function given.
How can I work this out?
Suppose $(\pi M)_y  = (\pi N)_x$, i.e.
$$
\pi_yM + \pi M_y = \pi N_x + \pi_x N
$$
If we make the simplifying assumption that $\pi_y = 0$ (i.e. $\pi$ is only a function of $x$), we get
$$
\frac{M_y-N_x}{N} = \frac{\pi_x}{\pi}
$$
from which we get
$\pi(x) = e^{3x}$.
Given a differential equation of the form $Mdx+Ndy=0$ if we had $M_y=N_x$ then the equation is called exact and exact equations are easy to solve as one would try to find a function $f$ such that $\frac{\partial f}{\partial x}=M$ and $\frac{\partial f}{\partial y}=N$ (so that  $Mdx+Ndy=0$ becomes same as $\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}$).
Now if $Mdx+Ndy=0$ isn't exact we'd like to multiply a factor $\pi(x,y)$ with it so that it becomes exact ( this $\pi$ is called the integrating factor ).
If such a $\pi$ exists then we must have that $\frac{\partial (\pi M)}{\partial y} =\frac{\partial (\pi N)}{\partial x}$ . If you assume that $\pi$ is a function of x alone or a function of y alone and try to solve in terms of $M$ and $N$  (in one of the two cases you'd be able to do that) and multiply the $\pi$ hence found with the given equation it'd become exact and hence you'd be able to solve it easily.