# Math Help - can this integral be solved analytically!

1. ## can this integral be solved analytically!

Hello,

i like to find an analytical solution for the following integral:

integral from [0 to pi]

{cos(2nθ)/ (x^2+ cos^2(θ))}dθ

x is constant and n is integer

mopen

2. ## Re: can this integral be solved analytically!

Originally Posted by mopen
Hello,

i like to find an analytical solution for the following integral:

integral from [0 to pi]

{cos(2nθ)/ (x^2+ cos^2(θ))}dθ<------ What you have written here does not match with the image you have attached. What integral do you want to find,

$\int_{0}^{\pi}\frac{\cos(n\theta)}{x^2+\cos^{2} \theta}d \theta\mbox{ or }\int_{0}^{\pi}\frac{\cos(2n\theta)}{x^2+\cos^{2} \theta}d \theta$

x is constant and n is integer

mopen
.

3. ## Re: can this integral be solved analytically!

Hello Sudharaka,

i like to evaluate the second integral :
integral from [0 to pi]

{cos(2nθ)/ (x^2+ cos^2(θ))}dθ

which is the same as the one on the image but with only even n's .

Thank You

Mopen

5. ## Re: can this integral be solved analytically!

But what does it means, Seriesexpansion of the integral at :t =‡ 0?

6. ## Re: can this integral be solved analytically!

Originally Posted by mopen
Hello,

i like to find an analytical solution for the following integral:

integral from [0 to pi]

{cos(2nθ)/ (x^2+ cos^2(θ))}dθ

x is constant and n is integer

mopen
There are two ways to [try] to solve the integral...

a) use the variable transformation...

$t= \tan \frac{\theta}{2} \implies \theta= 2 \tan^{-1} t\ ;\ d \theta= 2 \frac{d t}{1+t^{2}}\ ;\ \cos \theta= \frac{1-t^{2}}{1+t^{2}}$ (1)

b) use the identity...

$\cos \theta= \frac{z+z^{-1}}{2}_{z=e^{i \theta}$ (2)

... and integrate along the unit circle in the complex plane using the Cauchy integral formulas...

Neither a) nor b) is particulary comfortable but... what do You prefer?...

Kind regards

$\chi$ $\sigma$

7. ## Re: can this integral be solved analytically!

i prefer "a" , but how to substitute the cos(2nθ) term?

8. ## Re: can this integral be solved analytically!

Originally Posted by mopen
i prefer "a" , but how to substitute the cos(2nθ) term?
You can use the identity...

$\cos k x = \frac{1}{2}\ \{(2 \cos x)^{k} -k (2 \cos x)^{k-1} + \frac{k}{2}\ \binom{k-3}{1}\ (2 \cos x)^{k-4} - ...\}$ (1)

... and that is why a) is not 'very comfortable' ...

Kind regards

$\chi$ $\sigma$

9. ## Re: can this integral be solved analytically!

Ok , what about the second option how to deal with it, and would letting n=1 make the integration easier?

10. ## Re: can this integral be solved analytically!

For the second option for the moment You can keep the term n and the first step is to set $\gamma=2 \theta$ so that the integral becomes...

$I(x)= \frac{1}{2}\ \int_{0}^{2 \pi} \frac{\cos n \gamma}{x^{2} + \cos^{2} \frac{\gamma}{2}}\ d \gamma$ (1)

... that has limits $0$ and $2 \pi$. Now You use the identities...

$\cos n \gamma= \frac{z^{n}+z^{-n}}{2}_{z=e^{i \gamma}}$ (2)

$\cos^{2} \frac{\gamma}{2}= \frac{1+\cos \gamma}{2}$ (3)

... and take into Account that is $d \gamma=\frac{dz}{i z}$ , Your integral, if no mistakes of me, becomes...

$I(x)= -\frac{i}{2 z} \int_{\Gamma} \frac{z^{n}+z^{-n}}{1+2 x^{2} + \frac{z+z^{-1}}{2}} d z = -i \int_{\Gamma} \frac{z^{2n}+1}{z^{n}\ \{1+2 (1+2 x^{2})\ z + z^{2}\}}\ dz$ (4)

... where $\Gamma$ is the unit circle. Now all that You have to do is to apply the residue theorem... difficult task but not superior to human possibilities ...

Kind regards

$\chi$ $\sigma$

11. ## Re: can this integral be solved analytically!

In the previous post we are arrived to the identity...

$I(x)= \int_{0}^{\pi} \frac{\cos 2 n \theta}{x^{2}+\cos^{2} \theta}\ d \theta= -i \int_{\Gamma} \frac{z^{2n}+1}{z^{n}\ \{1+2\ (1+2\ x^{2})\ z + z^{2}\}}\ dz$ (1)

... where $\Gamma$ is the unit circle. Now if we apply the residue theorem the integral (1) is given by...

$I(x)= 2 \pi \sum_{k} r_{k}$ (2)

... where the $r_{k}$ are the residues of the poles of the f(z) in (1) internal to the unit circle. In $x \ne 0$ the f(z) has inside the unit circle a pole of order n in $z=0$ and a simple pole in...

$z_{0}= -1 -2 x^{2} +2 x \sqrt{1+x^{2}}$ (3)

May be is useful to proceed 'step by step', so that we start with n=0. In that case we have only the pole (3) and its residue is...

$r_{1} = \lim_{z \rightarrow z_{0}} (z-z_{0})\ f(z)=\frac{1}{2 x \sqrt{1+x^{2}}}$ (4)

... so that is...

$\int_{0}^{\pi} \frac{1}{x^{2}+\cos^{2} \theta}\ d \theta= \frac{\pi}{x\ \sqrt{1+x^{2}}}$ (5)

In next post[s] we will consider the cases n>0...

Kind regards

$\chi$ $\sigma$

12. ## Re: can this integral be solved analytically!

Dear chisigma,
Thank you very much, i just take time to check the validity of my derivation and that the integral is correct. Your solution using the residue theorem is interesting !, but what about n=1?

Best Regards

Mopen

13. ## Re: can this integral be solved analytically!

First we rewritre the general formula...

$I(x)= \int_{0}^{\pi}\frac{\cos 2 n \theta}{x^{2}+\cos^{2} \theta}\ d \theta= -i\ \int_{\Gamma} \frac{z^{2n}+1}{z^{n}\ \{1+2 (1+2 x^{2}) z + z^{2}\}}\ dz$ (1)

... where $\Gamma$ is the unit circle. If $n=1$ and $x \ne 0$ f(z) has two poles of order 1 inside the unit circle: $z_{0}=0$ and $z_{1}=-1-2 x^{2} +2 x \sqrt{1+x^{2}}$ and their residues are...

$r_{0}= \lim_{z \rightarrow z_{0}} (z-z_{0})\ f(z)= - i$ (2)

$r_{1}= \lim_{z \rightarrow z_{1}} (z-z_{1})\ f(z)= -i\ \frac{1+4 x (1+x^{2}) -2 x (1+2 x^{2}) \sqrt{1+x^{2}}}{4x^{2} (1+x^{2}) -2 x (1+2 x^{2}) \sqrt{1+x^{2}}}$ (3)

Now is...

$I(x)= 2 \pi i (r_{0}+r_{1})= \pi\ \frac{1+4 x (1+x) (1+x^{2}) -4 x (1+2 x^{2}) \sqrt{1+x^{2}}}{2 x^{2} (1+x^{2}) -x (1+2 x^{2}) \sqrt{1+x^{2}}}$ (4)

The result looks like the 'Orient Express' and , because in pure calculus I'm very poor, I suggest mopen and all the people of MHF to control my work. In any case what I can say is that for n=1 the computation efforts are remarkable and for n>1 I prefer to 'pass the ball' ...

Kind regards

$\chi$ $\sigma$

14. ## Re: can this integral be solved analytically!

Dear chisigma,

May God Bless you!. you did more than enough. just small corrections for the second pole residue and the integral value " see the attached picture"

Thank you so much!

Best Regards

Mopen