Hopf criticality for an asymmetric Lienard center (source code)

= Hopf criticality for an asymmetric Lienard center
{c}
{title2=$\operatorname{sgn}l_1=\operatorname{sgn}(f_2+f_1g_2/\omega^2)$}

For $\ddot q=-\omega^2q+g_2q^2+g_3q^3+(\tau+f_1q+f_2q^2)\dot q+\cdots$, the <Hopf bifurcation> amplitude equation has cubic coefficient $(f_2+f_1g_2/\omega^2)/8$ in the leading position amplitude. The quadratic restoring term produces mean shift $g_2r^2/(2\omega^2)$ and second harmonic $-g_2r^2\cos(2\omega t)/(6\omega^2)$. Consequently $\langle q\dot q^2\rangle=g_2r^4/8$ and $\langle q^2\dot q^2\rangle=\omega^2r^4/8$, giving the coefficient by <energy> averaging. A negative value gives a supercritical stable <limit cycle>; a zero value requires higher-order analysis.