Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I show that $\displaystyle\int_{-a}^{a} \frac{\sqrt{a^2-x^2}}{1+x^2}dx = \pi\left(\sqrt{a^2+1}-1\right)$?

share|cite|improve this question
The indefinite integral is possible but is very complex (both that is uses $i$ and it is complicated). Wolfram alpha or other software can solve this directly with enough time. – kaine Jan 18 '13 at 20:16
Nice question (+1) – user 1618033 Jan 18 '13 at 21:38
up vote 11 down vote accepted

Putting $x=a\sin\theta,dx=a\cos\theta d\theta$ and $x=\pm a,\theta=\pm\frac\pi2 $

$$\int_{-a}^{a} \frac{\sqrt{a^2-x^2}}{1+x^2}dx =\int _{-\frac\pi2}^{\frac\pi2}\frac{a^2\cos^2\theta}{1+a^2\sin^2\theta}d\theta$$ $$=\int _{-\frac\pi2}^{\frac\pi2}\frac{a^2\sec^2\theta}{(1+\tan^2\theta)(1+(a^2+1)\tan^2\theta)}d\theta$$ (Diving the numerator & the denominator by $\sec^4\theta$)

$$=\int _{-\infty}^{\infty}\frac{a^2}{(1+t^2)(1+(a^2+1)t^2)}dt$$ (Putting $\tan\theta = t$ as $\tan\theta=\pm\infty, t=\pm\frac\pi2$)

$$=\frac{a^2}{(a^2+1)}\int _{-\infty}^{\infty}\frac{1}{(1+t^2)(\frac1{(a^2+1)}+t^2)}dt$$

$$=\frac{\frac{a^2}{(a^2+1)}}{\left(1-\frac1{1+a^2}\right)}\left(\int _{-\infty}^{\infty}\frac1{(\frac1{(a^2+1)}+t^2)}dt-\int _{-\infty}^{\infty}\frac{1}{(1+t^2)}dt\right)$$ as $\frac1{(c+y)(b+y)}=\frac1{c-b}\frac{(c+y)-(b+y)}{(c+y)(b+y)}=\frac1{c-b}\left(\frac1{y+b}-\frac1{y+c}\right)$

$$=\left(\sqrt{1+a^2}\arctan (t\sqrt{1+a^2} )-\arctan t\right)_{-\infty}^{\infty}$$

So,$$\int_{-a}^{a} \frac{\sqrt{a^2-x^2}}{1+x^2}dx=(\sqrt{1+a^2}-1)\frac\pi2-\left\{-(\sqrt{1+a^2}-1)\frac\pi2\right\}=(\sqrt{1+a^2}-1)\pi$$

Observe that we have put $x=a\sin\theta$ and $\tan\theta = t\implies \left(\frac ax\right)^2- \left(\frac 1t\right)^2=\csc^2\theta-\cot^2\theta=1$

$\implies t^2=\frac{x^2}{a^2-x^2}\iff x^2=\frac{a^2t^2}{1+t^2}, a^2-x^2=\frac{a^2}{1+t^2}$

So, if we straight away take $t=\frac x{\sqrt{a^2-x^2}}$ (assuming $a>0$)


$$\sqrt{a^2-x^2} dx=\frac{(a^2-x^2)^2dt}{a^2}=\frac{a^2dt}{(1+t^2)^2}$$

and if $x=\pm a,t=\frac{\pm a}0=\pm\infty$

So, $$\int_{-a}^{a} \frac{\sqrt{a^2-x^2}}{1+x^2}dx$$ becomes $$\int _{-\infty}^{\infty}\frac{a^2}{(1+t^2)(1+(a^2+1)t^2)}dt$$

share|cite|improve this answer
i thought it was simple integral ... – Santosh Linkha Jan 18 '13 at 20:31
Great answer, thank you! – Guest 86 Jan 18 '13 at 20:50
@Guest86, my pleasure. Hope I could make approach clear. – lab bhattacharjee Jan 19 '13 at 8:06

$\newcommand{\Res}{\operatorname{Res}}$ Since the question was tagged complex-analysis, and nobody has given a solutions with purely complex methods, here goes.

Let $$ f(z) = \frac{(a^2-z^2)^{1/2}}{1+z^2}, $$ where $(a^2-z^2)^{1/2}$ denotes branch that is holomorphic on $\mathbb{C} \setminus [-a,a]$. (See this question for details.)

Next, let $\Gamma$ be a "dog bone" contour together with a large circle:

enter image description here

and integrate $f$ along $\Gamma$. On the "top" part of $[-a,a]$ we get the integral that we want. On the "bottom" part, the square root will pick up a minus sign from the branch cut and another minus sign from the orientation. It's straight forward to check that the integrals over the small circles tend to $0$ as their radii tend to $0$, and the integral over the large circle is basically the residue of $f$ at $\infty$. More precisely, by the residue theorem

\begin{align} 2\int_{-a}^a \frac{\sqrt{a^2-x^2}}{x^2+1}\,dx &= 2\pi i( \Res(f;i) + \Res(f;-i) - \Res(f;\infty)) \\ &= 2\pi i \bigg( \frac{\sqrt{a^2+1}}{2i} + \frac{-\sqrt{a^2+1}}{-2i} + i\bigg) \end{align}

which simplifies to the stated equality. (Note that $\Res(f;\infty) = \Res(-\dfrac1{z^2}f(\dfrac1z);0)$.)

share|cite|improve this answer
What a clean solution! I'm reading up on some of your previous answers, really cool, thanks! =) – Guest 86 Jan 21 '13 at 16:23
@Guest86 happy to help, it's not often that I get a chance to integrate along the cute dog bone contour. Btw, don't forget to upvote answers you find helpful. (Not just mine...) – mrf Jan 21 '13 at 16:46
I've ended up up-voting every single answer here (Just that reading them took me a while) – Guest 86 Jan 21 '13 at 21:43

A slight variant of lab bhattacharjee's method provides a simpler solution:


$$ I(a) = \int_{-a}^{a} \frac{\sqrt{a^2-x^2}}{1+x^2} \, dx = 2\int_{0}^{a} \frac{\sqrt{a^2-x^2}}{1+x^2} \, dx. $$

Then by a simple application of multivariable calculus,

\begin{align*} I'(a) &= 2 \left. \frac{\sqrt{a^2-x^2}}{1+x^2} \right|_{x=a} + 2 \int_{0}^{a} \frac{d}{da} \frac{\sqrt{a^2-x^2}}{1+x^2} \, dx \\ &= 2 \int_{0}^{a} \frac{a}{(1+x^2)\sqrt{a^2-x^2}} \, dx. \end{align*}

Then with the change of variable $x = a \sin\theta$, we have

\begin{align*} I'(a) &= 2 \int_{0}^{\frac{\pi}{2}} \frac{a}{1+a^2\sin^2\theta} \, d\theta \\ &= 2 \int_{0}^{\frac{\pi}{2}} \frac{a \sec^2\theta}{1+(a^2+1)\tan^2\theta} \, d\theta \\ &= 2 \int_{0}^{\infty} \frac{a}{1+(a^2+1)t^2} \, dt \qquad (t = \tan\theta) \\ &= \frac{\pi a}{\sqrt{a^2+1}}. \end{align*}

Thus by integrating, we must have

$$ I(a) = \pi\sqrt{a^2+1} + C $$

for some constant $C$. But

$$ I(0+) = \lim_{a\to0} \int_{-a}^{a} \frac{\sqrt{a^2-x^2}}{1+x^2} \, dx = \lim_{a\to0} \int_{-1}^{1} \frac{\sqrt{1-x^2}}{(1/a)^2+x^2} \, dx = 0 $$

and we must have $C = -\pi$. This proves the identity.

share|cite|improve this answer

Let $x = a \sin(y)$. Then we have $$\dfrac{\sqrt{a^2-x^2}}{1+x^2} dx = \dfrac{a^2 \cos^2(y)}{1+a^2 \sin^2(y)} dy $$ Hence, $$I = \int_{-a}^{a}\dfrac{\sqrt{a^2-x^2}}{1+x^2} dx = \int_{-\pi/2}^{\pi/2} \dfrac{a^2 \cos^2(y)}{1+a^2 \sin^2(y)} dy $$ Hence, $$I + \pi = \int_{-\pi/2}^{\pi/2} \dfrac{a^2 \cos^2(y)}{1+a^2 \sin^2(y)} dy + \int_{-\pi/2}^{\pi/2} dy = \int_{-\pi/2}^{\pi/2} \dfrac{1+a^2}{1+a^2 \sin^2(y)} dy\\ = \dfrac{1+a^2}2 \int_0^{2 \pi} \dfrac{dy}{1+a^2 \sin^2(y)}$$ Now $$\int_0^{2 \pi} \dfrac{dy}{1+a^2 \sin^2(y)} = \oint_{|z| = 1} \dfrac{dz}{iz \left(1 + a^2 \left(\dfrac{z-\dfrac1z}{2i}\right)^2 \right)} = \oint_{|z| = 1} \dfrac{4z^2 dz}{iz \left(4z^2 - a^2 \left(z^2-1\right)^2 \right)}$$ $$\oint_{|z| = 1} \dfrac{4z^2 dz}{iz \left(4z^2 - a^2 \left(z^2-1\right)^2 \right)} = \oint_{|z| = 1} \dfrac{4z dz}{i(2z + a(z^2-1))(2z - a(z^2-1))}$$ Now $$ \dfrac{4z}{(2z + a(z^2-1))(2z - a(z^2-1))} = \dfrac1{az^2 - a + 2z} - \dfrac1{az^2 - a - 2z}$$ $$\oint_{\vert z \vert = 1} \dfrac{dz}{az^2 - a + 2z} = \oint_{\vert z \vert = 1} \dfrac{dz}{a \left(z + \dfrac{1 + \sqrt{1+a^2}}a\right) \left(z + \dfrac{1 - \sqrt{1+a^2}}a\right)} = \dfrac{2 \pi i}{2 \sqrt{1+a^2}}$$ $$\oint_{\vert z \vert = 1} \dfrac{dz}{az^2 - a - 2z} = \oint_{\vert z \vert = 1} \dfrac{dz}{a \left(z - \dfrac{1 + \sqrt{1+a^2}}a\right) \left(z - \dfrac{1 - \sqrt{1+a^2}}a\right)} = -\dfrac{2 \pi i}{2 \sqrt{1+a^2}}$$ Hence, $$\oint_{|z| = 1} \dfrac{4z dz}{i(2z + a(z^2-1))(2z - a(z^2-1))} = \dfrac{2 \pi i}i \dfrac1{\sqrt{1+a^2}} = \dfrac{2 \pi}{\sqrt{1+a^2}}$$ Hence, we get that $$I + \pi = \left(\dfrac{1+a^2}2\right) \dfrac{2 \pi}{\sqrt{1+a^2}} = \pi \sqrt{1+a^2}$$ Hence, we get that $$I = \pi \left(\sqrt{1+a^2} - 1 \right)$$

share|cite|improve this answer
Funny how the y'=2y+pi took me a while to get... The +pi idea was very cool! :D I wish I could up-vote this solution... – Guest 86 Jan 18 '13 at 21:07
@Marvis: here is an alternative to the integral where you employed complex analysis: $\frac{4}{(a^2+1)\cos^2 y}\int_0^{\pi/2} \frac{\mathrm{dy}}{\tan^2(y)+1/(a^2+1)} =\frac{4}{(a^2+1) }\int_0^{\infty} \frac{\mathrm{du}}{u^2+(\sqrt{1/(a^2+1)})^2}= \left[\frac{4\sqrt{a^2+1}}{a^2+1} \arctan(\sqrt{a^2+1} u)\right]_0^{\infty}=\frac{2\pi}{\sqrt{a^2+1}}$ – user 1618033 Jan 18 '13 at 21:27
@Chris'ssister Ah, yes. I realized there must be some nice trick like this but used the work-horse for such problems(complex analysis). Thanks. – user17762 Jan 18 '13 at 21:31

You can also convert it into an integral over the upper half-disk $D_a$ of radius $a$: $$\int_{D_a} {1 \over 1 + x^2}\,dy\,dx$$ (Do the $y$ integral first to convert it into the original form.) Since the integrand is even, it is twice the integral over the portion where $x > 0$. Changing to polar coordinates, this becomes $$2\int_0^a \int_0^{\pi \over 2} {r \over 1 + r^2\cos^2(\theta)}\,d\theta\,dr$$ $$= 2\int_0^a r \int_0^{\pi\over 2} {\sec^2(\theta) \over \sec^2(\theta) + r^2}\,d\theta\,dr$$ $$= 2\int_0^a r \int_0^{\pi\over 2} {\sec^2(\theta) \over \tan^2(\theta) + (1 + r^2)}\,d\theta\,dr$$ Doing a $u$ substitution this becomes $$= 2\int_0^a r \int_0^{\infty} {1 \over u^2 + (1 + r^2)}\,du\,dr$$ $$= 2\pi\int_0^a r {1 \over \sqrt{1 + r^2}}\,dr$$ $$=\pi \sqrt{1 + r^2}\,\,\,\bigg|_{r = 0}^{r = a}$$ $$=\pi\sqrt{1 + a^2} - \pi$$

share|cite|improve this answer
Interesting idea, Thanks! Several answers used the 1/cos^2 trick, is it a well known thing? (There's an unneeded 2 in the last integral expression) – Guest 86 Jan 21 '13 at 21:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.