# integrating an expression with alomst quadratic denominator including Chebyshev polynomials of the first kind

As a part of my research (in array processing - the specifics are not too exciting :-)), I cant resolve one specific integral.

Assume $$r\in\left[0 ,1\right]$$, $$N\in\mathbb{N}$$.

The basic form is $$\int_{\cos{(x)}=-1}^{\cos{(x)}=1}{ \frac{ 1-\cos{\left(Nx\right)} }{ N^{2}\left(1-\cos{(x)}\right) +r^{2}\left(1-\cos{\left(Nx\right)}\right) -Nr\left(1-\cos{(x)}-\cos{\left(Nx\right)}+\cos{\left(\left(N-1\right)x\right)}\right) } dx }.$$ Searching for hints, I came across the very informative "How to expand $$\cos{(nx)}$$ with $$\cos{(x)}$$?" discussion which lead me to investigate the expression using Chebyshev polynomials of the first kind, in light of the fact that $$\cos(nu)=T_n(\cos(u)),$$ but still no luck.

Anyhow, as can be seen in the wikipedia page (Chebyshev polynomials ), $$T_n(x)= \sum_{k=0}^{\lfloor n/2\rfloor} \binom{n}{2k} (x^2-1)^k x^{n-2k},$$ and plugging it into the basic integral results in $$\int_{-1}^{1}{ \frac{ 1-T_N(x) }{ N^{2}\left(1-x\right) +r^{2}\left(1-T_N(x)\right) -Nr\left(1-x-T_N(x)+T_{N-1}(x)\right) } \frac{-1}{\sqrt{1-x^{2}}} dx }.$$ Considering also the Chebyshev polynomials of the second kind, $$U_{N}\left(x\right)=\frac{\left(x+\sqrt{x^{2}-1}\right)^{N+1}-\left(x-\sqrt{x^{2}-1}\right)^{N+1}}{2\sqrt{x^{2}-1}},$$ and the equality $$T_{N+1}(x) = xT_{N}(x)-\left(1-x^{2}\right)U_{N-1}(x)$$ results in $$\int_{-1}^{1}{ \frac{ 1-T_N(x) }{ N^{2}\left(1-x\right) +r^{2}\left(1-T_N(x)\right) -Nr \left( 1-x+\sqrt{1-x^{2}} \left(\left(x+\sqrt{x^{2}-1}\right)^{N}-\left(x-\sqrt{x^{2}-1}\right)^{N}\right) \right) } \frac{-1}{\sqrt{1-x^{2}}} dx },$$ which has (as the headline states) "almost" quadratic form of the denominator. This is where I am stuck and if someone has an idea for solving it I will be thrilled.

Thank you.

sweeping many $$[N,r]$$ sets in MATHEMATICA, revealed that the finite integral (i.e. integration from $$x=0$$ to $$x=2\pi$$) can be expressed as $$\int_{0}^{2\pi}(...) = \frac{2\pi}{r^{2}-\left(N-1\right)r+N}$$ which is very nice and perfectly fits the fact that for $$r=0$$ it should be equal to $$2\pi/N$$.