# Let $a>0$. Show that $\int_0^\pi {dx\over a+\sin^2(x)}={\pi\over \sqrt{a(a+1)}}.$ [closed]

Let $a>0$. Show that $$\int_0^\pi {dx\over a+\sin^2(x)}={\pi\over \sqrt{a(a+1)}}.$$

I'm not sure how to show this. Any help is greatly appreciated.

## closed as off-topic by heropup, user91500, choco_addicted, user223391, WatsonApr 20 '16 at 8:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – heropup, user91500, choco_addicted, Community, Watson
If this question can be reworded to fit the rules in the help center, please edit the question.

• Although I voted to reopen this as an interesting application of complex variables to real integration, I think you should improve the Question by providing context. – hardmath Apr 22 '16 at 3:04

METHODOLOGY 1: Complex Analysis and Contour Integration

We can simplify the problem by using the double-angle formula for the cosine to write

\begin{align} \int_0^\pi \frac{1}{a+\sin^2(x)}\,dx&=\int_0^\pi \frac{2}{(2a+1)-\cos(2x)}\,dx \\\\ &=\int_0^{2\pi}\frac{1}{(2a+1)-\cos(x)}\,dx \tag 1\\\\ \end{align}

Next, we move to the complex plane by letting $z=e^{ix}$. Then, we have

\begin{align} \int_0^{2\pi}\frac{1}{(2a+1)-\cos(x)}\,dx&=\oint_{|z|=1}\frac{1}{(2a+1)+\frac12(z+z^{-1})}\,\frac{1}{iz}\,dz\\\\ &=\frac{2}i\oint_{|z|=1} \frac{1}{z^2+2(2a+1)z+1}\,dz\\\\ &=\frac{2}{i}\,(2\pi i)\text{Res}\left(\frac{1}{z^2+2(2a+1)z+1},z=-(2a+1)+2\sqrt{a(a+1)}\right)\\\\ & =\frac{4\pi}{4\sqrt{a(a+1)}}\\\\ &=\frac{\pi}{\sqrt{a(a+1)}} \end{align}

METHODOLOGY 2: Real Analysis and the Weierstrass Substitution

As an alternative to using contour integration, write the integral in $(1)$ as

$$\int_0^{2\pi}\frac{1}{(2a+1)-\cos(x)}\,dx=2\int_0^\pi \frac{1}{(2a+1)-\cos(x)}\,dx$$

Then, use the classical Tangent Half-Angle Substitution to write

\begin{align} 2\int_0^\pi \frac{1}{(2a+1)-\cos(x)}\,dx&=2\int_0^\infty \frac{1}{(2a+1)-\frac{1-t^2}{1+t^2}}\,\frac{2}{1+t^2}\,dt\\\\ &=\frac{2}{a+1}\int_0^\infty \frac{1}{t^2+\frac{a}{a+1}}\,dt\\\\ &=\frac{\pi}{\sqrt{a(a+1)}} \end{align}

as expected!

Hint: use symmetry to make it an integral from $0$ to $2\pi$ (or $-\pi$ to $\pi$ if you prefer), and transform to an integral around the unit circle with $z = e^{ix}$. Use residues.

My hint would be to divide the numerator and denominator by $\cos^2 x$. Then in the numerator you have $\tan'x$ and in the denominator you have $a(\tan^2 x + 1) + \tan^2 x$. Use the substitution $y=\tan x$. (To avoid infinities in the middle, switch the limits of integration to $[-\pi/2,\pi/2]$ or divide instead by $\sin^2 x$ to deal with cotangents. Then you'll end up with $\int^\infty_{-\infty} \frac{dx}{a+(1+a)x^2}$ which you'll be able to evaluate.

I wanted to just show you this potentially interesting property about your integral:

Let$$I(a):=\int_0^\pi \frac{\text{d}x}{a+\sin^2 x}$$

Then

$$(-1)^{n+1}I^{(n)}(a)=\int_0^\pi \frac{\text{d}x}{(a+\sin^2 x)^{n+1}}$$

This implies that

$$I(a)-I'(a)+I''(a)-I'''(a)\cdots=\int_0^\pi \frac{\text{d}x}{a+\sin^2 x+1}=I(a+1)$$

This is a bit too long for comment, but might help with some solution-finding =)

Rewritten as $$\int_0^{\pi}\frac{dx}{a\cos^2x+(a+1)\sin^2x}$$ this is an integral that gets posted about once a week. There are $6$ methods I can think of to attack it, and they all work with the result $\frac{\pi}{\sqrt{a(a+1)}}$. The first time I saw this was in a differential geometry textbook.

EDIT: The above might seem a bit dismissive, but that is far from the truth; in fact I love this integral $\heartsuit$. So much, in fact, that I will provide a seventh method! Cue Gary Larson cartoon with free-body diagram of baseball approaching window$\dots$ Now, consider an object subject to a $2$-dimensional harmonic oscillator potential, where the force is proportional to the distance from the force center: $\vec F=-k\vec r$.

Now, wait a minute, you are saying: shouldn't such a force in $2$-d be different from that in $1$-d or $3$-d? For example the Coulomb force is spatially invariant in $1$-d (electric field near a large flat sheet of unifort charge or flat-earth gravitation) proportional to $1/r$ in $2$-d (electric field near a long uniformly charged wire) or $1/r^2$ in $3$-d (electric field of a small charged object or round-earth gravitation.)

But the reason for the harmonic oscillator potential is that if an object is at its equilibrium position due to the conservative forces acting on it, then the zero-order term of the Taylor series for its potential doesn't contribute to forces ($\vec F=-\vec\nabla V$) and the first order terms are all zero (that's the condition for equilibrium) so the first terms that can act for small displacements from equilibrium are the second-order terms, so we get quadratic potential, linear force in any number of dimensions. Examples are objects near the $L_4$ or $L_5$ points in orbit, or the old experiment with NdFeB magnets and pyrolytic graphite.

OK, given that such a restoring force is plausible and assuming $2$-d motion in an isotropic field, we have the potential $V=\frac12kr^2$. The kinetic energy $T=\frac12mv^2=\frac12m(\dot x^2+\dot y^2)$, where $k$ is the force or 'spring' constant, $m$ is the object's mass, $x$ and $y$ its spatial coordinates and $\dot x$ and $\dot y$ their time derivatives. So now we have the Lagrangian of the system $$\mathscr L=T-V=\frac12mv^2-\frac12kr^2=\frac12m(\dot x^2+\dot y^2)-\frac12k(x^2+y^2)$$ And we are ready to derive Lagrange's equations of motion: $$p_x=\frac{\partial\mathscr L}{\partial\dot x}=m\dot x$$ $$\dot p_x=m\ddot x=\frac{\partial\mathscr L}{\partial x}=-kx$$ $$p_y=\frac{\partial\mathscr L}{\partial\dot y}=m\dot y$$ $$\dot p_y=m\ddot y=\frac{\partial\mathscr L}{\partial y}=-ky$$ So there it is, $\vec F=-k\vec r$. For an isotropic harmonic osciallator, the $x$ and $y$ motions are decoupled like this and we know how to solve this system: $$x=c_1\cos\omega t+c_2\sin\omega t$$ $$y=c_3\cos\omega t+c_4\sin\omega t$$ Where $t$ is the time and $\omega=\sqrt{\frac km}$ is the angular frequency of oscillation. This kind of motion would produce Lissajous figures of ellipses on your oscilloscope, or a straight line in exceptional cases. But let's choose an ellipse of semimajor axis $a$ oriented in the $x$ direction and semiminor axis $b$ in the $y$ direction: $x=a\cos\omega t$, $y=b\sin\omega t$ for our model case.

Now we are going to attempt solution of the system in polar coordinates where $x=r\cos\phi$ and $y=r\sin\phi$. Then $\dot x=\dot r\cos\phi-r\dot\phi\sin\phi$, $\dot y=\dot r\sin\phi+r\dot\phi\cos\phi$, so $v^2=\dot x^2+\dot y^2=\dot r^2+r^2\dot\phi^2$ and now we have the Lagrangian $$\mathscr L=\frac12mv^2-\frac12kr^2=\frac12m\left(\dot r^2+r^2\dot\phi^2\right)-\frac12kr^2$$ We can find the momentum conjugate to $\phi$ $$p_{\phi}=\frac{\partial\mathscr L}{\partial\dot\phi}=mr^2\dot\phi$$ and its time derivative, $$\dot p_{\phi}=\frac{\partial\mathscr L}{\partial\phi}=0$$ So we find that angular momentum is constant as it is for all central forces. This is Kepler's law of areas. $$mr^2\dot\phi=\ell=\text{constant}$$ Now we are ready to do the integral! Going back to our model solution, $$r^2=x^2+y^2=a^2\cos^2\omega t+b^2\sin^2\omega t$$ At $t=0$, $r=a$ and the tangential velocity $r\dot\phi=v_y=b\omega\cos\omega t=b\omega$. So $\ell=mr^2\dot\phi=mab\omega$ and so $$mr^2\frac{d\phi}{dt}=mab\omega$$ Rewrite as \begin{align}\frac{d\phi}{ab}&=\frac{\omega dt}{r^2}=\frac{\omega dt}{a^2\cos^2\omega t+b^2\sin^2\omega t}\\ &=\frac{d\theta}{a^2\cos^2\theta+b^2\sin^2\theta}\end{align} Where we have substituted $\theta=\omega t$. Now we integrate over a full cycle of the motion: $$\int_0^{2\pi}\frac{d\phi}{ab}=\frac{2\pi}{ab}=\int_0^{2\pi}\frac{d\theta}{a^2\cos^2\theta+b^2\sin^2\theta}$$ The seventh method!