I was given an interesting math problem on a post-it note recently. The setup is pictured below: two circles (of radius rr) are inscribed within a 2r×r2r \times r rectangle. I’ve chosen, without loss of generality, r=1r = 1.

The goal is to find the total area of the shaded region, which is the curved, sloping triangle to either side of the circles. This can be considered to be the complement of the union in area of the two circles (within the universe of the 2r×r2r \times r rectangle).

There are two approaches to this problem: (1) numerical integration, and (2) geometric decomposition. I’ll set out to show each, starting first with the numerical integration.

Numerical Integration

If we take ourselves back to grade school, we know that we can compute the area of a shape by counting the number of unit squares that it covers. As we grow a little older—and hopefully a little wiser—we learn that we can more accurately compute the area of a shape by integrating the function that describes the shape over the relevant domain.

Area=abf(x) dx\text{Area} = \int_{a}^{b} f(x) \ dx

We’ve got a couple things to do, namely identifying the relevant curve f(x)f(x) and the relevant domain [a,b][a, b]. To start, let’s model the relevant curves as mathematical functions1. Since, we’re given that these are circles, we can recall the standard equation for a circle of radius rr centered at (h,k)(h, k):

(xh)2+(yk)2=r2\left(x-h\right)^{2}+\left(y-k\right)^{2}=r^{2}

Let’s call the convex red circle C1C_1 and the concave green circle C2C_2. We can then write the equations for each as:

C1:(xr)2+y2=r2 {y  0}C_1: \left(x-r\right)^{2}+y^{2}=r^{2}\ \left\{y\ \ge\ 0\right\} C2:(xr)2+(yr)2=r2 {yr}C_2: \left(x-r\right)^{2}+\left(y-r\right)^{2}=r^{2}\ \left\{y\le r\right\}

Here, I arbitrarily chose to center the circles at (r,0)(r, 0) and (r,r)(r, r), respectively. This is not a requirement, but it makes the equations simpler without changing the problem.

Let’s be smart as to how we’ll integrate. Let’s rotate the problem 90 degrees counter-clockwise. This will allow us to integrate over the xx-axis, which to me feels much easier than integrating over the yy-axis. Let’s also use some handwavy symmetry to reduce the problem to a single curve C3C_3, recognizing that the two curves are reflections of each other across the yy-axis at y=r2y=\frac{r}{2}. So at a highlevel, we can integrate over the curve C3C_3 from x=0x=0 to x=r2x=\frac{r}{2} and then double the result.

The relevant curve to integrate is then:

C3:(xr2)2+(yr)2=r2 {0xr2}C_3: \left(x-\frac{r}{2}\right)^{2}+\left(y-r\right)^{2}=r^{2}\ \left\{0\le x\le \frac{r}{2}\right\}

You’ll notice something odd here; the curve fails the vertical line test and is thus not a function i.e. there are two yy-values for the same xx-value. This is a problem, as we can’t integrate a non-function.

To get around this, we can split the curve into two parts, C3+C_3^+ and C3C_3^-, where C3+C_3^+ is the part of the curve that is above y=r2y=\frac{r}{2} and C3C_3^- is the part of the curve that is below it.

We can conveniently discard C3+C_3^+ by solving C3C_3 for yy and then taking the positive root.

f(x)=rr2(xr2)2 {0xr2}f(x) = r - \sqrt{r^2 - \left(x-\frac{r}{2}\right)^2}\ \left\{0\le x\le \frac{r}{2}\right\}

Whose domain of integration is then:

[0,r2][0, \frac{r}{2}]

The area of the shaded region is then twice the integral of f(x)f(x) over the domain:

Area=20r2(rr2(xr2)2) dx=2[0r2r dx0r2r2(xr2)2 dx]=2[r220r2r2(xr2)2 dx]\begin{align} \text{Area} &= 2\int_{0}^{\frac{r}{2}} \left(r - \sqrt{r^2 - \left(x-\frac{r}{2}\right)^2}\right) \ dx \\ &= 2\left[\int_{0}^{\frac{r}{2}} r \ dx - \int_{0}^{\frac{r}{2}} \sqrt{r^2 - \left(x-\frac{r}{2}\right)^2} \ dx\right] \\ &= 2\left[\frac{r^2}{2} - \int_{0}^{\frac{r}{2}} \sqrt{r^2 - \left(x-\frac{r}{2}\right)^2} \ dx\right] \end{align}

The integral within (3)(3) is conveniently in the form u=a2x2u = \sqrt{a^2 - x^2} which has the following solution2

a2x2 dx=x2a2x2+a22arcsin(xa)+C\int \sqrt{a^2 - x^2} \ dx = \frac{x}{2} \sqrt{a^2 - x^2} + \frac{a^2}{2} \arcsin\left(\frac{x}{a}\right) + C

We can then use this to solve the integral within (3)(3):

0r2r2(xr2)2 dx=12(xr2)r2(xr2)2+r22arcsin(xr2r)0r2=[0][123r24+r22arcsin(12)]=r22(arcsin(12)34)\begin{align*} \int_{0}^{\frac{r}{2}} \sqrt{r^2 - \left(x-\frac{r}{2}\right)^2} \ dx &= \frac{1}{2}\left(x - \frac{r}{2}\right) \sqrt{r^2 - \left(x-\frac{r}{2}\right)^2} + \frac{r^2}{2} \arcsin\left(\frac{x-\frac{r}{2}}{r}\right) \bigg|_{0}^{\frac{r}{2}} \\ &= \left[0\right] - \left[-\frac{1}{2}\frac{\sqrt{3}r^2}{4} + \frac{r^2}{2}\arcsin\left(-\frac{1}{2}\right)\right] \\ &= -\frac{r^2}{2}\left(\arcsin\left(-\frac{1}{2}\right) - \frac{\sqrt{3}}{4}\right) \\ \end{align*}

Putting it all together, we can continue with (3)(3):

Area=2[r22+r22(arcsin(12)34)]=2[r22(134arcsin(12))]=r2(134arcsin(12)) \begin{align} \text{Area} &= 2\left[\frac{r^2}{2} + \frac{r^2}{2}\left(\arcsin\left(-\frac{1}{2}\right) - \frac{\sqrt{3}}{4}\right)\right] \\ &= 2\left[\frac{r^2}{2}\left(1 - \frac{\sqrt{3}}{4} - \arcsin\left(\frac{1}{2}\right)\right)\right] \\ &= r^2\left(1 - \frac{\sqrt{3}}{4} - \arcsin\left(\frac{1}{2}\right)\right) \ \square\\ \end{align}

Ok, phew, that was a lot of work. But we’ve got the answer, which unsurprisingly3 is quadratic in rr.

We can sanity check our answer in a couple ways, e.g. by “counting the squares” or by approximating the curve of interest as two right-angled triangles, obtaining the area, and treating that as an upper bound on the area of the shaded region4.

Let’s now turn to the geometric reasoning and see if was can get the same answer.

Geometric Decomposition

Geometry has never been my strong suit. Disclaimer aside, let’s begin.

As is often the case in math, we must R3R3, that is reject, reframe, and reduce5 the problem. Here we start with a slightly different picture of the same setup:

It’s an ugly picture but gets the point across. The key insight is that our desired area is the complement of C1C_1 “cropped” by the bounding box BB given by 2r×r22r \times \frac{r}{2}. So,

Area=Area of BArea of Ccropped\text{Area} = \text{Area of } B - \text{Area of } C_{cropped}

The area of BB is trivial: 2rr2=r22r \cdot \frac{r}{2} = r^2. But how the heck do we find the area of CcroppedC_{cropped}? Once again, we must R3R3. That cropped circle is nothing more than a semicircle of radius rr centered at (r,r)(r, r) “cropped” by the bounding box BB

Here’s a new picture. The sector given by ABCABC contains the portion of the semicircle that we want to exclude from the area of CcroppedC_{cropped}, more specifically, the chord ABAB. Remember that a chord of a circle is a line segment that connects two points on the circle’s circumference. The longest chord in a circle being its diameter, which passes through the center of the circle.

So then,

Area of Ccropped=Area of semicircle C1Area of chord AC\text{Area of } C_{cropped} = \text{Area of semicircle } C_1 - \text{Area of chord } AC

It doesn’t end there however. While the area of the semicircle is trivial, the area of the chord is not.

Area of chord AC=Area of sector ABCArea of triangle ABC\text{Area of chord } AC = \text{Area of sector } ABC - \text{Area of triangle } ABC

The area of the sector is fairly simple to inuit. A circle’s area is πr2\pi r^2. The sector spans θ\theta radians, where θ\theta is the angle between the two radii. Given that a circle is 360360^\circ or 2π2\pi radians, the area of the sector is then the fraction of the circle’s area that the sector spans and so:

Area of sector ABC=12r2θ\text{Area of sector } ABC = \frac{1}{2} r^2 \theta

The area of of our (isosceles) triangle is also fairly simple to intuit. The base is some ara \leq r and the height is some h<rh < r. It is obtaining aa and hh that is the tricky part.

We can use a combination of the Pythagorean theorem and trigonometry to obtain these quantities.

h=rcos(θ2)=124r2a2\begin{align} h &= r \cos\left(\frac{\theta}{2}\right) \\ &= \frac{1}{2} \sqrt{4r^2 - a^2} \\ \end{align} a=2rsin(θ2)=2r2h2\begin{align} a &= 2r \sin\left(\frac{\theta}{2}\right) \\ &= 2 \sqrt{r^2 - h^2} \\ \end{align}

Given that the expression above are given in terms of θ\theta, let’s use the equation for the area of a triangle with sides rr in terms of θ\theta:

Area of triangle ABC=12r2sin(θ)\text{Area of triangle } ABC = \frac{1}{2} r^2 \sin\left(\theta\right)

We can then use this to obtain the area of the chord using the expression we obtained above relating the area of the chord with the area of the sector and the area of the triangle:

Area of chord AC=12r2θ12r2sin(θ)=12r2(θsin(θ))\begin{align} \text{Area of chord } AC &= \frac{1}{2} r^2 \theta - \frac{1}{2} r^2 \sin\left(\theta\right) \\ &= \frac{1}{2} r^2 \left(\theta - \sin\left(\theta\right)\right) \\ \end{align}

Note that the arc length of the sector is s=rθs = r\theta, and so θ=sr\theta = \frac{s}{r} (important to emphasize that this is the angle in radians). What then is sinθ\sin\theta?

sin(θ2)=a2rsin(θ)=arcos(θ2)\sin\left( \frac{\theta}{2}\right) = \frac{a}{2r} \Rightarrow \sin\left(\theta\right) = \frac{a}{r} \cos\left(\frac{\theta}{2}\right)

We get the second part via the double angle identity which states that

sin(θ)=2sin(θ2)cos(θ2)\sin\left(\theta\right) = 2 \sin\left(\frac{\theta}{2}\right) \cos\left(\frac{\theta}{2}\right)

We can now proceed with (11)(11) using (7)(7):

Area of chord AC=12r2(srarcos(θ2))=12r2(srahr2)=12r2(sra2r24r2a2)\begin{align} \text{Area of chord } AC &= \frac{1}{2} r^2 \left(\frac{s}{r} - \frac{a}{r} \cos\left(\frac{\theta}{2}\right)\right) \\ &= \frac{1}{2} r^2 \left( \frac{s}{r} - \frac{ah}{r^2}\right) \\ &= \frac{1}{2} r^2 \left( \frac{s}{r} - \frac{a}{2r^2} \sqrt{4r^2 - a^2} \right) \\ \end{align}

We pause here to think through getting an expression for ss. The triangle we are dealing with is isosceles, and so the angle between the two radii is θ\theta. As we’ve noted, the arc length ss of the sector is then s=rθs = r\theta. What is also true is that

θ=2arccos(hr)s=2rarccos(hr)\theta = 2\arccos\left(\frac{h}{r}\right) \Rightarrow s = 2r\arccos\left(\frac{h}{r}\right)

Continuing again, now being careful to eventually substitute aa and hh:

Area of chord AC=12r2(2rarccos(hr)ra2r24r2a2)=12r2(2arccos(hr)a2r24r2a2)=r2arccos(hr)14a4r2a2=r2arccos(hr)hr2h2\begin{align} \text{Area of chord } AC &= \frac{1}{2} r^2 \left( \frac{2r\arccos\left(\frac{h}{r}\right)}{r} - \frac{a}{2r^2} \sqrt{4r^2 - a^2} \right) \\ &= \frac{1}{2} r^2 \left( 2\arccos\left(\frac{h}{r}\right) - \frac{a}{2r^2} \sqrt{4r^2 - a^2} \right) \\ &= r^2\arccos\left(\frac{h}{r}\right) - \frac{1}{4} a \sqrt{4r^2 - a^2} \\ &= r^2\arccos\left(\frac{h}{r}\right) - h\sqrt{r^2 - h^2} \\ \end{align}

The cropped circle’s area is then:

Area of Ccropped=Area of semicircle C1Area of chord AC=12πr2(r2arccos(hr)hr2h2)=12πr2r2arccos(hr)+hr2h2\begin{align} \text{Area of } C_{cropped} &= \text{Area of semicircle } C_1 - \text{Area of chord } AC \\ &= \frac{1}{2} \pi r^2 - \left(r^2\arccos\left(\frac{h}{r}\right) - h\sqrt{r^2 - h^2}\right) \\ &= \frac{1}{2} \pi r^2 - r^2\arccos\left(\frac{h}{r}\right) + h\sqrt{r^2 - h^2} \\ \end{align}

And our area of interest is then:

Area=Area of BArea of Ccropped=r2(12πr2r2arccos(hr)+hr2h2)=r2(1π2+arccos(hr))hr2h2\begin{align} \text{Area} &= \text{Area of } B - \text{Area of } C_{cropped} \\ &= r^2 - \left(\frac{1}{2} \pi r^2 - r^2\arccos\left(\frac{h}{r}\right) + h\sqrt{r^2 - h^2}\right) \\ &= r^2\left(1 - \frac{\pi}{2} + \arccos\left(\frac{h}{r}\right)\right) - h\sqrt{r^2 - h^2}\\ \end{align}

Recognizing in our setup that h=r2h = \frac{r}{2} we get our final answer:

Area=r2(1π2+arccos(12))r2r2(r2)2=r2(1π2+arccos(12))3r24\begin{align} \text{Area} &= r^2\left(1 - \frac{\pi}{2} + \arccos\left(\frac{1}{2}\right)\right) - \frac{r}{2}\sqrt{r^2 - \left(\frac{r}{2}\right)^2} \\ &= r^2\left(1 - \frac{\pi}{2} + \arccos\left(\frac{1}{2}\right)\right) - \frac{\sqrt{3}r^2}{4} \end{align}

Which is really just (6)(6) in disguise! And we can see this by using the fact that

arcsinx+arccosx=π2arccosx=π2arcsinx\arcsin x + \arccos x = \frac{\pi}{2} \Rightarrow \arccos x = \frac{\pi}{2} - \arcsin x Area=r2(134arcsin(12))\text{Area} = r^2\left(1 - \frac{\sqrt{3}}{4} - \arcsin\left(\frac{1}{2}\right)\right) \square

Conclusion

And there we have it, two different approaches to the same problem.

Footnotes

  1. Desmos is a great tool for visualizing and manipulating mathematical functions. You can find my Desmos file here.

  2. See Wikipedia for a list of integrals of irrational functions.

  3. I say “unsurprisingly” because area is a two-dimensional quantity which measures surface. Given that every length in our problem is defined in rr, any area we calculate must then be proportional to r2r^2.

  4. The area of the two right-angled triangles is dr2\frac{dr}{2} where dd is the “height” of the triangle, where d<rd < r.

  5. In the same spirit as “gaslight, gatekeep, girlboss”.