Featured Post

Mathematics often feels precise and deterministic. We solve equations, follow logical steps, and do our best to arrive at exact answers. But sometimes, surprisingly, randomness can also lead us to deep mathematical truths. One of the most famous examples of this idea is a problem from the 18th century known as Buffon’s Needle.

Imagine you have a floor made of long wooden planks placed side by side. The seams between the planks form a set of equally spaced parallel lines across the floor. Now, suppose you take a needle and randomly drop it onto the floor. Sometimes the needle lands entirely on one plank. Other times, it crosses one of the seams between planks, as shown below.

Now here is the curious question posed by the French mathematician Georges-Louis Leclerc, Comte de Buffon in the 1700s:

If we repeatedly drop the needle at random, what is the probability that it crosses one of the lines on the floor?

At first glance, this sounds like a simple probability puzzle. But the answer turns out to involve one of the most famous numbers in mathematics: π.

To keep things simple, assume the distance between the parallel lines on the floor is the same as the length of the needle. We can also imagine that all of our needles are thrown onto the same plank, potentially crossing onto the plank above or below. This configuration is equivalent to throwing the needle onto any plank as long as the planks are equally wide; this modification makes the analysis much simpler.

Every time the needle lands, two things determine whether it crosses a line:

  • The distance x from the center of the needle to the nearest line
  • The angle θ at which the needle lands with respect to the parallel lines

See a depiction of this below.

To determine the probability of a needle crossing one of these lines, we need to describe what a "random drop" of the needle means mathematically. If the lines are the same length apart as the length of the needle L, then the center of the needle can never be farther than L/2 from the nearest line. Therefore, 0 ≤ x ≤ L/2. Next, we can simplify our domain for θ. The problem is symmetric, so we only need to consider angles between 0 and π/2. Any given half of the needle then has a vertical reach of (L/2)sin(θ).

We will say a needle "crosses" a line precisely when the center lands close enough to a line that one end of the needle can reach across the line. This occurs when x ≤ (L/2)sin(θ).

An important assumption to make is that every pair (x,θ) in the rectangle 0 ≤ x ≤L/2, 0 ≤ θ ≤ π/2 is equally likely. We’re assuming the needle lands with uniform randomness over all vertical positions x and angles θ. This means that the probability of crossing a line is the fraction of this region where the inequalities above hold. That is, 

Probability = (area of favourable region) / (area of total region)

The "rectangle" formed by inequalities has a total area of (L/2) * (π/2) = π*L/4. The needle crosses a line exactly when x ≤ (L/2)sin(θ), so for a fixed angle θ, the allowable x values are 0 ≤ x ≤ (L/2)sin(θ). The favourable area is then:

The probability of a needle crossing a line is therefore:

This result leads to a fascinating idea. If the probability of crossing a line is 2/π, we can rearrange the formula to estimate π itself:

π ≈ 2N / C

where:

  • N = the total number of needle drops
  • C = the number of times the needle crosses a line

In other words, by performing a simple random experiment and counting how often the needle crosses a line, we can approximate π.

For example, suppose you drop the needle 10,000 times and it crosses a line 6,366 times. Plugging these values into the formula gives

π ≈ (2 × 10,000) / 6,366 ≈ 3.14

With enough trials, the estimate tends to get closer and closer to the true value of π. At the bottom of this post, I attached a Maple worksheet that simulates this phenomenon. Below are results from simulating this result using N = 10, 100 & 1000, respectively. Notice as N increases, our approximation for π tends to become more and more accurate.

Below is a more dynamic simulation from the Maple worksheet to show how the approximation stabilizes as N increases.

What makes Buffon’s Needle so fascinating is the unexpected connection between geometry, probability, and one of mathematics’ most important constants.

π usually appears when dealing with circles (circumference, area, rotation, etc). But in Buffon’s experiment, there are no circles at all. Instead, π emerges from the geometry of all the possible ways a needle can land on a set of parallel lines.

This was one of the earliest examples of what we now call a Monte Carlo method, which is essentially using random experiments to estimate numerical values. Today, similar techniques are used in physics, finance, computer graphics, and machine learning.

One of the best parts of Buffon’s Needle is that you can try it yourself. All you need is:

  • A toothpick or needle
  • A piece of paper with a sequence of parallel lines, each a distance of the needle's length apart
  • A lot of patience

Drop the needle repeatedly (N times), record how many times it crosses a line (C), and compute 2N/C. The more times you repeat the experiment, the closer your estimate will get to π.

After reading about this experiment, I was convinced that mathematics is not only about abstract symbols and formulas. Sometimes, even something as simple as dropping a needle onto the floor can reveal the hidden structure of elements of the universe that we would've otherwise never known were there.

 

Buffons_Needle_Simulation.mw

Featured Post

Gabriel’s Horn is one of the most famous examples in calculus of how infinity can behave in ways that completely defy our intuition.

The horn-shaped object is created from a very simple curve: y = 1/x for x ≥ 1 (pictured below).

Now imagine rotating this curve around the x-axis. The resulting surface stretches infinitely far to the right while becoming thinner and thinner. Visually, it resembles a long trumpet or horn that continuously narrows to a thickness of zero.

At first glance, nothing about this shape seems particularly mysterious. As x grows larger, the radius 1/x becomes smaller and smaller. It seems reasonable that both the volume contained inside the horn and the area of its surface would remain finite (or at least if the volume was finite, then the surface area would also be finite). After all, the horn gets extremely thin very quickly.

Calculus allows us to test that intuition.

To compute the volume of the horn, we use the disk method. Each slice perpendicular to the x-axis forms a circular disk of radius r = 1/x, each with an area of π*r2 = π*(1/x2).



The total volume is the sum of an infinite number of these disc areas with thickness dx. As an integral,

V = π ∫₁^∞ (1/x²) dx.

This is a simple integral that converges to a value of 1. We could use the power or rule or our favourite computing software (I used Maple below).



Hence, V = π ∫₁^∞ 1/x² dx = π*1 = π. This means the horn contains only π cubic units of space, even though it extends infinitely far. 

Now let’s compute the surface area of the horn. For a surface of revolution, the surface area is

A = 2π ∫₁^∞ y √(1 + (y′)²) dx.

Since y = 1/x, we have y′ = −1/x². Substituting into the formula gives

A = 2π ∫₁^∞ (1/x) √(1 + 1/x⁴) dx.

Software like Maple can easily handle this integral. It tells us the integral diverges to infinity.

However, this is difficult to solve analytically. To understand what happens to this integral, notice that for large x, the square root term is very close to 1, since 1/x4 can be approximated as 0 as x grows large. This means the integrand behaves roughly like 1/x (it's actually slightly larger than 1/x). But

∫₁^∞ 1/x dx diverges, and ∫₁^∞ (1/x) √(1 + 1/x⁴) dx > ∫₁^∞ 1/x dx, so ∫₁^∞ (1/x) √(1 + 1/x⁴) dx must also diverge. As a result, the surface area of Gabriel’s Horn is infinite.

This leads to the famous, surprising conclusion:

  • The horn has finite volume.
  • The horn has infinite surface area.

In other words, it could be filled with a finite amount of paint, but it would require an infinite amount of paint to coat its inside surface.

Of course, real paint has thickness, so the paradox disappears in the physical world. Eventually, the horn would become thinner than the paint layer itself. But mathematically, the result is perfectly consistent.

The key idea lies in how quickly the function 1/x shrinks. The cross-sectional area of the disks scales like (1/x)² = 1/x², and the integral of 1/x² converges.

But the circumference of each slice scales like 1/x, and the integral of 1/x diverges.

So as the horn extends outward, the added volume decreases quickly enough to sum to a finite value, while the added surface area decreases too slowly and accumulates forever.

Gabriel’s Horn beautifully illustrates one of the central themes of calculus: infinite processes can produce results that feel deeply counterintuitive.

Volume and surface area seem closely related, but can behave in completely different ways when infinite limits are involved. A shape can stretch endlessly yet still contain a finite amount of space.

This strange object reminds me that mathematics isn’t just about calculating numbers, but is also about exploring the strange and fascinating consequences of simple ideas pushed to their limits.



Prompt for AI Assistant

Maple asked by C_R 3722 April 07

Sphere with earth texture

Maple asked by erik10 796 April 07

How to concatenate Matrices?

Maple 2023 asked by Lukasz 5 Yesterday