Calculator overview
Inputs and outputs
This summary comes from the calculator's published input and output contract.
Inputs
- Previous run: world
-
When omitted Blank
Default Not set
About this input
The world of your previous run, sent by the page and never typed (blank on the first run). Used only to choose the Why? sentence.
- Previous run: string length
-
When omitted Blank
Unit m Default Not set Range 0.1 to 2
About this input
The string length of your previous run, sent by the page and never typed (blank on the first run). Used only to choose the Why? sentence; a value out of range counts as no previous run.
- Previous run: bob
-
When omitted Blank
Default Not set
About this input
The bob of your previous run, sent by the page and never typed (blank on the first run). Used only to choose the Why? sentence.
- World (required)
-
Default Earth Allowed Earth, Moon, Mars, Underwater, Vacuum
About this input
Where the pendulum swings: Earth (in air), the Moon (no air), Mars (thin air), Underwater (Earth gravity in fresh water) or Vacuum (Earth gravity, no air). Chosen with the world chips on the canvas.
- String length (required)
-
Unit m Default 0.5 Range 0.1 to 2
About this input
The string length, from the pivot to the centre of the bob, 0.10 to 2.00 m. Set on the canvas by dragging the bob along the string or the pivot clamp up and down the stand; exact entry is in the handle popover.
- Release angle (required)
-
Unit deg Default 20 Range 2 to 80
About this input
How far the bob is pulled aside before it is let go, 2 to 80 degrees from straight down. Set on the canvas by dragging the bob around its arc; exact entry is in the handle popover.
- Units shown (required)
-
Default Metric Allowed Metric, Imperial
About this input
Metric or Imperial: the bob mass in kg or lb and the effective gravity in m/s^2 or ft/s^2. Everything is computed in metric; times, angles, percentages and the canvas lengths do not change. Chosen with the units chips on the canvas; it never clears your guess.
- Challenge number (required)
-
Default 0 Range 0 to 3
About this input
0 for Play; 1 to 3 load a challenge (1: a 2-second period on Earth; 2: the odd one out; 3: a 2-second period on the Moon). Chosen with the tabs above the canvas.
- Bob (required)
-
Default Steel Allowed Steel, Wood, Neoprene, Cork
About this input
The bob: steel, wood, neoprene or cork. All four are balls 5 cm across, so only the mass differs (steel is about 49 times heavier than cork). Picked from the shelf on the canvas.
- Previous run: release angle
-
When omitted Blank
Unit deg Default Not set Range 2 to 80
About this input
The release angle of your previous run, sent by the page and never typed (blank on the first run). Used only to choose the Why? sentence; a value out of range counts as no previous run.
- Your guess: the time for one full swing
-
When omitted Blank
Unit s Default Not set Range 0 to 10
About this input
Play only: your guess of the time for one full swing there and back, 0 to 10 s, placed with the tick on the ruler for one full swing. Blank until you guess; the results stay hidden until then, and 0 is a real guess. Changing the pendulum clears it.
- Your guess: the odd one out (required)
-
Default Not yet predicted Allowed Not yet predicted, A, B, C
About this input
Challenge 2 only: the pendulum you think swings at a different pace, A, B or C, picked by clicking it on the canvas. It starts as Not yet predicted (a blank is read the same way); the pendulums start swinging once you lock in your guess.
Outputs
- Period by the small-swing formula
-
Unit s
About this output
The period by the small-swing formula 2 PI SQRT(length / effective gravity), in seconds. The exact period is a little longer for a wide swing. Blank until you guess, when the bob floats and in challenge 2.
- String length used
-
Unit m
About this output
The string length used, in m (a challenge may set its own). Blank when the inputs are not valid. The canvas draws the pendulum from it.
- The swing, frame by frame: time and angle of the pendulum and of your guess, and of pendulums A, B and C in challenge 2
-
No unit declared
About this output
The swing frame by frame, 181 rows (three periods, 60 frames each): the time, the angle of the pendulum, the angle of your guess (a faint ghost), and in challenge 2 the angles of pendulums A, B and C. Only row 0 (the bob at release) is shown until you guess.
- How far off your guess was
-
Unit %
About this output
How far off your guess was, in percent of the real period: positive when your guess was too long. Play only; blank until you guess and when the bob floats.
- Your guess
-
No unit declared
About this output
How close your guess was: spot on, close or not quite, with how many seconds it was off the real swing time (3 decimals, as the period card) and, unless spot on, whether it was too long or too short. Play only; blank until you guess.
- Release angle used
-
Unit deg
About this output
The release angle used, in degrees (a challenge may set its own). Blank when the inputs are not valid.
- Extra time from the wide swing
-
Unit %
About this output
How much longer the exact period is than the small-swing formula, in percent: about 0.8% at 20 degrees and 14% at 80 degrees. Blank until you guess, when the bob floats and in challenge 2.
- How we got this
-
No unit declared
About this output
How we got this: the working behind the results, one step per line (lines separated by line feeds): each equation, the same equation with this run's numbers, then the result. Written in SI units; with Imperial units the bob-mass and effective-gravity results also give their Imperial value in brackets. Each number is shown like its card, with extra digits only where rounding would change it, and each result is rounded like its card. A neutral line instead while the inputs are not valid, while Play awaits your guess, and while challenge 2 awaits your guess; in challenge 2 the periods of the three pendulums; only the bob-mass, effective-gravity and floating lines when the bob floats.
- World used
-
No unit declared
About this output
The world used (a challenge may set its own). Blank when the inputs are not valid.
- Time for one full swing (period)
-
Unit s
About this output
The time for one full swing there and back (the period), in seconds: exact for any swing up to 80 degrees, from the small-swing period and the arithmetic-geometric mean of 1 and COS(angle/2). Blank until you guess, when the bob floats and in challenge 2.
- Why? case
-
No unit declared
About this output
The code of the Why? sentence chosen, W01 to W18 (for testing; not shown on the page). Blank whenever the Why? sentence is blank.
- Why?
-
No unit declared
About this output
One plain sentence on why the swing took that long. When exactly one thing changed since your previous run it says what that change did; otherwise it explains the run on its own. Play only; blank until you guess.
- Challenge 2: the three pendulums
-
No unit declared
About this output
Challenge 2: the three pendulums, each with its bob and string length. Blank outside challenge 2.
- Challenge goal
-
No unit declared
About this output
The goal of the selected challenge. Blank in Play.
- Challenge: the value scored
-
Unit s
About this output
The value the challenge scores: the period, in seconds, in challenges 1 and 3. Blank otherwise.
- Challenge score
-
No unit declared
About this output
The challenge score: 100 when met, otherwise 0.
- Bob mass
-
Unit kg
About this output
The mass of the bob, in kg (lb in Imperial units; density times the volume of a 5 cm ball). Shown before you guess, because mass is what most people expect to matter. Blank in challenge 2.
- Bob used
-
No unit declared
About this output
The bob used (a challenge may set its own). Blank when the inputs are not valid.
- Challenge feedback
-
No unit declared
About this output
What to try next, or why the challenge is met. In challenge 2 it asks for your guess until you make one. Blank in Play.
- Model Status
-
No unit declared
About this output
OK, CHECK (the bob floats in water, so there is no swing to time) or NOT VALID with the reason (the results are then blank).
- Model version
-
No unit declared
About this output
The version of this lab.
- Formula module versions
-
No unit declared
About this output
The formula modules and their versions.
- Challenge result
-
No unit declared
About this output
No challenge selected, MET or NOT MET.
- Pull that drives the swing (effective gravity)
-
Unit m/s^2
About this output
The pull that drives the swing, in m/s^2 (ft/s^2 in Imperial units): gravity reduced by buoyancy, with the fluid the bob pushes along counted in (a ball drags half its own volume of fluid). Negative when the bob floats. Blank until you guess and in challenge 2.
- Fade time (illustrative)
-
Unit s
About this output
An illustrative time for the swing to fade by drag, in seconds: the swing shrinks by a factor e in this time. It does not change the period. Blank with no air or water, when the bob floats, until you guess and in challenge 2.
LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.
Methodology
Purpose and model boundary
Many people think a pendulum with a heavier bob (the ball on the end of the string) swings more slowly. This lab tests that idea. You hang a ball of steel, wood, neoprene or cork on a string, pull it aside and let it go, on Earth, the Moon, Mars, under water or in a vacuum (a space with no air). Before the swing you make your guess: how long will one full swing, there and back, take? Then the lab shows what really happens.
All four balls are the same size, 5 cm across, so mass is the only thing that differs between them: steel is about 49 times heavier than cork.
The lab is for learning that the string length and the pull of gravity set the swing time, not the mass. It uses simple, stated values for each ball and world. It does not predict a real clock: a real string stretches, a real pivot rubs, and real air moves.
The model is the calculation authority. The page sends the values you set to the model and draws only what it sends back: the swinging pendulum, the ghost pendulum that swings at your guessed pace, and the three pendulums of the odd-one-out challenge. The page works out no swing time or angle itself.
Inputs and units
| Input | Meaning and unit |
|---|---|
| String length | From the pivot to the centre of the ball, from 0.10 to 2.00 m (default 0.50 m). |
| Bob | Steel, Wood, Neoprene or Cork (default Steel). |
| Release angle | How far the ball is pulled aside before it is let go, from 2 to 80 degrees from straight down (default 20 degrees). |
| World | Earth, Moon, Mars, Underwater or Vacuum (default Earth). |
| Your guess: the time for one full swing | Free play only: from 0 to 10 s. It starts empty, and 0 is a real guess. |
| Your guess: the odd one out | Challenge 2 only: pendulum A, B or C. It starts as Not yet predicted. |
| Previous run (string length, bob, release angle, world) | The settings of your last swing, sent by the page and never typed. They are empty on the first run and are used only to choose the Why? sentence. |
| Units shown | Metric or Imperial (default Metric). Imperial shows the bob's mass in pounds and the effective gravity in feet per second squared. Everything else stays the same. |
| Challenge number | 0 for free play, or 1 to 3 to load a challenge (default 0). |
Where each input is set:
- On the canvas only: everything you choose. You pick a ball from the shelf, drag the ball along the string (or the pivot clamp) to set the length, drag the ball around its arc to set the angle, tap a world, drag your guess along the ruler and press Lock in my guess. In challenge 2 you click one of the three pendulums. The units are two small buttons. The lab has no input panel.
- Sent by the page: the previous-run values.
- In the lab bar: the challenge number.
Governing relationships
A few physics words first:
- Period: the time for one full swing, there and back, in seconds.
- Mass: how much stuff the ball is made of, in kilograms. Here it is the ball's density (how heavy each cubic metre of the material is) times the volume of a 5 cm ball. Steel 7,850 kg/m³, wood 700, neoprene 1,230 and cork 160.
- Gravity (g): how hard a world pulls. Earth 9.80665 m/s², the Moon 1.62 m/s², Mars 3.73 m/s². Under water and in a vacuum the pull is Earth's.
- Buoyancy: the push up from the air or water the ball pushes aside (Archimedes' principle).
The pull that drives the swing. Buoyancy holds up part of the ball's weight, and a ball moving through air or water also drags some of it along, which makes it harder to speed up. With ρ_b the ball's density and ρ_f the fluid's (air 1.204 kg/m³, Mars air 0.016 kg/m³, water 1,000 kg/m³, none on the Moon or in a vacuum), the effective gravity is
g_e = g × (ρ_b - ρ_f) / (ρ_b + 0.5 ρ_f)
If g_e is 0 or less, the ball floats instead of swinging.
Why mass cancels. A heavier ball is pulled harder, but it also needs more force to speed up. The two grow together, so the mass drops out. Only the density matters, through buoyancy, and in air it changes the period by less than half a percent.
The small-swing rule. For a small swing the period is
T₀ = 2π × √(L / g_e)
where L is the string length. Four times the length takes twice as long.
The exact period. A wide swing takes a little longer. The model finds the exact period with the arithmetic-geometric mean (AGM): start with the pair 1 and cos(θ₀/2), where θ₀ is the release angle, and four times replace the pair by its average and the square root of its product. The two numbers meet at M, and the exact period is T = T₀ / M. The extra time from the wide swing is 100 × (1/M - 1) percent.
The swing over time. The angle at each moment comes from the first two terms of the exact solution's series, so a wide swing keeps its true shape. The swing slowly fades by drag, drawn as a shrink by a factor of e (about 2.7) in a fade time τ = π(ρ_b + 0.5 ρ_f)d / (ρ_f × 0.47 × v₀), where d is the ball's diameter, 0.47 the drag coefficient of a ball and v₀ its top speed at the bottom of the swing. The fade is illustrative and does not change the period.
Calculation sequence
- Check every input (see Validation and status logic).
- If a challenge is loaded, use the values the challenge fixes.
- Look up the ball's density and the world's gravity and fluid; work out the ball's mass.
- Work out the effective gravity, and decide whether the ball floats.
- Work out the small-swing period, the exact period and the extra time from the wide swing.
- Work out the fade time, and build a table of 181 moments covering three full swings, with the angle of the pendulum and of your ghost pendulum at each moment.
- Compare your guess with the real period.
- Work out what the previous run's period was, see what you changed, and choose the Why? sentence.
- Check any challenge.
Outputs and interpretation
- Time for one full swing (period): the exact period, in seconds.
- Your guess: spot on within 5% of the real period, close within 15% (and whether your guess was too long or too short), and not quite otherwise.
- Bob mass: in kg (or lb). It is shown even before you guess, because mass is what most people expect to matter.
- Why?: one sentence. If you changed exactly one thing since your last swing, it says what that change did: a longer or shorter string, another ball, another world or another angle. A change of less than 0.5% counts as hardly any change. If you changed more than one thing, it asks you to change one thing at a time. Otherwise it explains the swing on its own.
- How we got this: the equations above, with this swing's numbers put in, one step per line.
- More results: the period by the small-swing rule, the extra time from the wide swing (%) and the effective gravity.
On the canvas the pendulum swings for three full periods. A faint ghost pendulum swings beside it at the pace of your guess, so you can see at once whether your guess was too fast or too slow.
Challenges
Each challenge scores 100 when it is met and 0 when it is not.
- Tick once a second. On Earth, at a 10 degree release angle, choose the string length and the ball so that each one-way swing takes 1 s: a period of 2.00 s. It is met when the period is within 0.025 s of 2.00 s.
- Odd one out. Three pendulums, A, B and C, swing side by side on Earth. Two keep the same pace and one does not. Look at their balls and strings, make your guess, and lock it in. They start swinging only after you guess. It is met when you choose the one that really swings at a different pace.
- Same tick on the Moon. On the Moon, at a 10 degree release angle, find the string length that gives the same 2.00 s period. It is met when the period is within 0.025 s of 2.00 s.
The big idea. A heavier bob does not swing slower. The swing time is set by the string length and the pull of gravity. A longer string or weaker gravity makes a slower swing; the mass of the ball does not matter. Wide swings take a little longer, and under water the swing slows because the water holds up part of the ball's weight, not because of its mass.
Validation and status logic
The model checks the inputs in this order and reports the first problem it finds:
- The string length is from 0.10 to 2.00 m.
- The ball is one of the four on the shelf.
- The release angle is from 2 to 80 degrees.
- The world is one of the five worlds.
- The units are Metric or Imperial.
- The challenge number is a whole number from 0 to 3, the swing time guess is empty or from 0 to 10 s, and the odd-one-out guess is empty or one of its choices.
- If all of these pass but the ball floats (wood or cork under water), the status reads CHECK: there is no swing to time.
Otherwise the status is OK. A previous-run value that is out of range counts as no previous run; it never makes the status NOT VALID.
Assumptions and limitations
- The ball is treated as a point on a string that does not stretch, and the pivot has no friction.
- The fluid is still. The ball drags half its own volume of fluid along with it.
- The fade by drag is illustrative. Real drag fades a swing differently, and under water a light ball may barely swing at all.
- The angle over time uses two terms of the exact series. For the widest swing, 80 degrees, its error is about 0.02 degrees.
- Mars air is given one value, 0.016 kg/m³, although it changes from day to day.
Restrictions and non-computing states
- When an input fails a check, the status reads NOT VALID with the reason, and every result is empty except the version lines and the challenge block, which reads No challenge selected, or NOT MET with the goal and a score of 0.
- In free play, every result except the bob mass stays empty until you lock in your guess. Only the starting position of the pendulum is shown.
- In challenge 2 the three pendulums stay at their starting position until you lock in your guess, and the single pendulum's results are not used.
- When the ball floats, the status reads CHECK, the period and the other swing results are empty, the effective gravity is shown as a negative number, and the ball is drawn straight above the pivot.
- On the Moon and in a vacuum there is no fluid, so there is no fade time.
Errors and warnings
The status explains each problem in plain words. The wording may change; the checks do not.
- NOT VALID, string length: the length is empty, not a number, or outside 0.10 to 2.00 m.
- NOT VALID, bob: the ball is not one of Steel, Wood, Neoprene or Cork.
- NOT VALID, release angle: the angle is empty, not a number, or outside 2 to 80 degrees.
- NOT VALID, world: the world is not one of Earth, Moon, Mars, Underwater or Vacuum.
- NOT VALID, units: the units are not Metric or Imperial.
- NOT VALID, challenge or guess: the challenge number is not a whole number from 0 to 3, the swing time guess is outside 0 to 10 s, or the odd-one-out guess is not one of its choices.
- CHECK, the ball floats: a wood or cork ball under water rises above the pivot instead of swinging. Choose steel or neoprene, or another world.
If the page cannot reach the model at all, it says so separately. That is a connection problem, not a result of the model.
References
This laboratory is an educational model of a simple pendulum. For a small swing the period is 2π times the square root of the string length over gravity, whatever the mass of the bob. For a wide swing the lab uses the exact period, written with the complete elliptic integral of the first kind and computed by the arithmetic-geometric mean, and it draws the swing from the first two terms of the exact solution's series. In air and water, buoyancy (Archimedes' principle) and the fluid the bob drags along reduce the pull that drives the swing, and drag fades the swing in an illustrative way.
Sources and further reading
- The small-angle period of a simple pendulum, and why it does not depend on the mass of the bob: OpenStax, College Physics 2e, Rice University, section 16.4, The Simple Pendulum. OpenStax
- The pendulum at any amplitude, solved with Jacobian elliptic functions, with a period of four times the complete elliptic integral K: National Institute of Standards and Technology, NIST Digital Library of Mathematical Functions, section 22.19, Physical Applications. NIST DLMF
- The complete elliptic integral K from the arithmetic-geometric mean, and its fast convergence: National Institute of Standards and Technology, NIST Digital Library of Mathematical Functions, section 19.8, Quadratic Transformations. NIST DLMF
- Buoyancy and floating, by Archimedes' principle: OpenStax, College Physics 2e, Rice University, section 11.7, Archimedes' Principle. OpenStax
- Surface gravity of the Moon and of Mars, and the density of the Martian air: NASA Space Science Data Coordinated Archive, Moon Fact Sheet and Mars Fact Sheet, NASA Goddard Space Flight Center. NASA Moon Fact Sheet, NASA Mars Fact Sheet
No table or text from any of these publications is reproduced, and none of their authors or publishers has reviewed or endorses this laboratory.
This laboratory is for learning. Its results hold only within its stated ranges; a real pendulum's string stretches and its pivot rubs, and the fade by drag shown here is illustrative.
Links were current at build time. If one moves, search the document's title rather than reporting a broken link as a defect.
Found a problem, or have an idea?
Tell us if a result looks wrong, a label is unclear, or something is missing. We read every message.