Bouncing π

I just saw a 3blue1brown snippet showing an idealised system in which blocks bouncing off one another show a curious emergence of the value of π, so my first thought was to see how that works. The set-up goes like this:

We've got a vertical wall, a horizontal floor, a block initially at rest on that floor, between the wall and a second, heavier block moving towards the wall. The blocks are presumed to slide on the floor perfectly frictionlessly and to bounce off one another and the wall perfectly elastically. The wall and floor are presumed to be part of some rigid body so vastly more massive than either block as to be, for our purposes, effectively immovable.

The big block, on hitting the smaller one, will bounce it towards the wall. This slows the big block a bit. The smaller one bounces off the wall and comes back to collide with the big one, bouncing off it and slowing it some more. That potentially sends the little block back to the wall, to bounce off it again and repeat the process, until eventually the big block is moving away from the wall – much as it would have done after bouncing off the wall, had the little block not been in the way. There may be some more bounces before the big block is moving away from the wall faster than the little block, at which point the little block shall never catch up with it again. The question posed is: how many bounces happen in the course of this process and how does this depend on the ratio of the masses of the blocks ?

Bouncing off the immovable wall simply reverses the direction of the small block's speed. A perfectly elastic collision between the two blocks, of masses m and N.m for some mass m and multiplier N, is most easily described in their joint rest-frame. In this frame, N.m has some speed v towards m, whose speed the other way is N.v, so their total momentum is zero. After they bounce, they have the same total energy and momentum, so the same relative speeds, except that they now move away from one another. We need to transform that into the rest-frame of the floor and wall. In that frame, let the velocities of m and N.m be, respectively, u and v, both measured positive if away from the wall or negative if towards it. The pre-condition for collision is u > v, which arises if N.m is moving towards the wall faster than m is, or m is moving away from the wall faster than N.m is.

Their combined momentum is m.(u +N.v) so the velocity of their combined rest-frame is (u +N.v)/(1 +N) and N.m's velocity v is less than this by (u −v)/(1 +N), which the collision shall reverse, giving it (relative to walls and floor) velocity (2.u +(N −1).v)/(1 +N). Meanwhile m's excess N.(u −v)/(1 +N) over that of the rest-frame also gets reversed, leaving it (relative to wall and floor) with velocity (2.N.v +(1 −N).u)/(1 +N). Given u > v, this leaves the big block with a more positive velocity than the small block so they separate. If the small block's velocity is then negative, 2.N.v < (N −1).u, it shall bounce off the wall and return with velocity (u.(N −1) −2.N.v)/(1 +N); the condition for a future bounce is then u.(N −1) −2.N.v > 2.u +(N −1).v, which is true precisely if u.(N −3) > (3.N −1).v. If the small block's velociy after a collision is positive, it's necessarily less than the large blocks, so there shall be no later collision. (Since the negation of this positive velocity is also less than the big block's positive velocity, the same condition for a future bounce correctly says it won't happen, so we don't need to treat this case separately.)

So let the velocity of the small block after c collisions of the blocks plus c collisions between the small block and the wall be (N +1).s(c) while that of the large block at the same time is (N +1).b(c), with s(0) = 0 and b(0) given to be negative. Then, whenever s(c) > b(c), substituting in the results above,

making each bounce's pair of velocities a simple linear transformation of that of the previous. If s(c +1) isn't positive, there isn't even a bounce off the wall after the c-th bounce of the blocks; otherwise, we only get another bounce of the blocks if s(c +1) > b(c +1). We can rewrite the linear transformation as

in which it becomes evident that q = 2/(N +1) is the form in which N appears. Either form gives

s(c +1) −b(c +1)
= ((N −3).s(c) −(3.N −1).b(c))/(N +1)
= (1 −2.q).s(c) −(3 −2.q).b(c)

as the surplus velocity; if positive, there shall be another bounce leading to c +2 entries in s and b.

(1 +N).(s(c +1) +N.b(c +1))
= (3.N −1).s(c) +(N −3).N.b(c)
= (1 +N).(s(c) +N.b(c)) +2.(N −1).s(c) −4.N.b(c)

which, when multiplied by m, gives the total momentum before the next collision, with index c +2, if it happens. Aside from a similar factor of m/2, the total energy is

(N +1).(N +1).(s(c +1).s(c +1) +N.b(c +1).b(c +1))
= ((N −1).s(c) −2.N.b(c)).((N −1).s(c) −2.N.b(c)) +N.(2.s(c) +(N −1).b(c)).(2.s(c) +(N −1).b(c))
= (N −1).(N −1).s(c).s(c) −4.N.(N −1).s(c).b(c) +4.N.N.b(c).b(c) +4.N.s(c).s(c) +4.N.(N −1).s(c).b(c) +N.(N −1).(N −1).b(c).b(c)
= (N +1).(N +1).(s(c).s(c) +N.b(c).b(c))

which confirms that energy is conserved (as implied by the collisions all being elastic). The number of collisions between blocks is the final value of c at which s(c) ≤ b(c); the number of collisions of the small block with the wall is c if s(c) > 0, else c −1.

That conservation of energy implies that the point [s(c), b(c)] lies, for each c, on an ellipse {({reals}: [x, y] :): x.x +N.y.y = k} for some constant k; and each step of the iteration from [s(c), b(c)] to [s(c +1), b(c +1)] is just an application of the linear map (: [x.(1 −q) +(q −2).y, q.x +(1 −q).y] ←[x, y] :) with q = 2/(N +1). We start at the point [0, −√(k/N)] on the ellipse and repeatedly apply this linear map until the point hits or crosses the line {[x, x]: positive x}; so let's consider the geometric interpretation of our trajectory.

Since the linear map we're doing does in fact map every point of our ellipse to another point of the same ellipse, it must in fact be a rotation with respect to the [x, y.√N] co-ordinates in which it's a circle. As such, it must be [x.Cos(a) −y.Sin(a).√N, x.Sin(a)/√N +y.Cos(a)] ←[x, y] implying Cos(a) = 1 −q, (2 −q)/√N = Sin(a) = q.√N. The last requires q.N = 2 −q or q = 2/(1 +N), which is indeed how we defined q. So our angle a has 1 −q = Cos(a) which, for small a, is well approximated by 1 −power(2, a/radian)/2, so we get a/radian ≈ √(2.q) = 2/√(1 +N). In these co-ordinates, our s(n) > b(n) condition for the next collision becomes x.√N > y.√N with the latter's √N treated as part of the coordinate; the iteration continues for c steps where c is the least natural for which Tan(turn/2 −c.a) < 1/√N; and, for large N, Tan(r) < 1/√N just means r/radian < 1/√N. So we're roughly solving for the least c for which turn/2 −2.c.radian/√(1 +N) < radian/√N; dividing through by radian turns this into π −2.c/√(1 +N) < 1/√N at least for large N; and this amounts to rounding π.√(1 +N)/2 to the nearest integer, c. Our number of collisions (between blocks plus between small and wall) is then 2.c if we round up or 2.c −1 if we round down.

Which explains why, when we do this for powers of 100, the values of c that emerge are the integers obtained by rounding π times powers of ten down, as 3blue1brown observed.


Valid CSSValid HTML 5 Written by Eddy.