TITLE: Periods of periodic solutions of the (Hamiltonian) system $\dot{x}=y$, $\dot{y}=-x-x^2$
QUESTION [5 upvotes]: I'm preparing for a scholarship examination (no solutions available) and in older tests I'm coming across problems like the following. 

Consider the (Hamiltonian) system
  $$\begin{cases}\dot{x}=y \\ \dot{y}=-x-x^2 \end{cases} $$
  (a) Find the initial conditions under which the motion is periodic and estimate the set of possible periods;
(b) Prove that there exist periodic orbits for which the average value of the position is not $0$ (if $x(t)$ is a periodic orbit of period $T$, the average value is defined as $T^{-1}\int_0^Tx(t)dt$).

The approach I've been taught in my undergraduate ODE course is to draw a phase portrait given by the level sets of the Hamiltonian, which gives me full information on the support of the solutions. For instance, I can find the region of the plane which encloses all periodic solutions. However, I've never been taught how to study the graphs of solutions, or how to obtain quantitative results on the periods of periodic solutions. Can anyone give me an idea on how this could be accomplished?
EDIT: Maybe an idea would be to study the linearized system about the critical point $(0,0)$, which is
$$\begin{cases}\dot{x}=y \\ \dot{y}=-x\end{cases} $$
in this case, the solutions can be explicitly calculated from $x(t)=a\cos t+b\sin t$, $a,b\in \mathbb{R}$, so their period is $2\pi$. Intuitively, I would say that the nonlinear system would also have periods $2\pi$ near the origin, but this still doesn't give me any estimate on the periods on the whole region.

REPLY [7 votes]: You might already know that $H(x,y)=x^2+y^2+\frac23x^3$ is an invariant of the dynamics. For every $h$, let $S_h$ denote the set of equation $H(x,y)=h$.

If $h<0$ or $h>\frac13$, $S_h$ is a connected simple unbounded curve. 
If $0\leqslant h<\frac13$, $S_h$ is the disjoint union of a connected simple unbounded curve, included in the halfplane $x<-1$, and a connected simple bounded curve, around $(0,0)$.
Finally, $S_{1/3}$ is a connected unbounded curve with a double point at $(-1,0)$.


Thus, the periodic solutions correspond exactly to the bounded components $C_h$ of every $S_h$ with $0<h<\frac13$. The part included in $x\geqslant-1$ of $S_{1/3}$ is a loop, which encloses exactly every periodic solution and  the bounded component of $S_0$, which is the fixed point $(0,0)$.
Let $W(x)=H(x,0)=x^2+\frac23x^3$. For every fixed $0<h<\frac13$, on $C_h\cap\{y>0\}$, $$dt=\frac{dx}{\sqrt{h-W(x)}}$$ hence the period is $$T=2\int_u^v\frac{d\xi}{\sqrt{h-W(\xi)}}$$ where $-1\leqslant u<0<v\leqslant\frac12$ are the intersections of $C_h$ with the axis $y=0$, that is, the roots in $[-1,\frac12]$ of the equation $W(x)=h$.
The polynomial $W(x)=x^2+\frac23x^3$:

When $h\to\frac13$, $C_h$ passes near the fixed point $(-1,0)$ hence $T\to+\infty$. When $h\to0$, $C_h$ becomes the fixed point $(0,0)$ hence, approximating $h-W(x)$ by $h-x^2$, one gets that $T\to2\pi$. By continuity, every number in $(2\pi,+\infty)$ is a period.
Finally, the average value of the abscissa is $$\bar x=\frac1{T}\int_0^Tx(t)dt$$ hence, for every $0<h<\frac13$, $$\bar x=\frac1{T}\int_0^T(-y'(t)-x^2(t))dt=-\frac1{T}\int_0^Tx^2(t)dt<0$$