Find the first integral of the following system:
$x_1' = x_2 $
$x_2' = \mu x_1-x_1^3 $ where the first integral is a function such that
$H'(x_1, x_2) = \frac{\partial H(x_1, x_2)}{\partial x1} f_1(x_1, x_2)+ \frac{\partial H(x_1, x_2)}{\partial x2}f_2(x_1, x_2)=0$
In the above example,
$f_1(x_1, x_2) = x_2$
$f_2(x_1, x_2) = \mu x_1-x_1^3 $
In case if it is hard to follow equations I attached the snapshots from the nonlinear book by Sastry.