<s>[INST] How to calculate $\int \sqrt{(\cos{x})^2-a^2} \, dx$ How to calculate: 
$$\int \sqrt{(\cos{x})^2-a^2} \, dx$$
 [/INST] In SWP (Scientific WorkPlace), with Local MAPLE kernel,  I got the following evaluation
$$\begin{eqnarray*}
I &:&=\int \sqrt{\cos ^{2}x-a^{2}}dx \\
&=&-\frac{\sqrt{\sin ^{2}x}}{\sin x}a^{2}\text{EllipticF}\left( \left( \cos
x\right) \frac{\text{csgn}\left( a^{\ast }\right) }{a},\text{csgn}\left(
a\right) a\right)  \\
&&-\text{EllipticF}\left( \left( \cos x\right) \frac{\text{csgn}\left(
a^{\ast }\right) }{a},\text{csgn}\left( a\right) a\right)  \\
&&+\text{EllipticE}\left( \left( \cos x\right) \frac{\text{csgn}\left(
a^{\ast }\right) }{a},\text{csgn}\left( a\right) a\right) F
\end{eqnarray*}$$
where
$$F=\sqrt{\frac{-\cos ^{2}x+a^{2}}{a^{2}}}\sqrt{\cos ^{2}x-a^{2}}\text{csgn}\left( a^{\ast }\right) \frac{a}{-\cos ^{2}x+a^{2}}$$
As an example: 
$$\begin{eqnarray*}
\int \sqrt{\cos ^{2}x-2^{2}}dx &=&\frac{\sqrt{\sin ^{2}x}}{\sin x}3\text{EllipticF}\left( \frac{1}{2}\cos x,2\right)  \\
&&+\text{EllipticE}\left( \frac{1}{2}\cos x,2\right) \frac{\sqrt{-\cos
^{2}x+4}}{\sqrt{\cos ^{2}x-4}}
\end{eqnarray*}$$
</s>