Does this simple 2D dynamical system have a conserved quantity?
Follow up answer to @lhf's post
The equation
$$(y-y^3) \, \partial_x H - (x+y^2) \, \partial_y H = 0, $$ as proposed by @lhf, is a linear first-order PDE for $H$. The method of characteristics then states that
$$ \frac{\mathrm{d}x}{y-y^3} = \frac{\mathrm{d}y}{-x-y^2} = \frac{\mathrm{d}H}{0}, $$
where the last fraction indicates that $H = c_1$ is a constant along the characteristic curve defined by the first equals sign:
$$ \frac{\mathrm{d}y}{\mathrm{d}x} = -\frac{x+y^2}{y(1-y^2)}$$
which defines $y$ as a function of $x$. The solution to this (homogeneous?) equation is given by Mathematica as:
$$ \small{ \left(\sqrt{3}+3\right) \log \left[\left(\sqrt{3}-1\right) y^2-2 x-\sqrt{3}-1\right] -\left(\sqrt{3}-3\right) \log \left[\left(\sqrt{3}+1\right) y^2+2 x-\sqrt{3}+1\right]=c_2 } $$ where I have absorbed a factor into the constant of integration. Put now $c_1$ as a function of $c_2$ to have $H = f(c_2)$, where $ f $ is an arbitrary function of its argument. Take for instance $f(\square) = \square$ as the identity function and you will thus find:
$$ \small{ H = \left(\sqrt{3}+3\right) \log \left[\left(\sqrt{3}-1\right) y^2-2 x-\sqrt{3}-1\right] -\left(\sqrt{3}-3\right) \log \left[\left(\sqrt{3}+1\right) y^2+2 x-\sqrt{3}+1\right] }$$
which, if I didn't make any mistake on the transcription, satisfies the original PDE.
Hope you find this useful!
Check with Mathematica:
A conserved quantity $H(x,y)$ must be such that $H(x,y)$ is constant on the integral curves. This happens iff $H_x \dot x + H_y \dot y =0$. So you want to solve $$ \frac{\partial H}{\partial x}( y -y^3) + \frac{\partial H}{\partial y}( -x-y^2) = 0 $$ This suggests that you may try a polynomial for $H$, perhaps with an integrating factor.