Homeschool · Science · Physics, ages about 10 and up

Why Things Fall Over

A chain of books hanging from a rolling cart, swung up and balanced standing on top, is a famous physics puzzle called the inverted pendulum, or the cart-pole. This lesson explains the physics behind the Book Cart game: balance, why tall things are easier to balance than short ones, swinging up, inertia, energy, wind and chaos. There are things to try at home, and experiments to run in the game's Lab.

Start here

Play a level or two of Book Cart first, then read one section at a time. Each section ends with something to try, at home or in the game. Younger children can do the activities and the game; the formulas are for older students and parents, and you can skip them.

  1. Balance and the centre of gravity
  2. Why tall things fall slower
  3. Swinging up
  4. A lean that doubles
  5. Moving the cart: inertia
  6. The push isn't just mass × acceleration
  7. Energy keeps the books honest
  8. Wind
  9. Chaos
  10. How the game works

1Balance and the centre of gravity

Every object has a centre of gravity: the one point where its whole weight seems to act. For a book standing upright, it's in the middle. For a stack of books, it's partway up the stack.

Something is balanced when its centre of gravity is straight above (or straight below) the point holding it up. There are three kinds of balance:

  • Stable: tip it and it comes back, like a picture hanging from a nail. Its centre of gravity is below the support, and tipping it lifts the centre of gravity.
  • Neutral: it stays wherever you put it, like a ball on a flat floor.
  • Unstable: tip it even a little and it falls further, like a pencil standing on its point. Its centre of gravity is above the support, and tipping it lowers the centre of gravity.

A stack of books standing in a cart is unstable. When it leans, its centre of gravity moves sideways by a distance d from the point that holds it, and gravity twists it further. That twist is a torque:

τ = m g dτ is the torque in newton-metres, m the mass of the books in kilograms, g = 9.81 m/s² on Earth, and d the sideways distance in metres.
φm gdcentre of gravitydashed: straight upfrom the pivot
The books lean by an angle φ. Their centre of gravity (red cross) is now d to the right of the pivot, so their weight twists them further right.

Try it: find the centre of gravity of a book

Lay a hardback book flat on one finger and slide your finger around until it balances. That spot is right under its centre of gravity. Now hold a book upright on your flat hand and tip it a little: let go and it falls the way it leans, because its centre of gravity is no longer over your hand.

In the game

Press 🔬 to open the live physics panel. Angle from straight up is the angle of the books' centre of gravity, seen from the pivot, and Gravity torque is m g d. Watch the torque grow as the lean grows.

Pairs with A First Course in Physics, Lesson 4: Gravitation, center of gravity and balance.

2Why tall things fall slower

Try balancing a broom on your hand, bristles up, then try a pencil. The broom is much easier, even though it's bigger and heavier. A tall object tips over more slowly than a short one, so you have more time to catch it.

Physicists measure how fast a lean grows with its doubling time, t₂: the time it takes a small lean to double if nobody helps. For a straight, even stick standing on a pivot at its bottom end:

t₂ = ln 2 ÷ λ,   where   λ = √( 3g ÷ 2L )L is the stick's length in metres, ln 2 ≈ 0.693, and λ (lambda) is the growth rate, per second. Because L is under the square root, a stick 4 times as long takes twice as long to fall.
StickLengthDoubling time
Pencil17.5 cm0.076 s
Ruler30 cm0.099 s
Broom handle1.4 m0.21 s
Long pole3 m0.31 s

Compare those with how quickly you can react, about 0.2 seconds for most people. You can't catch a pencil in time, but a broom gives you a chance, and a long pole is easier still.

The bar is the doubling time on a scale of 0 to 0.5 seconds; the black line is a typical reaction time of 0.2 s.

Try it: broom against pencil, and your reaction time

  1. In a clear space, away from anything breakable, balance a broom on your flat palm, bristles up. Then try a long-handled spoon, then a pencil. Which can you keep up longest?
  2. Measure your reaction time with a ruler. A helper holds a 30 cm ruler hanging down, with the zero end between your open thumb and finger. They let go without warning, and you pinch it as fast as you can. Read where you caught it, and look it up below. A falling ruler drops d = ½ g t², so t = √(2d ÷ g).
Caught at5 cm10 cm15 cm20 cm25 cm30 cm
Reaction time0.10 s0.14 s0.17 s0.20 s0.23 s0.25 s

In the Lab

The Lab's Pencil is a single book on a free pivot, and its Broom is six books stiffly bound into one tall stick. Look at Doubling time in the physics panel for each: about 0.10 s and 0.21 s. Then try the Broom on the Moon, where gravity is about a sixth of Earth's: the doubling time is about 0.52 s, since t₂ grows with 1 ÷ √g.

The Counterweight experiment hangs a 6 kg weight on an arm below the broom's pivot. The broom is now less top-heavy, so its lean doubles every 0.72 s instead of 0.21 s. A balancing toy works the same way. There's a catch: being less top-heavy also means a push of the cart turns it less, so it's harder to swing up.

PencilBroomBroom on the MoonCounterweight

3Swinging up

In the game the books start hanging down from the cart, like the ball on a cup-and-ball toy. To get them standing up, you have to swing them, and the way to swing anything higher is to push in rhythm. A hanging pendulum has its own natural swing time, its period, and small pushes that come once each swing, at the right moment, add up. That's called resonance, and it's how you pump a playground swing.

The right moment: roll the cart the opposite way to the books' swing. From the cart's point of view, the books get a shove in the direction they're already moving, so each swing climbs higher. Move the cart with the swing and you take energy out instead, which is how you slow them down.

T = 2π √( 2L ÷ 3g )The period of a straight, even stick of length L swinging from one end. Two books (47 cm) swing back and forth about once every 1.1 s; 25 books (6 m) take about 4 s. The physics panel shows it as Swing period hanging.

How high do they need to go? To stand straight up and stop there, the books' centre of gravity has to rise from below the pivot to the same distance above it, so the swing needs exactly enough energy for that climb:

E = 2 m g dm is the mass of the books and d the distance from the pivot to their centre of gravity. For two books that's about 9 J; for 16 books, about 630 J. The game's Swing bar compares the books' swing energy with this. When it reaches the line, they have just enough.

Too little and they fall back; too much and they go right over the top. Then you have to catch them as they arrive, which is where the balancing starts.

1. Roll againstthe swing2. Higher eachtime3. Catch itat the top
Roll the cart against the swing, in rhythm, and the books climb higher each time. Then catch them at the top and balance.

Try it: swing a key on a string

Hang a key or a small toy from a piece of string about 30 cm long and hold the end still. Now move your hand a little from side to side. Try fast, then slow, then in time with the swing. Only the rhythm that matches the swing makes it climb. Can you get it to go all the way round?

In the game

Watch the Swing bar while you rock the cart. It fills as the swing grows and lights up when the books have enough energy to reach the top. In the physics panel, Swing energy and Needed to reach the top show the same thing in joules. The 🤖 autopilot does it by the formula: it pushes against the swing until the energy is right, then switches to balancing.

4A lean that doubles

When something unstable starts to lean, the lean doesn't grow at a steady speed. The more it leans, the harder gravity pulls it over, so it leans faster still. A lean of 1° becomes 2°, then 4°, 8°, 16° and 32°, doubling every t₂ seconds. This is called exponential growth.

That's why small, early corrections work and big, late ones don't. If the doubling time is 1 second, a 1° lean takes 4 seconds to reach 16°, and only 1 more second to reach 32°.

φ(t) = φ₀ × 2t ÷ t₂φ₀ is the starting lean. This is only true while the lean is small, but that's when it matters most.
topples at 35°1°2°4°8°16°32°012345 slean
With a doubling time of 1 second, a 1° lean reaches 32° in 5 seconds. Most of the growth happens at the end.

In the game

Each level's start card shows how fast a lean doubles at the top, in real time: about 0.13 s for 2 books, up to 0.44 s for 25 (taller is slower, as in section 2). That's quicker than anyone can react, so near the top the game slows time down, so that a lean looks as if it doubles every 0.9 s on the first level, down to 0.5 s on the last. The physics doesn't change; only the playback speed does, and the badge at the top of the game shows by how much.

5Moving the cart: inertia

Newton's first law says that things keep doing what they're doing unless something pushes them. That's inertia. When the cart moves suddenly, the books stay where they were for a moment, so the cart slides out from under them and they lean the other way. (It's the same reason you lurch backward when a bus pulls away.)

So to stop the books falling to the right, move the cart to the right, back under their centre of gravity. To travel somewhere, you first have to nudge the wrong way: to go right, give a small push left so the stack leans right, then follow it. Self-balancing scooters and robots do exactly this, and so does your hand when you walk with a broom balanced on it.

How far does a nudge tip the books? If the cart moves a distance s quickly, the stack tips back by an angle of about s ÷ k (in radians), where k is the stack's “pendulum length”, about two-thirds of its height. For a 47 cm stack of two books, k is about 32 cm, so a sudden 1 cm move tips it by about 1.8°. Short stacks need tiny, careful moves; tall ones need big ones.

1. Want to go right2. Nudge left:it leans right3. Follow it right
To move right, first nudge left. The stack tips toward where you want to go, and the cart follows underneath.

Try it: the card and coin

Put a playing card on top of a glass and a coin on the card. Flick the card sharply sideways. The coin drops into the glass, because its inertia keeps it where it was while the card shoots away.

In the game

Once the books are balanced, hold ← for a moment and watch them tip right. Turn on the 🤖 autopilot and watch how it nudges the wrong way first whenever it steers back toward the middle of the track.

Pairs with A First Course in Physics, Lesson 6: Newton's three laws of motion.

6The push isn't just mass × acceleration

Newton's second law, F = m a, says the force needed to speed something up is its mass times its acceleration. If the cart and books were one solid block, the motor would need F = (M + m) a, where M is the cart's 15 kg and m is the books.

But the books aren't solid with the cart. When they lean or swing, they push and pull on it (Newton's third law: the cart pushes on the books, so the books push back on the cart). So the force the motor actually needs keeps changing, even while the cart's acceleration is steady.

In the game

In the physics panel, compare Motor force F with F = (M+m)a would be. When the stack is straight and still they're close; when it's leaning or wobbling, they're different. The difference is the books pulling on the cart.

7Energy keeps the books honest

Energy is never made or destroyed, only moved from one kind to another. In Book Cart there are five kinds to keep track of:

KindWhat it isFormula
KineticEnergy of motion: the rolling cart and the swinging books½ m v²
GravitationalEnergy of height: books lifted higher store morem g h
SpringEnergy stored in the bent bindings between the books½ k θ²
Work inEnergy added by the motor (and taken away when it brakes), and by the windF × distance
HeatEnergy lost to rolling friction and the dampers in the bindings

Add up the kinetic, gravitational and spring energy, take away the work put in, add the heat, and the total should never change. As the books swing, energy flows back and forth between kinetic (fastest at the bottom) and gravitational (highest at the top), and the motor's work is what makes the total grow.

In the game

The energy bars in the physics panel do this sum many times a second. The line under them says how far the sum has drifted, usually less than a tenth of a joule. That's a check that the simulation is obeying the laws of physics.

Pairs with A First Course in Physics, Lesson 25: Power and energy.

8Wind

Moving air pushes on anything in its way. The push, called drag, grows with the square of the wind speed:

F = ½ ρ Cd A v²ρ (rho) is the density of air, about 1.2 kg/m³; Cd is the drag coefficient, about 1.2 for a block shape; A is the area facing the wind; and v is the wind speed. Double the wind speed and the push is four times as strong.

In the game the wind blows along the track, so it meets each book's spine or page edge. In a 4 m/s breeze, the push on one book is only about a tenth of a newton, the weight of a 10 gram coin. But it acts on every book, high up the stack, and it keeps going. To stay put, you have to lean the books slightly into the wind, just as you lean into a strong wind when you walk.

In the Lab

Open Windy and watch the autopilot swing twelve books up and hold them in gusty wind. The wind streaks show the gusts; Angle from straight up shows the books leaning slightly into the wind to hold their ground.

Windy

9Chaos

Join books with free hinges and let them fall, and they flail about in a way that's very hard to predict. Start two copies only a thousandth of a degree apart, and after a few seconds they're doing completely different things. This is chaos: the laws are exact, but tiny differences at the start grow until they take over. It's one reason weather forecasts get less reliable the further ahead they look.

A hanging chain of books is different. Hanging down, it's stable: nudge it and it swings back. Stood up, the very same chain is unstable. Same books and same hinges; the only difference is which side of the pivot the weight is on. The springy bindings in the game also make the chain wobble as it moves, and each way it can wobble has its own rhythm, which the physics panel lists as Slowest wobble.

In the Lab

Chaos drops three books on free hinges from sideways, with a faint ghost twin started 0.001° away. Watch the two drift apart. Free hinges drops ten: the physics panel shows that, standing up, they would double their lean every 0.013 s, far too fast for anyone. Swing-up shows the autopilot swinging five books up from hanging.

ChaosFree hingesSwing-up

10How the game works

For older students and parents: what the simulation calculates, and what it simplifies.

The books and the cart

  • Every book is a solid slab with real proportions: 20 to 28 cm tall, 14 to 17 cm wide, 2.5 to 5 cm thick, made of paper and board at 650 to 800 kg per cubic metre (from about 0.5 to 1.9 kg each). They stand with their covers facing you. Each book's moment of inertia about its middle is I = m(h² + w²) ÷ 12.
  • The cart has a mass of 15 kg and rolls on a straight, raised track with a little rolling resistance, and padded stops at each end. The bottom book turns freely on a pivot on the cart, so the books can swing all the way round.
  • Gravity is 9.80665 m/s² on Earth, 1.62 on the Moon, 3.71 on Mars and 24.79 on Jupiter.

What's simplified, and why

  • Springy bindings. Books joined by free hinges can fall in as many ways as there are books, all at once: standing up, two books would double their lean about every 0.05 s, and 25 books every 0.008 s. Nobody can balance that. So the books are joined by springy bindings, just stiff enough (times a safety margin that shrinks from 2.2 to 1.4 as the levels go on) that the standing chain has only one way to fall, like a bendy pole. The bindings don't hold the books up; they only keep them from folding. Set the bindings to zero in the Lab to see free hinges.
  • Slow motion. Even as a bendy pole, real books fall fast: a lean doubles every 0.13 s for 2 books and 0.44 s for 25. So near the top the game plays time back slower, from ×0.14 on the first level to ×0.87 on the last, and a little faster during the swing. The simulation itself is unchanged; the badge at the top shows the playback speed, and the physics panel shows the simulated time.
  • The motor. You don't push the cart directly. You move a target, and the cart's motor drives it there like a stiff spring with a shock absorber, up to a maximum force of 14 m/s² × the total mass. It's tuned in screen time, so the cart keeps up with your finger in slow motion too.
  • Balanced means the books' centre of gravity is within 15° of straight up, no binding is bent more than 20°, and the top book is within 25° of straight up above the pivot, for 8 seconds in a row.
  • A flat world. Everything moves in one plane, the books never touch each other or the cart except at the hinges, and the bindings never break.

The equations

The motion comes from Lagrange's equations, written for the cart's position x and each book's angle θ₁ … θn from straight up. They take the form M(q) q̈ = b(q, q̇) + F, where M is a mass matrix that changes as the books move, and b holds gravity, the springs and dampers, the spinning (centrifugal) effects, friction and wind. The game solves this set of equations (by Cholesky factorisation) 360 times per simulated second, stepping forward with an implicit trapezoidal method, which stays steady even with very stiff springs.

The doubling time comes from a stability analysis of the straight-up stack with the cart held still: the books' equations are linearised to A θ̈ = (G − K) θ (mass, gravity and spring matrices), and the largest growth rate λ gives t₂ = ln 2 ÷ λ. The other solutions are the wobbles, whose frequencies the panel shows.

The autopilot treats the whole chain as one pendulum. Away from the top, it pumps: it accelerates the cart against the swing whenever the swing energy is below what's needed to reach the top, and with the swing when it's above. Near the top it switches to balancing, setting the cart's acceleration from the angle and how fast it's changing, with a gentle pull back toward the middle of the track. In tests it swings up and balances every one of the 24 levels, even when it's made to react 0.15 s late, as a person would.

How we checked it

  • A single book hanging from a pivot swings with a period of 0.8408 s in the simulation; the textbook formula for a physical pendulum gives 0.8408 s.
  • An unbalanced stack left alone grows at the rate the stability analysis predicts, to within 0.5%.
  • With friction and springs switched off, a chain of six free books tumbling wildly for 10 seconds keeps its energy constant to within about 0.1%. With everything switched on, the energy sum in section 6 stays balanced to within a tenth of a joule over a whole level, while several joules flow in and out.

More physics to go with it

@teddyrookbook GitHub