Evaluating $ \int\limits_{0}^{2 \pi} \cos( n \arctan( R_0 \sin(\vartheta))) \cos( n \arctan( R_0 \cos(\vartheta))) \; d \vartheta.$ Let $R_0$ be a real number and $n$ an arbitrary integer
$$ \int\limits_{0}^{2 \pi} \cos( n \arctan( R_0 \sin(\vartheta))) \cos( n \arctan( R_0 \cos(\vartheta))) \; d \vartheta.$$
I have tried using $2 \cos(a) \cos(b) = \cos(a+b) +\cos(a-b)$, and also some substitutions. I would like to know how this integral behave with respect to $R_0$.
E.g. you can get something like
$$\int\limits_{0}^{2 \pi}  \cos( n \vartheta) \cos( n \arctan( \sqrt{ R_0^2 -\tan^2(\vartheta)})) \frac{1+\tan^2(\vartheta)}{\sqrt{ R_0^2 -\tan^2(\vartheta))}} d\; \vartheta.$$
I expect Bessel integrals to turn up, but I am not sure about this.
This question is related, but less specific:
An integral involving trigonometric functions and its inverse
 A: Note that, using invariance of the integrand under $\theta \to \frac{\pi}{2} + \theta$ for $0 < \theta < \frac{\pi}{2}$:
$$
  \mathcal{I}_n(\rho)= \int_0^{2 \pi} \cos\left( n \arctan(\rho \sin(\theta) ) \right) \cos\left( n \arctan(\rho \cos(\theta) ) \right) \mathrm{d} \theta = \\4 \int_0^{\pi/2} \cos\left( n \arctan(\rho \sin(\theta) ) \right) \cos\left( n \arctan(\rho \cos(\theta) ) \right) \mathrm{d} \theta
$$
Now change the variables, with $\sin(\theta) = x$:
$$
   \mathcal{I}_n(\rho)=4 \int_0^1 \cos\left(n \arctan(\rho x) \right)  \cos\left(n \arctan(\rho \sqrt{1-x^2}) \right) \frac{\mathrm{d} x}{\sqrt{1-x^2}}
$$
Now, we use, for $0<\rho<1$, $\arctan(\rho x) = \arccos\left( \frac{1}{\sqrt{1+ x^2 \rho^2}}\right)$, $\arctan(\rho \sqrt{1-x^2}) = \arccos\left( \frac{1}{\sqrt{1+ \rho^2 - x^2 \rho^2}}\right)$, and, for $n\in \mathbb{Z}_{\geqslant 0}$:
$$
   \cos\left(n \arccos\left( \frac{1}{\sqrt{1+ x^2 \rho^2}}\right) \right) = T_{n}\left(\frac{1}{\sqrt{1+ x^2 \rho^2}}\right)
$$
Now using explicit expression for Chebyshev polynomial $T_n(z)$:
$$
  \cos\left(n \arccos\left( \frac{1}{\sqrt{1+ x^2 \rho^2}}\right) \right) =  \frac{1}{2} \left( 1 + x^2 \rho^2 \right)^{n/2} \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k} \left(-x^2 \rho^2\right)^k
$$
This allows to compute the integral for even values of $n$, relatively easily:
$$
  \mathcal{I}_{2n}(\rho)= \sum_{k=0}^{n} \sum_{m=0}^n \int_0^1 \frac{(1+x^2 \rho^2)^{n}  (1+(1-x^2) \rho^2)^{n}}{\sqrt{1-x^2}} (-x^2 \rho^2)^{k} ( (x^2-1) \rho^2)^{m} \mathrm{d} x 
$$
Here are values, obtained for few low even values of $n$:
$$
   \mathcal{I}_2(\rho) = \frac{\pi  \left(\rho ^4+\left(3-4 \sqrt{\rho ^2+1}\right) \rho ^2+2\right)}{2
   \left(\rho ^4+3 \rho ^2+2\right)}
$$
$$
   \mathcal{I}_4(\rho) = -\frac{4 \pi  \rho ^2 \left(\rho ^6-2 \rho ^4+4 \rho ^2+8\right)}{\left(\rho^2+1\right)^{3/2} \left(\rho ^2+2\right)^3}
$$
$$
  \mathcal{I}_6(\rho) = -\frac{2 \pi  \rho ^2 \left(3 \rho ^{12}-26 \rho ^{10}+137 \rho ^8+152 \rho ^6-152
   \rho ^4+144\right)}{\left(\rho ^2+1\right)^{5/2} \left(\rho ^2+2\right)^5}
$$
