# compute the following integral $\int^{a}_{-a} \sqrt{a^2-x^2}dx$

I have to compute the following integral: $\int^{a}_{-a} \sqrt{a^2-x^2}dx$ I did the substitution: $x=a\sin\theta$ so $dx=a\cos\theta d\theta$. The boundaries becomes $\pi/2+2k\pi$ and $-\pi/2-2k\pi$. So: $\int^{\pi/2+2k\pi}_{-\pi/2-2k\pi} a^2\cos^2\theta d\theta$ becomes the integral. My question is whether I am doing it correct. Thanks.

-
Let the limits be $\,-\pi/2\,,\,\pi/2\,$ . No need to add multiples of $\,2\pi\,$. It looks fine until the last "So", as you seem to have forgotten one $\,\cos\theta\,$ inside that integral – DonAntonio Dec 17 '12 at 19:17
(1) Use $k=0$. (ii) I would almost automatically observe that by symmetry we want $2\int_0^a \sqrt{a^2-x^2}\,dx$. But I am allergic to negative numbers. (3) We don't need to integrate, the original is half the area of a circle. (4) If we integrate, want $\cos^2\theta$. – André Nicolas Dec 17 '12 at 19:17
The $2k\pi$ stuff is very wrong. It would be OK (but not a good idea) to write $-\frac{\pi}{2}+2k\pi$ to $\frac{\pi}{2}+2k\pi$. – André Nicolas Dec 17 '12 at 19:26

Let $I=\int\sqrt{a^2-x^2}dx=\sqrt{a^2-x^2}\int dx-\int\left(\frac{\sqrt{a^2-x^2}}{dx}\int dx\right)dx$

$=x\sqrt{a^2-x^2}-\int\left(\frac{(-2x)x}{2\sqrt{a^2-x^2}}\right)dx$

$=x\sqrt{a^2-x^2}-\int\left(\frac{(a^2-x^2-a^2)}{\sqrt{a^2-x^2}}\right)dx$

$=x\sqrt{a^2-x^2}-\int \sqrt{a^2-x^2}dx +a^2\int\frac{dx}{\sqrt{a^2-x^2}}$

$=x\sqrt{a^2-x^2}-I +a|a|\arcsin\frac xa+C$ where $C$ is the indefinite constant for indefinite integration.

Or, $I=\frac{x\sqrt{a^2-x^2}}2+\frac{a|a|}2\arcsin\frac xa+\frac C2$

So, $$\int^{a}_{-a} \sqrt{a^2-x^2}dx=(\frac{x\sqrt{a^2-x^2}}2+\frac{a|a|}2\arcsin\frac xa+C)\mid_{-a}^a=\frac{a|a|}2\{ \arcsin1-\arcsin(-1)\}$$

$$=\frac{a|a|}2\{\frac\pi2-(-\frac\pi2)\}=\frac{\pi a|a|}2$$

Alternatively,

taking $a>0,x=a\sin \theta,dx=a\cos \theta d\theta$

and $\sqrt{a^2-x^2}=|a|\cos \theta=a\cos \theta$ as $a>0$

$$\int^{a}_{-a} \sqrt{a^2-x^2}dx=\int^{\pi/2+2k\pi}_{-\pi/2+2k\pi} (a\cos\theta)^2 d\theta=\frac{a^2}2\int^{\pi/2+2k\pi}_{-\pi/2+2k\pi}(1+\cos2\theta)d\theta$$

$$=\frac{a^2}2(\theta+\frac{\sin2\theta}2)\mid_{-\pi/2+2k\pi}^{\pi/2+2k\pi}$$

$$=\frac{a^2}2\{\frac \pi 2+2k\pi-(-\frac \pi2+2k\pi)\}+\frac{a^2}4(\sin(4k+1)\pi-\sin(4k-1)\pi)=\frac{\pi a^2}2$$

-
this is clear, thanks – Badshah Dec 17 '12 at 19:20
We cannot conclude that $\sqrt{a^2\cos^2\theta}=a\cos\theta$ without more information. – Cameron Buie Dec 17 '12 at 19:30
@CameronBuie, could you please look into the alternative approach? The result does not include modulus. – lab bhattacharjee Dec 18 '12 at 17:43
That works better. – Cameron Buie Dec 18 '12 at 17:51
@CameronBuie, but according to your method, the answer is $a|a|\frac\pi 2?$ – lab bhattacharjee Dec 18 '12 at 17:52

You can also observe that the integral represents an area you know.

The equation $y=\sqrt{a^2-x^2}$ can be rewritten as

$$x^2+y^2=a^2 \,;\, y \geq 0$$

-
(+1): A good alternative approach, avoiding problems of calculation. – Cameron Buie Jan 26 '13 at 17:26

Not quite, but you're close. Observe that with that substitution, we have $$\sqrt{a^2-x^2}=|a|\sqrt{1-\sin^2\theta}=|a|\sqrt{\cos^2\theta}=|a||\cos\theta|,$$ so we have $$\int_{-a}^a\sqrt{a^2-x^2}\,dx=a|a|\int_{-2\pi k-\pi/2}^{2\pi k+\pi/2}|\cos\theta|\cos\theta\,d\theta.$$ This isn't very nice, though, since we'd need to split this up over the intervals where $\cos\theta$ is positive and where it's negative to get a convenient integrand.

Now, if instead we let $x=a\sin\theta$ where $\theta$ simply varies from $-\pi/2$ to $\pi/2$, then $|\cos\theta|=\cos\theta$, so $|\cos\theta|\cos\theta=\cos^2\theta=\frac12\bigl(1+\cos(2\theta)\bigr)$, so we get $$\int_{-a}^a\sqrt{a^2-x^2}\,dx=\frac{a|a|}2\int_{-\pi/2}^{\pi/2}1+\cos(2\theta)\,d\theta,$$ which is far easier to deal with. (As for the absolute value around the $a$, we'll deal with that according to the sign of $a$.)

-