I was given an interesting math problem on a post-it note recently. The setup is pictured below: two circles (of radius r) are inscribed within a 2r×r rectangle. I’ve chosen, without loss of generality, r=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×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
We’ve got a couple things to do, namely identifying the relevant curve f(x) and the relevant domain [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 r centered at (h,k):
(x−h)2+(y−k)2=r2
Let’s call the convex red circle C1 and the concave green circle C2. We can then write the equations for each as:
C1:(x−r)2+y2=r2{y≥0}C2:(x−r)2+(y−r)2=r2{y≤r}
Here, I arbitrarily chose to center the circles at (r,0) and (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 x-axis, which to me feels much easier than integrating over the y-axis. Let’s also use some handwavy symmetry to reduce the problem to a single curve C3, recognizing that the two curves are reflections of each other across the y-axis at y=2r. So at a highlevel, we can integrate over the curve C3 from x=0 to x=2r and then double the result.
The relevant curve to integrate is then:
C3:(x−2r)2+(y−r)2=r2{0≤x≤2r}
You’ll notice something odd here; the curve fails the vertical line test and is thus not a function i.e. there are two y-values for the same x-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+ and C3−, where C3+ is the part of the curve that is above y=2r and C3− is the part of the curve that is below it.
We can conveniently discard C3+ by solving C3 for y and then taking the positive root.
f(x)=r−r2−(x−2r)2{0≤x≤2r}
Whose domain of integration is then:
[0,2r]
The area of the shaded region is then twice the integral of f(x) over the domain:
Ok, phew, that was a lot of work. But we’ve got the answer, which unsurprisingly3 is quadratic in r.
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 R3, 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 C1 “cropped” by the bounding box B given by 2r×2r. So,
Area=Area of B−Area of Ccropped
The area of B is trivial: 2r⋅2r=r2. But how the heck do we find the area of Ccropped? Once again, we must R3. That cropped circle is nothing more than a semicircle of radius r centered at (r,r) “cropped” by the bounding box B
Here’s a new picture. The sector given by ABC contains the portion of the semicircle that we want to exclude from the area of Ccropped, more specifically, the chord AB. 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 C1−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 ABC−Area of triangle ABC
The area of the sector is fairly simple to inuit. A circle’s area is πr2. The sector spans θ radians, where θ is the angle between the two radii. Given that a circle is 360∘ or 2π 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=21r2θ
The area of of our (isosceles) triangle is also fairly simple to intuit. The base is some a≤r and the height is some h<r. It is obtaining a and h that is the tricky part.
We can use a combination of the Pythagorean theorem and trigonometry to obtain these quantities.
h=rcos(2θ)=214r2−a2a=2rsin(2θ)=2r2−h2
Given that the expression above are given in terms of θ, let’s use the equation for the area of a triangle with sides r in terms of θ:
Area of triangle ABC=21r2sin(θ)
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=21r2θ−21r2sin(θ)=21r2(θ−sin(θ))
Note that the arc length of the sector is s=rθ, and so θ=rs (important to emphasize that this is the angle in radians). What then is sinθ?
sin(2θ)=2ra⇒sin(θ)=racos(2θ)
We get the second part via the double angle identity which states that
sin(θ)=2sin(2θ)cos(2θ)
We can now proceed with (11) using (7):
Area of chord AC=21r2(rs−racos(2θ))=21r2(rs−r2ah)=21r2(rs−2r2a4r2−a2)
We pause here to think through getting an expression for s. The triangle we are dealing with is isosceles, and so the angle between the two radii is θ. As we’ve noted, the arc length s of the sector is then s=rθ. What is also true is that
θ=2arccos(rh)⇒s=2rarccos(rh)
Continuing again, now being careful to eventually substitute a and h:
Area of chord AC=21r2(r2rarccos(rh)−2r2a4r2−a2)=21r2(2arccos(rh)−2r2a4r2−a2)=r2arccos(rh)−41a4r2−a2=r2arccos(rh)−hr2−h2
The cropped circle’s area is then:
Area of Ccropped=Area of semicircle C1−Area of chord AC=21πr2−(r2arccos(rh)−hr2−h2)=21πr2−r2arccos(rh)+hr2−h2
And our area of interest is then:
Area=Area of B−Area of Ccropped=r2−(21πr2−r2arccos(rh)+hr2−h2)=r2(1−2π+arccos(rh))−hr2−h2
Recognizing in our setup that h=2r we get our final answer:
And there we have it, two different approaches to the same problem.
Footnotes
Desmos is a great tool for visualizing and manipulating mathematical functions. You can find my Desmos file here. ↩
See Wikipedia for a list of integrals of irrational functions. ↩
I say “unsurprisingly” because area is a two-dimensional quantity which measures surface. Given that every length in our problem is defined in r, any area we calculate must then be proportional to r2. ↩
The area of the two right-angled triangles is 2dr where d is the “height” of the triangle, where d<r. ↩