Another Obvious Offshoot

Let’s see if we can continue our Obvious Integral Spree. We’re going to calculate the area of a circle by integration.
Here we have a circle. It has radius r and can be described as f(x,y):x^2+y^2=r^2. From that we infer that y=\pm\sqrt{r^2-x^2}.

As all four sectors of the circle are equal, we just take the integral for the first quadrant, then multiply it by 4.
As area is positive we get

    \[4\int_0^r\sqrt{r^2-x^2}\mathrm{d}x\]

That won’t work, (if you must know) that leads us to

    \[4\left[r^2\left(\frac{x^2\sqrt{1-\tfrac{r^2}{x^2}}}{2r^2}-\tfrac{1}{2}\ln\left(\frac{x\sqrt{1-\tfrac{r^2}{x^2}}}{r}+\frac{x}{r}\right)\right)\right]_0^r\]

save for calculation errors; and we will end up with multiple divisions by zero and \ln(0) as an encore.

Let’s look at the circle again. There’s another way to describe y and x, because we know that x=r\cos\theta and y=r\sin\theta. We can rewrite r^2-x^2 as r^2-(r^2\cos^2\theta)=r^2(1-cos^2\theta). As we remember that \sin^2+\cos^2\equiv 1 we end up with r^2-x^2=r^2\sin^2\theta. Now we can take the square root and substitute back:

    \[4\int_0^r r\sin\theta\mathrm{d}x\]

Now we need to know how to integrate with respect to \theta:

    \[x=r\cos\theta\]

thus

    \[\frac{\mathrm{d}x}{\mathrm{d}\theta}=-r\sin\theta\]

or

    \[\mathrm{d}x=-r\sin\theta\mathrm{d}\theta\]

There we are.
We also have to realize that evaluating the integral with x from 0 to r will now lead us to another interval.
As x=r\cos\theta evaluating from 0 to r now means evaluating from r\cos\theta=0 to r\cos\theta=r or \cos\theta=0 to \cos\theta=1 which is from \tfrac{\pi}{2} to 0.

So now we can rewrite the integral as follows:

    \[4\int_{\tfrac{\pi}{2}}^0 r\sin\theta\cdot -r\sin\theta\mathrm{d}\theta\]

or

    \[4\int_{\tfrac{\pi}{2}}^0 -r^2\sin^2\theta\mathrm{d}\theta\]

Factor out the constant,

    \[-4r^2\int_{\tfrac{\pi}{2}}^0\sin^2\theta\mathrm{d}\theta\]

Next problem is finding the primitive function of \sin^2\theta. But we remember (I hope so) that

    \[\cos(h+i)=\cos(h)\cos(i)-\sin(h)\sin(i)\]

and if h=i=\theta we get

    \[\cos^2\theta-\sin^2\theta=\cos(2\theta)\]

or

    \[\cos^2\theta+\sin^2\theta=\cos(2\theta)+2\sin^2\theta\]

or

    \[1=\cos(2\theta)+2\sin^2\theta\]

leading to

    \[\sin^2\theta=\tfrac{1}{2}-\tfrac{1}{2}\cos(2\theta)\]

Where were we? O, yes, let’s substitute:

    \[-4r^2\int_{\tfrac{\pi}{2}}^0\tfrac{1}{2}-\tfrac{1}{2}\cos(2\theta)\mathrm{d}\theta\]

Out with the constant

    \[-2r^2\int_{\tfrac{\pi}{2}}^0 1-\cos(2\theta)\mathrm{d}\theta\]

and we finally get to

    \[-2r^2\left[\theta-\frac{sin(2\theta)}{2}\right]_{\tfrac{\pi}{2}}^0\]

    \[-2r^2(0-\tfrac{\pi}{2})=\pi r^2\]

And with that we’re done.