# Evaluate the integral $\int_0^{\frac{\pi}{2}} \frac{1}{a + \sin^2 \theta}$ using the residue theorem

Can someone show me how to compute this integral using the residue theorem:

$$\int_0^{\frac{\pi}{2}} \frac{1}{a + \sin^2 \theta}d\theta$$

We can simplify the problem by (i) exploiting the even symmetry of the integrand, (ii) using the identity

$$\sin^2 \theta =\frac{1-\cos 2\theta}{2}$$

and (iii) enforcing the substitution $2\theta \to \theta$. We can write then write the integral of interest $I(a)$ as

$$I(a)=\frac12 \int_0^{2\pi}\frac{1}{(2a+1)-\cos \theta}d\theta \tag 1$$

Then, we move to the complex plane and letting $z=e^{i\theta}$ find that

$$I(a) = i\oint_{|z|=1} \frac{1}{z^2-2(2a+1)z+1}dz$$

For $a>0$ ($a<-1$), the only pole enclosed in the unit circle is at

$$z=(2a+1)-2\sqrt{a(a+1)}\,\,\,\,\left(z=(2a+1)+2\sqrt{a(a+1)}\right)$$

Therefore the residue of $\frac{1}{z^2-2(2a+1)z+1}$ is for $a>1$

\begin{align} \lim_{z\to (2a+1)-2\sqrt{a(a+1)}}\left(\frac{z-(2a+1)+2\sqrt{a(a+1)}}{z^2-2(2a+1)z+1}\right)=\frac{1}{-4\sqrt{a(a+1)}} \end{align}

and for $a<-1$

\begin{align} \lim_{z\to (2a+1)+2\sqrt{a(a+1)}}\left(\frac{z-(2a+1)-2\sqrt{a(a+1)}}{z^2-2(2a+1)z+1}\right)=\frac{1}{4\sqrt{a(a+1)}} \end{align}

Putting it all together yields for $a>0$ or $a<-1$

$$\bbox[5px,border:2px solid #C0A000]{I(a)=(2\pi i) i\,\text{sgn(a)}\,\frac{1}{-4\sqrt{a(a+1)}}=\text{sgn}(a)\,\frac{\pi}{2\sqrt{a(a+1)}}}$$

NOTE:

For $-1\le a\le 0$, the integral of interest is divergent.

• @Alexander I believe that this is an efficient way forward. Using the trigonometric identity for the double angle reduces the work substantially. Please let me know how I can improve my answer. I really want to give you the best answer I can. – Mark Viola Aug 8 '15 at 19:07
• The case $a<-1$ is also possible. This needs the other zero of the quadratic but it has the same residue giving the same formula (up to an overall minus). – Winther Aug 8 '15 at 19:43
• @Winther Yes, that is correct. I'll edit accordingly. +1 for the comment! The residue is actually of opposite sign and thus, so is the result for $a<-1$. – Mark Viola Aug 8 '15 at 19:44
• @Dr.MV: For your (1), does it have to be $\cos 2 \theta$ – Alexander Aug 8 '15 at 21:58
• @Alexander It is until we enforced the substitution $2 \theta \to \theta$. That was the third (iii) point. – Mark Viola Aug 8 '15 at 22:27

Hint: First, as Winther said, let $u=4\theta$, then let $z=e^{iu},$ $dz=i e^{iu}d\theta=i zd\theta$.

We know that: $$\sin( u)=\frac 1 {2i} (z-\frac 1 z)$$

Now to get rid of that pesky $\sin(4u)$: $$\sin(4 u)=\frac 1 {2i} (z^4-\frac 1 {z^4})$$

simplifying we get: $$\sin(4u)=\frac{-i(z^8-1)}{2z^4}$$

So your integral finally becomes: $$\frac 1 4\int\dfrac{1}{a+\left( \frac{-i(z^8-1)}{2z^4} \right)^2}\frac{dz}{iz}$$ From here on out, applying the residue theorem should be straightforward.

• But then the integral will then only go $1/4$ around the unit circle... – Winther Aug 8 '15 at 18:01
• @Winther then a substitution $u=4\theta$ should be done first, right? – GeorgSaliba Aug 8 '15 at 18:08
• Yes that is the simplest way to do it. – Winther Aug 8 '15 at 18:11
• @Winther, fixed it. Thanks for pointing that out. – GeorgSaliba Aug 8 '15 at 18:12
• @Winther There is actually a much simpler way forward. – Mark Viola Aug 8 '15 at 19:05

Notice, $$\int_0^{\frac{\pi}{2}} \frac{1}{a + \sin^2 \theta}d\theta$$ $$=\int_0^{\frac{\pi}{2}} \frac{\sec^2\theta}{a\sec^2\theta + \sec^2\theta\sin^2 \theta}d\theta$$ $$=\int_0^{\frac{\pi}{2}} \frac{\sec^2\theta}{a+a\tan^2\theta + \tan^2 \theta}d\theta$$ $$=\int_0^{\frac{\pi}{2}} \frac{\sec^2\theta}{a+(a+1)\tan^2\theta}d\theta$$ Let, $\tan \theta=t\implies \sec^2\theta d \theta=dt$ $$=\frac{1}{a+1}\int_{0}^{\infty}\frac{dt}{\frac{a}{a+1}+t^2}$$ $$=\frac{1}{a+1}\sqrt{\frac{a+1}{a}}\left[\tan^{-1}\left(t\sqrt{\frac{a+1}{a}}\right)\right]_{0}^{\infty}$$ $$=\frac{1}{\sqrt{a(a+1)}}\left(\frac{\pi}{2}-0\right)$$ $$=\frac{\pi}{2\sqrt{a(a+1)}}$$ Hence, we have

$$\bbox[5px, border:2px solid #C0A000]{\color{red}{\int_0^{\frac{\pi}{2}} \frac{d\theta}{a + \sin^2 \theta}=\frac{\pi}{2\sqrt{a(a+1)}}}}$$

• Can you use the Residue theorem to show it ? – Alexander Aug 8 '15 at 18:11
• Could someone please explain the reason for something wrong in the answer? – Harish Chandra Rajpoot Aug 8 '15 at 18:26
• Nothing wrong with the maths as far as I can see, but reading the question before answering is a good idea: "Can someone show me how to compute this integral using the residue theorem" – Winther Aug 8 '15 at 18:31
• This development is fine, except it doesn't really answer the posted question. – Mark Viola Aug 8 '15 at 19:41