I'm a geometry student. Recently we were doing all kinds of crazy circle stuff, and it occurred to me that I don't know why $\pi r^2$ is the area of a circle. I mean, how do I really know that's true, aside from just taking my teachers + books at their word?
So I tried to derive the formula myself. My strategy was to fill a circle with little squares. But I couldn't figure out how to generate successively smaller squares in the right spots. So instead I decided to graph just one quadrant of the circle (since all four quadrants are identical, I can get the area of the easy +x, +y quadrant and multiply the result by 4 at the end) and put little rectangles along the curve of the circle. The more rectangles I put, the closer I get to the correct area. If you graph it out, my idea looks like this:
Okay, so to try this in practice I used a Python script (less tedious):
from math import sqrt, pi # explain algo of finding top right quadrant area # thing with graphics via a notebook # Based on Pythagorean circle function (based on r = x**2 + y**2) def circle_y(radius, x): return sqrt(radius**2 - x**2) def circleAreaApprox(radius, rectangles): area_approx = 0 little_rectangles_width = 1 / rectangles * radius for i in range(rectangles): x = radius / rectangles * i little_rectangle_height = circle_y(radius, x) area_approx += little_rectangle_height * little_rectangles_width return area_approx * 4
This works. The more rectangles I put, the wrongness of my estimate goes down and down:
for i in range(3): rectangles = 6 * 10 ** i delta = circleAreaApprox(1, rectangles) - pi # For a unit circle area: pi * 1 ** 2 == pi print(delta)
0.25372370203838557 0.030804314363409357 0.0032533219749364406
Even if you test with big numbers, it just gets closer and closer forever. Infinitely small rectangles
circleAreaApprox(1, infinity) is presumably the true area. But I can't calculate that, because I'd have to loop forever, and that's too much time. How do I calculate the 'limit' of a for loop?
Ideally, in an intuitive way. I want to reduce the magic and really understand this, not 'solve' this by piling on more magic techniques (like the $\pi \times radius^2$ formula that made me curious in the first place).