Show that the action variable is $J = \sqrt{A^2 + 2E} - A$ I have the hamiltonian:
$$H = \frac{1}{2}p^2 + \frac{1}{2}A^2 \tan^2(q)$$
And I would like to show that the action variable is $J = \sqrt{A^2 + 2E} - A$, where $E$ is the energy.
I'm having a little trouble and would greatly appreciate some help. Here is what I have tried:
First parametrizing $p$ and $q$, I set $q = 0 \implies p = \sqrt{2E}$, so I parametrise this as: $ p = \sqrt{2E}\cos\theta$ 
Setting $p = 0$ and rearranging, I get $\cos q = \frac{A}{\sqrt{A^2 + 2E}}$, which I parametrize as $\cos q = \frac{A}{\sqrt{A^2 + 2E}}\sin\theta$
so $q = \cos^{-1} [\frac{A}{\sqrt{A^2 + 2E}}\sin\theta]$
Now, $$dq = - \frac{1}{ \sqrt{1- \frac{A^2}{A^2 +2E}\sin^2 \theta } } \cdot \frac{A}{\sqrt{A^2 + 2E}}\cos\theta d\theta$$
Now here I get a little lost. I know I need to rescale this, since I need $$ -1 < \frac{A}{\sqrt{A^2 + 2E}}\sin\theta < 1 $$ which gets quite messy so I am not sure if I am going in the right direction.
Any help would be greatly appreciated.
EDIT:
I have just realised that \frac{A}{\sqrt{A^2 + 2E}}\sin\theta should always be between -1 and 1. Assuming this, I have gotten to:
$$J = - \frac{A\sqrt{2E}}{2\pi} \int_0^{2\pi} \frac{\cos^2 \theta}{ \sqrt{2E+A^2 \cos^2 \theta} } d\theta$$
How can I explicitly evaluate this integral?
 A: Rather than immediately reparametrizing, it will be clarifying to work in the initial $(q,p)$ coordinates. We recall that, up to a possible normalizing factor, the classical action of a closed orbit is the area enclosed in phase space i.e. $\oint p(q)\,dq$. To confirm that $J(E)=\sqrt{2E+A^2}-A$ is consistent with this, we note that as $E\to\infty$ we have $J(E)\sim\sqrt{2E}$. On the other hand, the orbits in phase space are asymptotic to rectangles of the form $[-\frac\pi2,\frac\pi2]\times[-\sqrt{2E},\sqrt{2E}]$ and thus have area tending to $2\pi \sqrt{2E}$. So the definition of action in this problem is $\displaystyle J(E)=\dfrac{1}{2\pi}\oint p(q)\,dq$.
With this in mind, we can use the statement of energy conservation as $E=\frac{1}{2}p^2+\frac12 A^2\tan^2q$ to write the integral of interest as
$$J=\frac{2}{\pi}\int_0^{\tan^{-1}(\sqrt{2E}/A)}\sqrt{2E-A^2\tan^2q}\,dq\overset{?}{=}\sqrt{2E+A^2}-A$$ where we have used the four-fold symmetry of the phase space orbits to limit ourselves to the first quadrant in $(q,p)$. There are a number of ways to verify this identity (the residue theorem in complex analysis being the most efficient). For the time being, I will leave this as an exercise.
