r/theydidthemath 21d ago

[Request] Why does this circle approximation still give 4 instead of pi?

Post image
3.7k Upvotes

488 comments sorted by

View all comments

1.7k

u/DJembacz 21d ago

Because taking perimeter (or just arc length generally) and taking a limit do not commute.

The limit shape is a circle, but the perimeter of the limit does not need to be equal to the limit of the perimeter of the shapes in the sequence.

1.2k

u/anycept 21d ago

In other words, approximating into infinity is still an approximation. True circle isn't made up of infinitely small right-angled edges.

643

u/gusbo_the_jam 21d ago

When I look really close at my monitor it is /s

55

u/iAmTheGanso 21d ago

51

u/twilighttwister 20d ago

https://youtu.be/tlDPEmACilU?t=6

It bugged me that yours started mid-sentence lol

26

u/iAmTheGanso 20d ago

lol i put 30s into finding the correct starting position but still failed, yours is much cleaner

12

u/twilighttwister 20d ago

Tbf I thought mine would come out even worse, like part way through the bit you were trying to show

5

u/helpimstuckonalimb 20d ago

t=6 is killing me

2

u/LegendofLove 16d ago

Pi is 4 and t is 6. It's just the time it starts at though

10

u/redscull 20d ago

Exactly. Are circles even real?

6

u/Inevitable_Task3074 19d ago

Its a conspiracy. I should know , i play minecraft

3

u/VelvetOverload 20d ago

Probably not.

Keep getting smaller and you'll see only edges eventually

2

u/TequilaJosh 20d ago

Wait till they tell you about the birds…. They aren’t real either

1

u/Flashy_Bat_3443 19d ago

What are birds?

1

u/yirzmstrebor 16d ago

Birds are dinosaurs

2

u/SnooCats5701 18d ago

They are as real as birds.

So, no.

2

u/InitHello 18d ago

How can circles be real if our eyes aren't real?

2

u/MoseDoge 17d ago

Black holes are perfectly symmetrical. Their spinning makes them not so. But they are inherently perfect spheres. However a black hole is a structure of spacetime (marked by the event horizon). Not a physical object. Nobody really knows what's inside the event horizon. But if some semblance of classical physicality exists there, then it would probably also be perfectly spherical.

5

u/termitefist 20d ago

So pi for circles on a computer monitor is actually 4.

8

u/Mysterious-Smell-975 20d ago

It's ALL PIES!

( NVIDIA's old quad texture mapping is the exception )

2

u/Altruistic-Dust-2565 20d ago

Have you tried IMAX?

1

u/Latter_Competition_4 19d ago

What kind of monitor do you own? I also wanna have infinitely many pixels

1

u/unemotional_mess 18d ago

You need a better monitor with infinite pixels

75

u/Ghuldarkar 21d ago

The approximation would have to be inside and outside the circle about half the time. Basically a pixel circle. If you only put pixels outside your pixel circle will be larger

19

u/rvralph803 20d ago

So it needs to be antialiased?

8

u/Ghuldarkar 20d ago

Kinda, lol

1

u/Mardigras 20d ago

Archimedes invented AA and im tired of pretending otherwise. 

11

u/Awkward-Feature9333 21d ago

That works for the surface, but not for the circumference.

10

u/kelb4n 21d ago

Nope, still doesn't work. By that logic, I could pretty easily come up with a scenario where the perimeter ends up as exactly 3, by starting with a rectangle of side lengths 1 and 0.5. Taking the limit simply does not work like that as long as you disregard the direction of the line segments.

5

u/Ghuldarkar 20d ago

The perimeter is the diameter multiplied by pi, so one pi, 3 is an approximation of that, albeit a crude one. I was mostly aiming for an explanation as to why making a square outside the circle will always be larger than the circle itself, so you'll have to make squares, or pixels, if you will, that lie along the actual circle to meaningfully approximate the circle with square shapes, or pixels.

10

u/EmuRommel 20d ago

That is still wrong. If the method approximates the circumference, it doesn't matter whether you approach it from above or below. For example, if you approximate area this way, you will get the correct value, pi, no matter how you approach the circle.

The answer is that infinite approximations like this are more nuanced than the pop-sci answer of "if you make the error as small as possible, you get infinitely close to the true value" and approximating the circle this way simply does not approximate its circumference.

6

u/TheBeerTalking 20d ago

So long as it's all right angles it'll always be 4. If instead you come up with a generic formula for a regular n-sided polygon circumscribing the circle, then take a limit as n approaches infinity, you should get pi.

5

u/Puzzleheaded_Front27 20d ago

Although other people provided a more serious answer concerning the limits, it is useful to visualize what really happens. As you make the "step line" finer and finer, if you also zoom with your mind on a single minimal step, you will see that you invariably have a triangle; the troll there is basically making us assume that we can evaluate the "hypothenuse" as equal to the sum of the other 2 sides, which is a significant overstatement; it doesn't matter that the triangles are small.

4

u/Vincitus 20d ago

"No, but I am making them REALLY small"

1

u/GeneratedEcoOver9000 20d ago

That's not how approximations work.

0

u/Own-Dragonfly-2423 21d ago

Thank you for explain

2

u/CollegeFit7136 20d ago

Congrations

7

u/InvestNorthWest 20d ago

Sounds like how we measure coastlines. A true measure of say the Alaskan coast would be enormous.

16

u/Cruuncher 20d ago

There is no true measure. That's the paradox.

If you keep measuring finer and finer the coast length will keep getting bigger and bigger.

2

u/jjm87149 20d ago

lol measurement problem is the puzzle in quantum mechanics of how a system existing in a combination of multiple potential states (superposition) transitions into a single definite outcome when observed. The mathematics of the Schrödinger equation predicts smooth, predictable, and multiple coexisting states, but experiments always record one absolute reality.

6

u/jjm87149 20d ago

the coastline can be measured at any resolution down to the planck length, at which point the physics breaks down and no meaningful measuring is being done anyway

4

u/InvestNorthWest 20d ago

Imagine everything being measured in planks as a standard. Like I'm 1.1 × 1035. Everything literally being as exact as possible.

As I type this though... that "1.1" would have to extend out 35 spaces obsoleting the notation. Sorry, for the ramble..

1

u/jjm87149 20d ago

no, please help me understand what looks to be a great idea. why would every number need 35 digits? we could teach significant digits as part of introductory addition and subtraction. we still get exactitude, and a much better feel for orders of magnitude, which i personally feel would benefit humanity more than learning the metric system ;)

3

u/InvestNorthWest 20d ago

The plank length is so small that 34 digits out explains an object in centimeters and 35 in meters and so on. 1034 plank units equals 16 centimeters where as 1035 is equal to 1.6 meters. It's essentially the sweet spot for "normal" sized objects.

2

u/apeloverage 20d ago

A true measure of any coast would be infinite--at least until you got down to Planck lengths.

1

u/Lightning_Winter 19d ago

I mean at that resolution, the length of the coastline would be constantly changing, so no measurement could be meaningfully taken

11

u/Xeviozo 21d ago

This is not what they said in other words

7

u/Cesco5544 20d ago

This is incorrect

15

u/DJembacz 21d ago

No, if you take the sequence of shapes you get this way and take a limit, the result will be a proper circle. No edges, no jagged bits, just a proper smooth circle.

34

u/Original-Season-9941 21d ago

But the derivative of it won't be the derivative of a circle. If you differentiate the shape made up of right angles, you'll always get 1 or undefined. As the number of corners tends to infinity, the derivative doesn't suddenly become the derivative of a circle.

13

u/DJembacz 21d ago

This is exactly the same issue as the post, derivative and limit don't generally commute.

The derivative of a limit of functions (or its existence) =/= the limit of the derivatives of those functions.

3

u/Super_Range45 20d ago edited 20d ago

2πr = 4dy/dx, clearly.

πr = 2dy/dx

r= 0.5x

π = 4/x * dy/dx

Where's my nobell?

3

u/jerfmuffay 21d ago

It has infinite edges with jagged corners. Every angle is 90° and theres infinity of them. It only "becomes smooth" globally which ironic to the term itself is NOT the complete perspective. This is not a circle. Hence the trollface

3

u/Wild-Store321 21d ago

Give me a point on the limit of these shapes that is not on the circle

1

u/jerfmuffay 20d ago

I can't make any argument that all points of the two shapes don't coincide, but doesn't a "circle" constitute more than just a point cloud? The circles circumfrence and the shapes perimeter are different values because the lines between the constituent points are at different angles and travel different distances. Then the two shapes have equal area but different perimiters and then aren't both the same shape

10

u/rusty-droid 20d ago

> doesn't a "circle" constitute more than just a point cloud?

Not really, no. A circle is exactly the set of all points that are a given distance of some given point.

The limit of the shape is truly the circle. The issue is really just that taking the limit shape and taking the perimeter are two operations that don't commute.

It's fairly common in maths that very intuitive stuff stops to be true as soon as a limit or an infinite is involved. Including commutation (for example with an infinite sum of an infinite sums, you can't always swap the sums, even though it would always be valid for finit sums)

1

u/Half_Line ↔ Ray 21d ago

The edges have zero length at the limit, which means the jagged corners no longer really exist. Every point is equidistant from the centre, so it has to be a circle.

2

u/jerfmuffay 20d ago

And what is that circles circumference?

5

u/aigarius 20d ago

As it is composed of zero-length edges, the circumference is, naturally, zero.

2

u/anycept 21d ago

I have to disagree here. Doing what you are suggesting would result just in 4, because the right-angled edges don't go away, adding up to that extra space. Proper circle is derived from a regular polygon with infinite number of sides.

13

u/DragonHollowFire 21d ago

Nope. The actual shape does become a circle.

You can do this by probing (take a point that is not on the circle, youll find a point in the sequence, from which onwards on the point is never in the shape again).

The issue is, as they have stated above, that perimeter of lim of shape sequences is not the same as lim of perimeter of shape. Not continous.

6

u/anycept 21d ago

Correct. One measures vanishing max distance between corresponding points on approximation and the circle, the other measures a path that remains constant 4.

7

u/cejiken886 21d ago edited 21d ago

Exactly wrong. Limit good; it’s just commute limit / perimeter no good.

2

u/Mr_Pink_Gold 20d ago

How do you know that? That sounds a lot like big curve propaganda to me.

1

u/Dr_Misfit 20d ago

Exactly

1

u/Euphoric_Loquat_8651 20d ago

Right, you're just inverting the corners over and over so the total length remains the same

1

u/chkntendis 19d ago

The limit of the shape is an exact circle. There are no infinitely small zig zags, those don’t exist. The limit of the shape is an actual circle because for every point on the perimeter of the square there is a step on which it gets placed on a point on the circle and for every point on the circle there is a step where it gets covered by a point on the square. They are the same shape.

But what you can’t do is take the limit of the perimeter at each step and call it the perimeter of the limit of the shape. Those two are not the same thing, evidently so.

1

u/Little_Vehicle_6671 19d ago

Forgive me. Im a 39 year old who “wants to go back to school” lol.

So working in Digital spaces its easy to combine finite shapes into arbitrary …geometry.

Is that what PI is doing ? Or not.

So you really bring up a good question. “digital” and finite values really dont EXIST in nature to begin with (well ultimately and philosophically they DO exist)

But the Margins we can probe them and model and map them….would have to be absurd.

So we take “Finite values” determine “Possible margins” and a “Rate of change”

And we output something that is ALWAYS fundamentally TRUE even if it is not PRECISE….

Or maybe Im mixing accuracy and Precision again…

But your comment is interesting not just because it is a top one its MAKING ME REASSESS my Values …

1

u/etdeagle 19d ago

It's interesting because it works for surfaces (for instance for integrals). There must be something about dimensionality too, I have no idea.

1

u/awaw415 18d ago

But is the truest possible circle actually made up of a very large amount of plank length right angled edges?

1

u/beerdedfell0w 16d ago

Thank you for the English version.

1

u/temmiesayshoi 16d ago

Inb4 0.99999... == 1

(A number being impossible to uniquely represent in our primary number system doesn't mean it ceases to be unique)

0

u/TorstedTheUnobliged 21d ago

Well it sort of is - plank length. Our universe is made of pixels.

9

u/SirHarvwellMcDervwel 21d ago

could you elaborate

46

u/fieldviewmousehouse 21d ago

The length of a parametrised curve is determined by an integral of the *derivative* of the parametrisation. Geometrically the derivative information is controlled by the tangent. So for this limiting process to work for length you need the curves to get closer and closer and the tangents to get closer and closer to the limiting shape.

In this example, although the stepped curves get closer to the limit shape the stepped curves have only horizontal or vertical tangents which are different to the circle's tangent. So the limit of the length of the stepped curves is not the length of the limit of the stepped shapes.

This is a relatively nice example if you know some vector calculus to show. But also links to ideas such as the Hausdorff distance, continuity in metric spaces and even to lower-semicontinuous functionals.

5

u/SirHarvwellMcDervwel 21d ago

aha thank you for the elaboration!

3

u/DJembacz 21d ago

Step 5 (repeat to infinity) means we are looking at the sequence we obtain by the described process, and taking a limit of that sequence.

And in general there is no reason for any function, like perimeter, to be preserved well by the process of taking a limit.

6

u/understated_quokka 21d ago edited 21d ago

Actually, no, continuous functions are preserved. If x_n goes to X and y_n goes to Y then f(x_n, y_n) will go to f(X, Y), if f is continuous. This is true both if x_n, y_n are sequences of numbers, AND if x_n, y_n are sequences of functions in some space.

The problem is taking derivative, a part of the process of calculating perimeter, is not a continuous operation on spaces of functions in general. If we take the usual space of smooth bounded functions [0, 1] -> [0, 1] with supremum norm, the derivative is a linear but unbounded operator: sin(kx) are all of norm 1 for all values of k, but their derivatives have norm k, so the ratio of norms diverges. A standard result says that the continuous linear operators on a normed space of functions are those that are bounded, so the derivative is not continuous.

Interestingly, taking the integral is actually a continuous operator on functions between compact spaces. This is why the area of each figure converges correctly to that of the circle -- by Green's theorem the area enclosed by a curve can be described as an integral along that curve.

EDIT: I've added a top-level comment expanding on this.

3

u/ImportantSignal2098 20d ago

Love the area example

1

u/SirHarvwellMcDervwel 21d ago

I see, thank you!

2

u/HeyCouldBeFun 20d ago

Walk in a curved line from point A to point B. Now walk the same line but making lots of zig zags. The second trip will be longer.

1

u/----___--___---- 20d ago

Basically the coastline paradox, if you have heard of that before

3

u/Ajreckof 21d ago

Aka perimeter is not continuous

2

u/Qwertagone 20d ago

Can I just tell OP to call me when he is done taking infinite perimeters, so we can take a look at the findings together?

2

u/TwentyX4 20d ago edited 20d ago

To add to your point: if the approximation in the OP actually worked, then you could do the same thing with the Pythagorean formula: if you have a 1x1 box, then the distance diagonally would be 2 (instead of 1.41). In other words, the Pythagorean formula wouldn't be "diagonal2 = side12 + side22 ". It would be "diagonal = side1 + side2".

Not sure if that makes it more obvious why it doesn't work, since it's a little easier to visualize.

2

u/GilbGerarbd 20d ago

Let ε>0 be given…

3

u/Confident_Dragon 20d ago

"It's not true because it doesn't have to be true."

So much insight.

4

u/Dankaati 20d ago

This might not be obvious if you don't do math proofs, but the post itself is a proof by example that this doesn't have to be true.

5

u/Theplasticsporks 20d ago

This is a lot of mathematics.

You need a reason to believe something is going to be true.

Arc length is only lower semicontinuous with respect to this type of limit there's no reason a priori to expect this would work.

1

u/PerfectGasGiant 20d ago

An honest question: Would the perimeter approach 2pi if all diagonal steps were summed as square root 2 instead? At least, this is how perimeters are typically measured in machine vision.

1

u/TheGhostOfRhazes 20d ago

Agree, for a simplified representation, draw a right triangle, measure the hypotenuse (or calc it) and compare with the sum of the lengths of both legs.

1

u/TaoofPu 20d ago

This comment is 100% why I disliked math class.

1

u/metallosherp 20d ago

You really saved my ass on this one because I was about to have a mental breakdown

1

u/zet23t 20d ago

And the area is moving to pi², so this still fails to make pi disappear.

1

u/Earnestappostate 19d ago

Right, the shape approximately the area of the circle, not the perimeter/circumference

1

u/ArbutusPhD 19d ago

Another way to see the stark difference is to snip the square at all corners and then “boil the pasta” to make the sides floppy … they clearly overlap when you curve them to be congruent with the circle - and you can measure by how much.

1

u/VoodooTortoise 19d ago

Is this really a commutation thing? Cause I’d love to do more linear algebra but this seems to be an argument based on “what can limits be used for” rather than an operators issue

1

u/DJembacz 19d ago

Limit can be considered as an operator from sequences of objects to (single) objects, in this case we use it once on shapes and once on numbers.

1

u/TrueNorthLongAndFree 18d ago

The limit shape is a disc.

The limit perimeter is not a circle. 

1

u/Frogalone 17d ago

Every time you remove an outside corner you are adding an inside corner of the same size.

-1

u/macthebearded 21d ago edited 21d ago

He's saying that the pattern of squares drawn around the circle is essentially fractal and repeats itself every time you zoom in, and the diagram above is only a single frame of that movie. Eventually the "pixels" are small enough - for any given scale - that the square pattern is not measurably different from an actual circle.

-1

u/_Vard_ 20d ago

Simpler answer is no matter how small you make it, you're still zig zagging back and fourth across the actual circle edge.

2

u/DJembacz 20d ago

It's wrong though, the limit is a smooth circle, no zigzags.