5

We want to calculate the following parametric integral

$$\int_{0}^{\pi}{\frac{\cos(nx)-\cos(na)}{\cos(x)-\cos(a)}}dx$$

I tried using the substitution $$\cos(nx)=\frac{1}{2}(e^{inx}+e^{-inx})$$ but didn't get much further with the integrations. I'm thinking it's possibly a recurrence but I don't seem to get a way to reduce the $n$ value in the integral

Quanto
  • 97,352
Summand
  • 362
  • 4
    Here's an approach: note that the integrand is even, so the integral can be rewritten as $$ \frac 12 \int_{-\pi}^\pi \frac{\cos(nx)-\cos(na)}{\cos(x)-\cos(a)},dx. $$ Rewrite this as a contour integral with the subsitution $z = e^{ix}$, $dz = iz,dx$. We get $$ \frac 1{2i}, \oint_{|z| = 1} \frac{z^n + z^{-n} - 2\cos(na)}{z + z^{-1} - 2\cos(a)}\cdot \frac 1z,dz\ = \frac 1{2i}, \oint_{|z| = 1} \frac{z^n + z^{-n} - 2\cos(na)}{z^2 - (2 \cos a)z + 1},dz. $$ – Ben Grossmann Oct 15 '20 at 16:48
  • Have you tried applying the identity $ \cos A - \cos B = -2 \sin \left( \frac{A+B}{2} \right) \sin \left( \frac{A-B}{2} \right) $ in numerator and denominator. – Jatin Oct 15 '20 at 18:32
  • 1
    @BenGrossmann Then, since $1/(z^2 - 2 t z + 1)$ is the generating function for the Chebyshev polynomials $U_n(t)$, the integral is $$\pi [z^{n - 1}] (z^2 - 2 z \cos a + 1)^{-1} = \pi U_{n - 1}(\cos a) = \pi \csc a \sin n a, \quad n \in \mathbb N.$$ – Maxim Oct 16 '20 at 05:24

3 Answers3

9

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\on}[1]{\operatorname{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} I_{n} & \equiv \bbox[5px,#ffd]{\int_{0}^{\pi}{\cos\pars{nx} -\cos\pars{na} \over \cos\pars{x} - \cos\pars{a}}\,\dd x} \\[5mm] & = \int_{0}^{\pi}{\on{T}_{n}\pars{\cos\pars{x}} -\on{T}_{n}\pars{\cos\pars{a}} \over \cos\pars{x} - \cos\pars{a}}\,\dd x \end{align} where $\ds{\on{T}_{n}\pars{z}}$ is the Chebyshev Polynomial of the First Kind.

$\ds{\on{T}_{n}\pars{z}}$ expansion in powers of $\ds{z}$ is given by $$\!\!\!\!\! \on{T}_{n}\pars{z} = \sum_{r = 0}^{\left\lfloor n/2\right\rfloor}t_{nr}\,z^{n - 2r}\,,\,\,\, t_{nr} \equiv {1 \over 2}\,n\,{\pars{-1}^{r} \over n - r} {n - r \choose r}2^{n - 2r} $$


\begin{align} I_{n} & = \sum_{r = 0}^{\left\lfloor n/2\right\rfloor}t_{nr} \int_{0}^{\pi}{% \cos^{n - 2r\,}\pars{x} - \cos^{n - 2r\,}\pars{a} \over \cos\pars{x} - \cos\pars{a}}\,\dd x \\[5mm] & = \sum_{r = 0}^{\left\lfloor n/2\right\rfloor}t_{nr} \sum_{k = 0}^{n - 1}\ \\ & \int_{0}^{\pi} \cos^{\pars{n - 2r}k\,\,}\pars{x} \cos^{\pars{n - 2r}\pars{n - 1 - k}}\,\,\,\pars{a}\,\dd x \\[5mm] = &\ \bbx{\sum_{r = 0}^{\left\lfloor n/2\right\rfloor}\ \sum_{k = 0}^{n - 1}A_{knr}\ \cos^{\pars{n - 2r}\pars{n - 1 - k}}\,\,\,\pars{a}} \label{1}\tag{1} \\ & \end{align} where $$ \left\{\begin{array}{rcl} \ds{A_{knr}} & \ds{\equiv} & \ds{t_{nr}\int_{0}^{\pi} \cos^{\pars{n - 2r}k\,\,}\pars{x}\,\dd x} \\[2mm] \ds{\int_{0}^{\pi}\cos^{p}\pars{x}\,\dd x} & \ds{=} & \left\{\begin{array}{lcl} \ds{\root{\pi}\,{\Gamma\pars{\bracks{1 + p}/2} \over \Gamma\pars{1 + p/2}}} & \mbox{if} & \ds{p\ \mbox{is}\ even} \\ \ds{0} && \mbox{otherwise} \end{array}\right. \end{array}\right. $$ The power of $\ds{\cos\pars{a}}$, in (\ref{1}), can be rewritten as a linear combination of $\ds{\cos\pars{k a}}$ by using again the above cited polynomial.
For instance, $$\!\!\!\!\! \begin{array}{|c|c|}\hline \ds{n} & \ds{I_{n}} \\ \hline \ds{1} & \ds{\pi} \\[1mm] \hline \ds{2} & \ds{2\pi\cos\pars{a}} \\[1mm] \hline \ds{3} & \ds{\pi + 2\pi\cos\pars{2a}} \\[1mm] \hline \ds{4} & \ds{2\pi\cos\pars{a} + 2\pi\cos\pars{3a}} \\[1mm] \hline \ds{5} & \ds{\pi + 2\pi\cos\pars{2a} + 2\pi\cos\pars{4a}} \\[1mm] \hline \ds{6} & \ds{2\pi\cos\pars{a} + 2\pi\cos\pars{3a} + 2\pi\cos\pars{5a}} \\[1mm] \hline \ds{7} & \ds{\pi + 2\pi\cos\pars{2a} + 2\pi\cos\pars{4a} + 2\pi\cos\pars{6a}} \\[1mm] \hline \ds{8} & \ds{2\pi\cos\pars{a} + 2\pi\cos\pars{3a} + 2\pi\cos\pars{5a} + 2\pi\cos\pars{7a}} \\[1mm] \hline \end{array} $$ The $\ds{\color{red}{pattern}}$ is $$ \bbx{\!\!\!\!\! I_{n} = \left\{\begin{array}{lcl} \ds{\pi} & \mbox{if} & \ds{n = 1} \\ \ds{\bracks{n\ odd}\pi + 2\pi\sum_{k = 0}^{\left\lfloor n/2 - 1\right\rfloor}\cos\pars{\bracks{n - 1 - 2k}a}} & \mbox{if} & \ds{n \geq 2} \end{array}\right.} \\ $$
Felix Marin
  • 89,464
6

Note

$$I_n=\int_{0}^{\pi}{\frac{\cos(nx)-\cos(na)}{\cos x-\cos a}}dx = \int_{0}^{\pi}{\frac{\sin (nt_+)\sin(n t_-)}{\sin t_+\sin t_-}}dx $$

with $t_\pm =\frac{a\pm x}2$ and apply

$$\frac{\sin nt- \sin(n-2)t}{\sin t}=2\cos(n-1)t \tag1 $$

to write the integral as

\begin{align} I_{n} &=\int_0^\pi \left(\frac{\sin(n-2)t_+}{\sin t_+}+2\cos(n-1)t_+\right) \left(\frac{\sin(n-2)t_-}{\sin t_-}+2\cos(n-1)t_-\right) dx\\ \end{align}

The two cross terms vanish and the integral can be expressed recursively

$$I_n =I_{n-2} +2\pi \cos[(n-1)a]$$ with $I_0=0$ and $I_1 = \pi$. Note that the recursive result can be summed analytically

$$I_n=\int_{0}^{\pi}{\frac{\cos(nx)-\cos(na)}{\cos x-\cos a}}dx = \frac{\pi \sin(na )}{\sin a}$$

which can shown by induction with (1).

Quanto
  • 97,352
  • Which gives $$I_n=\frac{\pi \left((-1)^n (\sin ((a+\pi ) n)-\sin (a n+a+\pi n))+\sin (a (n+1))+\sin (a n)\right)}{2 (a \sin )}$$ – Raffaele Oct 18 '20 at 14:58
3

The following is a modification of the approach that Ben Grossmann suggested in the comments.

Assuming that $0 < a< \pi$, we have

$$ \begin{align} \int_{0}^{\pi} \frac{\cos(nx)-\cos(na)}{\cos(x)-\cos(a)} \, \mathrm dx &= \frac{1}{2} \int_{-\pi}^{\pi} \frac{\cos(nx)-\cos(na)}{\cos(x)-\cos(a)} \, \mathrm dx \\ &\overset{(1)}{=} \frac{1}{2} \, \operatorname{PV}\int_{-\pi}^{\pi}\frac{e^{inx}-e^{ina}}{\cos(x) - \cos(a)} \, \mathrm dx \\ &= \frac{1}{2} \, \operatorname{PV} \int_{|z|=1} \frac{z^{n}-e^{ina}}{\frac{1}{2}{\left(z+ \frac{1}{z} \right) - \cos(a)}} \frac{\mathrm dz}{iz} \\ &= \frac{1}{i} \, \operatorname{PV}\int_{|z|=1} \frac{z^{n}-e^{ina}}{z^{2}+1- 2z\cos(a)} \, \mathrm dz \\ &\overset{(2)}{=} \frac{1}{i} \, i \pi \operatorname{Res} \left[\frac{z^{n}-e^{ina}}{z^{2}+1-2z \cos(a)}, e^{-ia}\right] \\ &= \pi \lim_{z \to e^{-ia}} \frac{z^{n}-e^{ina}}{2z-2 \cos(a)} \\ &= \pi \, \frac{e^{-ina}-e^{ina}}{2e^{-ia}-2 \cos(a)} \\ &= \pi \, \frac{-2i \sin(na)}{-2 i \sin(a)} \\ &= \frac{\pi \sin( na)}{\sin (a)}. \end{align}$$


$(1)$ The imaginary part of the integral is zero.

$(2)$ The singularity on the unit circle at $z= e^{-ia}$ is a simple pole, while the singularity at $z= e^{ia}$ is removable.