Solving $\int_{x_{1}}^{x_{2}}\frac{dx}{\sqrt{E-U_{0}\tan(ax)^{2}}}$ Please help me to find this integral without long calculations. My attempt took several several sheets, and the answer is frighteningly piled up. Although I have come to success, I would like to see a more accessible way
$$\int_{x_{1}}^{x_{2}}\frac{dx}{\sqrt{E-U_{0}\tan\left(ax\right)^{2}}},\quad E>0, \quad  U, a = \text{ constants}.$$
 A: Well, we are trying to find the following integral:
$$\mathcal{I}_\text{n}\left(\alpha,\beta\right)=\int\frac{1}{\sqrt{\alpha+\beta\tan^2\left(\text{n}x\right)}}\space\text{d}x\tag1$$
Let's substitute $\text{u}=\text{n}x$, this leads to:
$$\mathcal{I}_\text{n}\left(\alpha,\beta\right)=\frac{1}{\text{n}}\int\frac{1}{\sqrt{\alpha+\beta\tan^2\left(\text{u}\right)}}\space\text{du}\tag2$$
Let's substitute $\text{s}=\sin\left(\text{u}\right)$, this leads to:
$$\mathcal{I}_\text{n}\left(\alpha,\beta\right)=\frac{1}{\text{n}}\int\frac{1}{\sqrt{\alpha+\text{s}^2\left(\beta-\alpha\right)}}\space\text{ds}\tag3$$
Let's substitute $\text{w}=\text{s}\cdot\sqrt{\frac{\beta}{\alpha}-1}$, this leads to:
$$\mathcal{I}_\text{n}\left(\alpha,\beta\right)=\frac{1}{\text{n}\sqrt{\beta-\alpha}}\int\frac{1}{\sqrt{\text{w}^2+1}}\space\text{dw}\tag4$$
This is a very standard integral, which gives:
$$\mathcal{I}_\text{n}\left(\alpha,\beta\right)=\frac{1}{\text{n}\sqrt{\beta-\alpha}}\cdot\ln\left|\text{w}+\sqrt{\text{w}^2+1}\right|+\text{C}\tag5$$
So, we end up with:
$$\mathcal{I}_\text{n}\left(\alpha,\beta\right)=\frac{1}{\text{n}\sqrt{\beta-\alpha}}\cdot\ln\left|\sin\left(\text{n}x\right)\cdot\sqrt{\frac{\beta}{\alpha}-1}+\sqrt{\sin^2\left(\text{n}x\right)\cdot\left|\frac{\beta}{\alpha}-1\right|+1}\right|+\text{C}\tag6$$
A: Once you get the answer (the one below is from Maple), you can differentiate it to check that it is right.
$$
\int \!{\frac {1}{\sqrt {E-U \left( \tan \left( ax \right)  \right) ^{
2}}}}\,{\rm d}x={\frac {\sqrt {{U}^{4} \left( E+U \right) }}{a{U}^{2}
 \left( E+U \right) }\arctan \left( {\frac { \left( E+U \right) {U}^{2
}\tan \left( ax \right) }{\sqrt {{U}^{4} \left( E+U \right) }\sqrt {E-
U \left( \tan \left( ax \right)  \right) ^{2}}}} \right) }+C
$$
It seems unlikely that any way of doing this will be short.
