Area of square reduced to circle.

329 Views Asked by At

There is a method to calculate area of a circle by inscribing the circle into a square and filling the edges outside the circle with squares. The area of the circle will be area of square minus area of all the squares that can be inscribed in the little area in the edges outside the circle. This will give a convergent series which sum up to $\pi r^2$ if the bigger square is of length 2r.(r can be assumed to be one, in which case area of the circle gives you $\pi$)

Can anyone provide the mathematical proof of this method? enter image description here

1

There are 1 best solutions below

2
On

This is a recursive process.

At any stage, you are considering triangular voids having one horizontal, one vertical and one curved side. You must fit a square in there, which will create two new triangular voids.

Let us consider a triangle in the upper right quadrant, between verticals at $x_0$ and $x_1$ (right to left), and horizontals at $y_0$ and $y_1$ (bottom to top). The square will lie between $x$ and $x_0$, and $y$ and $y_1$.

Expressing that $(x,y)$ is on the circle and defines a square, we need to solve $$x^2+y^2=1\\x_0-x=y_1-y,$$ giving $$x=\frac12(-d+\sqrt{2-d^2})\\y=\frac12(+d+\sqrt{2-d^2)},$$ where $d=y_1-x_0$. (The other root yields negative coordinates and belongs to another quadrant).

You can accumulate the area of the square, $(x_0-x)(y_1-y)$. The two new voids are defined by $(x_0,y_0), (x,y)$ and $(x,y), (x_1,y_1)$. You start from $(x_0,y_0)=(1,0)$ and $(x_1,y_1)=(0,1)$, and you get a complete binary tree of squares.

Due to the nesting of radical expressions, I don't see how to get a closed formula.

Here is a Python script that implements these formulas. It converges desperately slowly as a function of the recursion depth.

from math import sqrt

# First octant
Area= 0.5 - 0.5 * (1 - sqrt(0.5)) * (1 - sqrt(0.5))

def Decumulate(X0, Y0, X1, Y1, Depth):
    global Area

    # New square coordinates
    D= Y1 - X0
    S= sqrt(2 - D * D)
    X= 0.5 * (-D + S)
    Y= 0.5 * (+D + S)

    Area-= (X0 - X) * (Y1 - Y)

    if Depth > 0:
        # Recurse
        Decumulate(X0, Y0, X, Y, Depth - 1)
        Decumulate(X, Y, X1, Y1, Depth - 1)

# First octant
Decumulate(1, 0, sqrt(0.5), sqrt(0.5), 10)
print 8 * Area

Here are the first values:

3.32479196829
3.25367645585
3.21212951
3.18741130928
3.1723502042
3.16292204164
3.15684869401
3.15282093754
3.15007226184
3.14814444423
3.14675735693
3.14573570137
3.1449671374
3.14437794366
3.14391860807
3.14355513138
3.14326367313
3.14302718774
3.14283326749
3.14267273154
3.14253868464
3.14242587747
3.14233026429
3.14224869159
3.14217867749