Action-angle variables for anharmonic oscillator I have an equation of potential given:
$$U = U_0\tan^2( \alpha(t)q)$$
I need to find a motion rules for that potential in terms of action-angle variables. Using the fact that Hamiltonian is equal to energy of the system I write:
$$p = \pm \sqrt{2m(E-U_0\tan^2( \alpha(t)q)}$$
By definition the action variable is defined as
$$ I = \frac {1} {2\pi} \oint_{\gamma(E)}pdq \, ,$$
so I receive the following
$$I=\frac {1} {2\pi} \oint_{\gamma(E)}\pm \sqrt{2m(E-U_0\tan^2( \alpha(t)q)} \, dq \, .$$
This integral is not easy to take so did I maybe missed somewhere? Also I'm not sure about integral limits: should that be
$$q_1=\frac {1} {a(t)} \arctan(\sqrt{\frac EU_0}); q_2=0$$
or
$$q_1=\frac {1} {a(t)} \arctan(\sqrt{\frac EU_0}); q_2=\frac {1} {a(t)} \arctan(\sqrt{\frac EU_0}) + \pi$$
because period of $\tan^2(a(t)q)$ is $\pi$
or even
$$q_1=\frac {1} {a(t)} \arctan(\sqrt{\frac EU_0}); q_2=-\frac {1} {a(t)} \arctan(\sqrt{\frac EU_0})$$
because on phase space q is actually different only by a sign (+ or -)?
I've attached images of my solutions on paper:
PICTURE1
PICTURE2
 A: Let me remark first, that a general form time-dependent hamiltonain with one degree of freedom 
$$H(p, \, q , \,t )$$ 
is unlikely to be integrable and can have a rather complicated dynamics. The time dependence of $\alpha(t)$ makes the given hamiltonain time-dependent.    
Usually, when transforming hamiltonain systems, one applies generating functions. In this case, we have a time-dependent potential, which means that the hamiltonain 
$$H(p,\,q,\,t) = \frac{p^2}{2m} \, + \, U_0\,\tan^2\Big(\alpha(t)\, q\Big)$$
so we would look for time dependent  generating function that moves from original $(p, \, q, \, t)$ coordinates to action-angle coordinates on each spacial slice $\{(p, q) \, \in \, \mathbb{R}^2\} \times\{t\}$. However, the computations for this particular example seem to be fairly heavy.
Step 1: Solve the indefinite integral
$$G(k,\, x) = \int_{0}^{x} \, \sqrt{k - \tan^2(w)}\, dw$$
Step 2: Form the function
\begin{align} 
F\big(E, \,q,\, t\big)  &= \sqrt{2mU_0}\int_{0}^{q} \, \sqrt{\frac{E}{U_0} - \tan^2\Big(\alpha(t)\,u\Big)}\, du \\
&= \frac{\sqrt{2mU_0}}{\alpha(t)}\int_{0}^{\alpha(t)q} \,\sqrt{\frac{E}{U_0} - \tan^2\big(w\big)}\, dw \\ 
&= \frac{\sqrt{2mU_0}}{\alpha(t)}\,\, G\left(\frac{E}{U_0}, \, \alpha(t)q\right)
\end{align}
Step 3: Calculate the action variable
\begin{align}
I = I(E,\, t) &= \frac{1}{2\pi} \oint_{H_t = E} \, p\, dq =  \frac{1}{2\pi} \, 4\, \sqrt{2mU_0} \int_{0}^{\frac{1}{\alpha(t)}\arctan\left(\sqrt{\frac{E}{U_0}}\right)}\, \sqrt{\frac{E}{U_0} - \tan^2\Big(\alpha(t)\,u\Big)}\, du \\
&= \frac{2\sqrt{2mU_0}}{\pi\, \alpha(t)} \int_{0}^{\arctan\left(\sqrt{\frac{E}{U_0}}\right)}\,\sqrt{\frac{E}{U_0} - \tan^2\big(w\big)}\, dw\\
&= \frac{2\sqrt{2mU_0}}{\pi\, \alpha(t)} \,\, G\left(\,\frac{E}{U_0}, \,\, \arctan\left(\,\sqrt{\frac{E}{U_0}}\,\right)\,\right)
\end{align}
Step 4: Solve the equation $I = I(E, \, t)$ for $E$ to find the function
$$E = E(I,\, t)$$
Step 5: Define the generating function 
$$S(I, \, q, \, t) = F\Big(E(I, \, t), \, q, \, t\Big)$$
Step 6: Calculate the angle variable
$$\varphi = \frac{\partial S}{\partial I}\big(I, \, q, \, t\big)$$
Step 7: Solve the equation $\varphi = \frac{\partial S}{\partial I}\big(I, \, q, \, t\big)$ for $q$ to find the function
$$q = q(I, \, \varphi, \, t)$$
Step 8: In order to find the hamiltonain function $\tilde{H}\big(I, \, \varphi, \, t\big)$ with respect to the action-angle variables $(I, \varphi)$, recall the Hamilotn-Jacobi equation:
$$\frac{\partial S}{\partial t}\big(I, \, q, \, t\big) \, + \, H\left(\frac{\partial S}{\partial q}\big(I, \, q, \, t\big), \, q, \, t\right) = \tilde{H}\left(I, \, \frac{\partial S}{\partial I}\big(I, \, q, \, t\big), \, t\right)$$ By construction, we have that
$$ H\left(\frac{\partial S}{\partial q}\big(I, \, q, \, t\big), \, q, \, t\right) = E(I, \, t)$$
so the hamiltonian in action-angle coordinates should be
$$\tilde{H}\left(I, \, \varphi, \, t\right) = \frac{\partial S}{\partial t}\big(I, \, q, \, t\big)\Big{|}_{q = q(I,\, \varphi, \, t)} \, + \, E(I, \, t)$$
Step 9: The equations of motion in the new action-angle variables are
\begin{align}
\frac{d I}{dt} &= \frac{\partial\tilde{H}}{\partial \varphi}\big(I, \, \varphi, \, t\big)\\
\frac{d \varphi}{dt} &= - \, \frac{\partial\tilde{H}}{\partial I}\big(I, \, \varphi, \, t\big)
\end{align}
