Solving $\int_0^\pi \frac{\cos(kn)}{1+k^2}dk$

calculuscomplex-analysisdefinite integralsintegrationtrigonometric-integrals

I want to solve the integral $\int_0^\pi \frac{\cos(kn)}{1+k^2}dk$.

In my attempt, I tried do Integration by Parts twice, but this didn't get me anywhere. Then, I thought about using the Residue theorem, but to do that I needed the limits of integration to be $-\infty$ to $\infty$.

What else can I do to analytically solve this?


$$\int\limits_{0}^{\pi}\frac{\cos(kn)}{1+k^2}dk$$


\begin{align}
\int\limits_{0}^{\pi}\frac{\cos(kn)}{1+k^2}dk &= \int\limits_{0}^{\pi}\frac{\cos(kn)}{(k+i)(k-i)}dk\\
&=\int\limits_{0}^{\pi}\frac i 2\left(\frac{\cos (k n)}{k+i}-\frac{\cos (k n)}{k-i}\right)dk\\
&=\frac{i}{2}\int\limits_{0}^{\pi}\frac{\cos(kn)}{k+i}dk-\frac{i}{2}\int\limits_{0}^{\pi}\frac{\cos(kn)}{k-i}dk
\end{align}

Consider the first integral term and perform the change of variables $k = x – i$.

\begin{align}
\frac{i}{2}\int\limits_{0}^{\pi}\frac{\cos (k n)}{k+i} &= \frac{i}{2}\int\limits_{i}^{\pi+i} \frac{\cos (n (x-i))}{x} dx\\
&= \frac{i}{2}\int\limits_i^{\pi+i} \cosh (n) \frac {\cos (n x)}{x}+i\sinh (n) \frac{\sin (n x)} {x} dx\\
&=n\frac{i}{2}\cosh(n)\int\limits_{i}^{\pi+i}\frac{\cos(nx)}{nx}dx – n\frac{1}{2}\sinh(n)\int\limits_{i}^{\pi+i} \frac{\sin(nx)}{nx}dx
\end{align}

Change of variables: $t = nx$:

\begin{align}
&=n\frac{i}{2}\cosh(n)\int\limits_{n i}^{n(\pi + i)} \frac{\cos(t)}{t}dt – n\frac{1}{2}\sinh(n)\int\limits_{ni}^{n(\pi+i)}\frac{\sinh(t)}{t}dt\\
&= n\frac{i}{2}\cosh(n) \left ( Ci(n(\pi+i) – Ci(ni)) \right ) – n\frac{1}{2}\sinh(n)\left( Si(n(\pi+i)) – Si(ni)\right )
\end{align}

Likewise, the second integral term of $(3)$ becomes:

\begin{equation}
\begin{split}
&\frac{i}{2}\int\limits_{0}^{\pi}\frac{\cos(kn)}{k-i}dk \\ &=n\frac{i}{2}\cosh(n) \left ( Ci(n(\pi-i) – Ci(-ni)) \right ) + n\frac{1}{2}\sinh(n)\left( Si(n(\pi-i)) – Si(-ni)\right )
\end{split}
\end{equation}

Therefore, $(3) = (8) – (9)$.

Best Answer

The problem is not too difficult if you start with$$\frac{\cos(kn)}{1+k^2}=\frac{\cos(kn)}{(k+i)(k-i)}=\frac i 2\left(\frac{\cos (k n)}{k+i}-\frac{\cos (k n)}{k-i}\right)$$

Consider the first one and let $k=x-i$ $$\frac{\cos (k n)}{k+i}=\frac{\cos (n (x-i))}{x}$$ Expand the cosine $$\frac{\cos (k n)}{k+i}=n\cosh (n) \frac {\cos (n x)} {nx}+in \sinh (n) \frac{\sin (n x)} {nx}$$ Another obvious change of variable will give the antiderivative in terms of sine and cosine integrals.

Finish, go back to $x$ and then to $k$ and apply the bounds.

I am sure that you can take it from here.

Related Question