Abakcus

← All articles

Calculus · Real-life applications · Examples by field

50 real-life applications of calculus

Calculus in everyday life, from your morning coffee to the rocket on the evening news.

Every use of calculus worth knowing, sorted by field and explained in plain words, each with its own figure and a worked example with real numbers. For students, for teachers, and for anyone who was told they would never use it.

A GPS satelliteAn astronaut floating freeA cup of coffeeA Saturn V rocket climbing

slope of the rocket's path, right nowdy/dx = 1.59

×4

What happens to your braking distance when you double your speed.

5hours

Typical half-life of caffeine. A quarter of the 3 pm cup is still with you at 1 am.

2.71828

The most a bank can turn one dollar into in a year at 100%, however often it pays.

91%

Roughly how much of a Saturn V on the launch pad was propellant.

How is calculus used in real life?

Calculus is used wherever something changes. It tells a car how far it needs to stop, a pharmacist how often you should take a tablet, a bank how your savings grow, an engineer how much metal a can needs, a phone where it is on the map, a forecaster what tomorrow's weather will be, and a rocket how much fuel it must carry. This page lists 50 such applications, each with the formula behind it, an explanation that needs no calculus to follow, a figure, and a worked example with real numbers.

If you teach, the page is built to be used in class. Every entry ends with a “Work it out” box set out step by step, six of them have an interactive lab that can go on a projector, and each of the eight fields closes with three problems whose answers stay hidden until you ask for them.

The whole subject comes down to four ideas. Every example below is tagged with the one it uses.

The ideaThe question it answersEveryday example
DerivativeHow fast is this changing right now?A speedometer: the rate at which your position changes.
IntegralHow much has built up in total?An odometer: speed added up over the whole trip.
Differential equationIf I know the rate of change, what happens next?A cooling coffee, a dose of medicine wearing off, a savings account.
OptimizationWhat is the best possible value?The can that holds a drink with the least metal.

Examples 1–8 · Coffee, driving, braking, GPS, cooking, cruise control

Calculus in everyday life: at home and on the road

The examples nobody notices, because they all happen before nine in the morning.

Differential equationEveryday life · 1 of 50

1. A cup of coffee cooling down

dT/dt = −k (T − Troom)

Put a hot cup on the table and it starts, without being asked, to obey a rule Isaac Newton wrote down in 1701. The rule is easy to say. A hot object loses heat at a rate proportional to how much hotter it is than its surroundings. A cup at 85 °C in a 21 °C kitchen is 64 degrees too hot and cools quickly. Ten minutes later it is perhaps 40 degrees too hot and cools more slowly. The closer it gets to room temperature, the less it hurries.

Notice what kind of statement that is. It does not tell you the temperature. It tells you how fast the temperature is changing, in terms of what the temperature is now. That is a differential equation, the simplest important one there is. Its solution is an exponential curve that drops steeply at first and then flattens toward the temperature of the room without ever quite arriving: T(t) = Troom + (T₀ − Troom) e−kt.

It also settles an old kitchen argument. If you are going to drink your coffee in fifteen minutes and you want it as hot as possible, should the cold milk go in now or at the last moment? Milk first. It feels backwards, since the milk makes the coffee colder straight away. But colder coffee leaks heat more slowly, and for the whole quarter of an hour it loses less than the black coffee beside it. The gap is a degree or two, not a miracle, but the equation calls it correctly every time. Try it in the lab below.

The same law tells a forensic examiner how long ago a body began to cool, tells a food-safety inspector how fast a pot of soup must be chilled, and tells an engineer how big a heat sink a computer chip needs. Whenever the rate of change of a thing depends on the thing itself, you get this curve. We will meet it again in medicine, in money and in a lump of ancient carbon.

Milk now or milk later?

Lab 01 · dT/dt = −k (T − room)

20406080051015minutes°Cthe room, 21 °C

your coffee after 15 minutes42.9 °C

43.7°milk in straight away

42.0°milk at the last second

Hot things lose heat faster the hotter they are. Cold milk drops the temperature at once, so from then on the cup leaks heat more slowly. Milk first wins, by 1.7 °C here. The model: 200 ml at 85 °C, 50 ml of milk at 5 °C, a mug that sheds 5% of its excess heat a minute.

DerivativeEveryday life · 2 of 50

2. The speedometer and the odometer

v = ds/dt and s = ∫ v dt

Every car has a calculus lesson bolted behind the steering wheel. The odometer tells you how far the car has gone. The speedometer tells you how fast that number is growing at this instant. They are two views of one function, your position along the road, and each can be rebuilt from the other.

Watch the odometer closely enough and you could work out the speed: distance gained divided by time taken, over a shorter and shorter interval. That limit is the derivative. Go the other way, record the speedometer for the whole trip and add it up moment by moment, and you get the distance: that is the integral. On a graph of speed against time, the distance travelled is the area under the curve, and the slope of the curve is your acceleration, the second derivative of position.

That the two operations undo each other is the fundamental theorem of calculus, the single most useful fact in the subject. Average-speed cameras rely on a close cousin of it, the mean value theorem: if your average over a stretch of road was above the limit, then at some instant your speedometer was above it too. No radar gun is needed, only two clocks and a known distance.

The same journey, read two ways

The dashboard

04080120160200240ds/dthow fast the distance is changingadd it uptake the slope0482137∫ v dtevery instant of speed, summed
That each dial can be recovered from the other is the fundamental theorem of calculus. Press the accelerator and you are adjusting a third quantity, the rate of change of speed: the second derivative of position.

IntegralEveryday life · 3 of 50

3. Braking distance and speed limits

d = v² / (2μg)

A child steps into the road and you brake. How far does the car travel before it stops? There are two pieces. While your brain reacts and your foot moves, the car carries on at full speed: distance equals speed times time, a straight line. Then the brakes bite, and what they must do is remove the car’s energy of motion, which is ½mv².

Brakes push back with a roughly constant force, and force added up over distance is work: W = ∫ F dx. Set the work equal to the kinetic energy and the mass cancels, leaving a braking distance proportional to the square of the speed. At 50 km/h on a dry road the brakes need about 14 metres. At 100 km/h they need about 56. Twice the speed, four times the road.

That square, which falls straight out of an integral, is the reason the limit outside a school is 30 and not 45, and the reason ten extra kilometres an hour matters far more on a motorway than it seems to. It also explains why the speed at impact is so sensitive: a car that could just stop in time from 50 km/h is still doing more than 30 km/h at the same spot if it started from 60.

Twice the speed, four times the road

Lab 02 · d = v² / 2μg

050100150200020406080100120140speed, km/hmetres to stop

distance to a full stop from 50 km/h35 m

21 mbefore your foot moves

14 mwith the brakes on

That is about 8 car lengths. The yellow part is a straight line: speed × reaction time. The part above it is an integral, and it bends upward with the square of the speed.

DerivativeEveryday life · 4 of 50

4. GPS and the blue dot on your map

v ≈ Δs / Δt → ds/dt

A GPS receiver does not measure speed. It measures where you are, about once a second, by timing radio signals from at least four satellites. The speed on your screen is worked out from those positions: the distance between two fixes divided by the time between them. Shrink the interval and that ratio becomes the derivative of position. Your phone is differentiating all the way to work.

The satellites themselves are a calculus problem. They orbit some 20,000 km up at nearly 4 km a second, and their positions must be predicted to within a metre by solving the differential equations of orbital motion. Because they move fast and sit high in the Earth’s gravity, their clocks also run about 38 millionths of a second a day ahead of clocks on the ground. Light covers more than eleven kilometres in that time, so an uncorrected system would drift by about that much every day. The correction is computed in advance and built into every satellite.

When the signal drops in a tunnel, the phone switches to its accelerometer and integrates instead: acceleration to speed, speed to position. When you arrive, the curve your wheels trace into the space is its own piece of mathematics, which we worked through in the geometry of perfect parking.

Albert Einstein, photographed in 1921A GPS navigation satelliteBerlin, 1915 · gravity slows clocks20,200 km up · 38 microseconds a day fast

Albert Einstein never saw a satellite, but every GPS receiver depends on him. Clocks in orbit run about 38 millionths of a second a day faster than clocks on the ground. Left uncorrected, the blue dot would drift by roughly ten kilometres a day.

Differential equationEveryday life · 5 of 50

5. Cooking: why thick food takes so long

∂T/∂t = α ∂²T/∂x²

Heat does not arrive in the middle of a roast all at once. It creeps inward from the surface, layer by layer, and the rule it follows is the heat equation, published by Joseph Fourier in 1822. In words: the temperature at a point rises at a rate set by how sharply the temperature curves around it. A point that is colder than the average of its neighbours warms up; the bigger the difference, the faster.

The most useful thing the equation tells a cook is a square law. The time for heat to reach the centre grows with the square of the thickness. A steak twice as thick does not need twice as long. It needs about four times as long. That is why a thin cutlet is done in minutes and a whole turkey takes hours, why you flatten chicken before frying it, and why a large potato boils so much more slowly than the same weight of small ones.

It also explains carry-over cooking. When meat leaves the oven its outside is far hotter than its middle, and heat goes on flowing inward for several minutes. The centre of a large roast can climb another 5 °C on the counter. Recipes that say “rest before carving” are quoting the heat equation, and the wireless probes that predict when your dinner will be ready are solving it in real time.

DerivativeEveryday life · 6 of 50

6. Cruise control and the thermostat

u = Kp e + Ki ∫ e dt + Kd de/dt

Set your cruise control to 100 km/h and drive at a hill. The car slows, the controller notices, and it opens the throttle. How much? The obvious rule is “in proportion to the error”: 4 km/h too slow, add a certain amount of throttle; 8 too slow, add twice as much. That is the P, for proportional. On its own it has a flaw. To keep the extra throttle on, it needs an error to respond to, so it settles a little below the speed you asked for and stays there.

The cure is to add up the error over time and push harder the longer it lasts. That running total is an integral, the I. It keeps growing until the error is exactly zero. The third term looks at how fast the error is changing, its derivative, the D. If the car is closing in on the target quickly, D eases off early so it does not overshoot.

Together they make the PID controller, first analysed in 1922 for the automatic steering of ships and now the most common control law on Earth. It holds your oven at 180 °C, your refrigerator at 4, a drone level in a gust, a 3D printer nozzle at 210, and the read head of a hard disk on its track. It is one of the few machines with calculus in its name, and there are a dozen in every home.

IntegralEveryday life · 7 of 50

7. Fuel economy and air resistance

E = ∫ F dx,   F = ½ ρ Cd A v²

Two forces hold a car back on a level road. Rolling resistance, from the tyres, is nearly the same at any speed. Air resistance is not. It grows with the square of the speed, because a car going twice as fast hits twice as much air each second and hits it twice as hard.

The fuel you burn is the energy needed to push against those forces, and energy is force added up over distance: E = ∫ F dx. So the energy lost to the air on every kilometre also grows with the square of your speed. Going from 110 to 130 km/h raises it by about 40%. The power the engine must supply, energy per second, grows with the cube, which is why top speed is so expensive: pushing through the air twice as fast takes eight times the power.

For a typical car the two forces are equal at around 70 km/h. Below that the tyres dominate; above it you are mostly paying to move air. The same calculation shapes aeroplane wings, cycling helmets and the pointed noses of high-speed trains, and it is the reason electric-car range drops so sharply on the motorway.

IntegralEveryday life · 8 of 50

8. Fitness trackers and step counters

v = ∫ a dt, s = ∫ v dt, E = ∫ P dt

The chip inside a watch or a phone that counts your steps is an accelerometer. It senses one thing only: how hard it is being pushed in each direction, a few hundred times a second. Everything else on the screen is calculated. Speed is the integral of acceleration. Distance is the integral of speed. A stride shows up as a repeating bump in the signal, and the software counts the bumps.

Integration has a weakness that every engineer learns early. A tiny constant error in the acceleration becomes an error in speed that grows with time, and an error in position that grows with time squared. A bias of just 0.1 m/s² puts you 180 metres off after a single minute. That is why a watch does not rely on the accelerometer alone. It keeps correcting the integral against GPS fixes, blending the two with a filter that is itself built on calculus.

The calories are one more integral. Your body’s power output, estimated from heart rate and pace, is a rate in joules per second. Add it up over the length of the run and you have the energy you spent. The same sum, done by the electricity meter on your wall, turns kilowatts into the kilowatt-hours on your bill.

For the classroom · Everyday life

Three problems to try

  1. Soup at 90 °C is left in a 20 °C kitchen. After 10 minutes it is at 55 °C. What will it be after 20 minutes?

    Show the answer

    The excess over room temperature halves every 10 minutes: 70 → 35 → 17.5. So 20 + 17.5 = 37.5 °C.

  2. A car needs 9 m to brake from 40 km/h. Roughly how far does it need from 80 km/h, and from 120 km/h?

    Show the answer

    Braking distance grows with v². Double the speed: 4 × 9 = 36 m. Triple it: 9 × 9 = 81 m.

  3. A roast 5 cm thick needs 50 minutes. Estimate the time for one 7.5 cm thick.

    Show the answer

    (7.5 / 5)² = 2.25, so about 50 × 2.25 ≈ 112 minutes.

Examples 9–16 · Cans, bridges, buildings, electricity, aircraft, roller coasters

Applications of calculus in engineering and physics

Almost every made object was sized, shaped or stress-tested with a derivative set to zero or an integral added up.

OptimizationEngineering and physics · 9 of 50

9. The shape of a drinks can

dA/dr = 0 ⟹ h = 2r

Well over a hundred billion drinks cans are made every year. Shave a sliver of metal off each and you have saved a mountain. Finding the sliver is a first-year calculus problem. A can has to hold 355 millilitres. It could do that as a tall thin tube or a flat wide disc, and each of those wastes metal: the tube has too much wall, the disc too much lid. Somewhere between them is a shape that uses the least.

Write the amount of aluminium as a function of the radius and draw its graph. The graph is a valley. At the very bottom of a valley the ground is level, which in the language of calculus means the slope, the derivative, is zero. So you differentiate, set the result equal to zero, and solve. The answer comes out clean: the least metal is used when the can is exactly as tall as it is wide.

But look at the can on your desk. It is nearly twice as tall as it is wide. Did the engineers skip the lecture? No. They solved a harder version of the same problem. The lid is much thicker than the wall and costs more per square centimetre, so the true optimum has smaller ends. The can must also survive the pressure of a fizzy drink, fit a hand, stack on a pallet and stand out on a shelf. And the lab below shows why they can afford to: the bottom of the valley is very flat. A real can gives up only about two per cent to the ideal shape. Near any minimum, small changes cost almost nothing, precisely because the slope there is zero.

The first person to notice that was buying wine. In 1613 the astronomer Johannes Kepler ordered barrels for his wedding in Linz. The merchant priced each one by pushing a rod through the bung hole until it hit the far bottom edge and reading the price off the wet length. Kepler was indignant: a long thin barrel and a short fat one could give the same reading and hold very different amounts. So he worked out which shape holds the most wine for a given rod. It took him a book, published in 1615, in which he sliced solids into thin pieces and added them up decades before anyone called that integration. He found that Austrian barrels were built almost exactly to the best proportion, and he saw why the crude rod worked anyway: near the maximum, he wrote, a change in shape makes hardly any difference to the volume. Half a century later that remark became a method, in the hands of Fermat, Newton and Leibniz.

Design a drinks can

Lab 03 · dA/dr = 0

25030035040045023456radius, cmaluminium, cm²least possible: 278 cm²

aluminium needed284 cm²

more than the minimum2.2 %

shape6.6 × 10.4 cm

The curve bottoms out where its slope is zero: at a radius of 3.84 cm, when the can is exactly as tall as it is wide. Notice how flat the valley is. A real can sits well away from the bottom and pays almost nothing for it.

Kepler's wine barrel: one rod, many barrels

Linz, 1613

the rod: one length, dbung holethe priceset by d alonethe wineset by the shape
A wine merchant priced Kepler's wedding barrels by the wet length of a rod pushed in through the bung hole. Kepler worked out which barrel shape holds the most wine for a given rod, and noticed that near the best shape a small change makes hardly any difference. That remark later became the method used on the can.

Differential equationEngineering and physics · 10 of 50

10. Suspension bridges

y″ = w / H ⟹ y = (w / 2H) x²

Hold a chain by its two ends and let it hang. The curve it makes looks like a parabola, and Galileo thought it was one. It is not. A chain carries its own weight, which is spread evenly along its length, and the curve that results is the catenary, found in 1691 by Leibniz, Huygens and Johann Bernoulli by solving a differential equation.

Now hang a road from that chain. The weight of the deck is far greater than the weight of the cable, and it is spread evenly along the horizontal, not along the cable. That one change alters the equation. The slope of the cable at any point must balance the weight of all the deck between that point and the middle, so the rate of change of the slope is constant: y″ = w/H. Integrate twice and you get a parabola. The main cables of the Golden Gate Bridge, the Brooklyn Bridge and the Bosphorus bridges are parabolas for this reason.

The same integration hands the engineer the number that matters most, the pull in the cable: H = wL²/8d, where L is the span and d the sag. A flatter cable looks elegant and pulls much harder on its anchorages. Every suspension bridge is a negotiation with that formula.

IntegralEngineering and physics · 11 of 50

11. Beams, floors and skyscrapers

EI · d⁴y/dx⁴ = w

Will the floor hold a piano? Will the balcony sag? Will the wing of an airliner flex three metres or thirty? All of these are one calculation, worked out in the 1750s by Leonhard Euler and Daniel Bernoulli, and it is four integrations long.

Start with the load on the beam, in newtons per metre. Integrate it along the beam and you get the shear force, the tendency of one slice to slide past the next. Integrate again and you get the bending moment, which is what actually snaps things. Integrate twice more, dividing by the stiffness of the material and the shape of the cross-section, and you have the deflection: how far each point of the beam moves.

Two consequences run through all of structural engineering. The sag of a beam under an even load grows with the fourth power of its span, so a floor that spans twice the distance sags sixteen times as much. And stiffness grows with the cube of the depth, which comes from an integral over the cross-section. That is why a floor joist stands on its edge, why steel is rolled into I-shapes with the metal far from the centre, and why you can bend a ruler one way and not the other.

Leonhard EulerDaniel BernoulliEuler · born Basel, 1707D. Bernoulli · born Groningen, 1700

Leonhard Euler (left) and Daniel Bernoulli (right), friends from Basel, worked out around 1750 how a loaded beam bends. Their equation is still the first one a structural engineer reaches for.

Differential equationEngineering and physics · 12 of 50

12. Electricity and charging your phone

I = C dV/dt, V = L dI/dt

A resistor obeys a plain rule: voltage is current times resistance. The other two basic components of electronics do not. The current into a capacitor depends on how fast its voltage is changing. The voltage across a coil depends on how fast its current is changing. Both laws are derivatives, and so every circuit with a capacitor or a coil in it is a differential equation.

The simplest is a capacitor charging through a resistor. The emptier it is, the faster it fills, so it rushes at first and then creeps: the coffee-cup curve turned upside down. After one “time constant” RC it is 63% full, after three it is 95% full. A phone battery is chemistry and not a capacitor, but its charger follows a similar plan, which is why the first half goes in so much faster than the last tenth.

Calculus is in the wall socket too. Mains voltage swings back and forth as a sine wave fifty or sixty times a second, so its plain average is zero. The “230 volts” or “120 volts” on the label is a different average, defined by an integral of the voltage squared, because that is what measures heating. And the bill you pay is an integral outright: power, in kilowatts, added up over time into kilowatt-hours.

IntegralEngineering and physics · 13 of 50

13. Aeroplanes and the flow of air

L = ∮ p dA = ½ ρ v² S CL

What holds 70 tonnes of airliner in the sky? Air pressure, and nothing else. The wing is shaped and tilted so that air speeds up over the top and the pressure there drops; underneath it stays a little higher. The lift is the total of all those small pushes over the whole surface of the wing, which is an integral of pressure over area.

The pressures themselves come from the Navier–Stokes equations, a set of differential equations written down between the 1820s and the 1840s that say how the velocity of a fluid changes from point to point and moment to moment. They are so hard that nobody has proved they always have a smooth solution; a million-dollar prize is on offer for anyone who does. Engineers solve them numerically, cutting the air around an aircraft into hundreds of millions of small cells and stepping forward in time.

The surprise is how small the pressure difference is. An airliner flies on a difference of about 5% of atmospheric pressure between the two sides of its wing. The same mathematics shapes the blades of wind turbines, the bodies of racing cars, the dimples of a golf ball, and the curve of a football that bends around a wall.

The Wright Flyer in the air at Kitty Hawk on 17 December 1903, with Wilbur Wright running alongsideWilbur Wright, 1905Orville Wright, 1905Kitty Hawk · 17 Dec 190312 seconds · 37 metres

Wilbur (left) and Orville Wright, and the photograph of their first powered flight at Kitty Hawk on 17 December 1903. Before building the aeroplane they measured lift and drag on some two hundred wing shapes in a home-made wind tunnel.

DerivativeEngineering and physics · 14 of 50

14. Roller coaster loops

a = v² / r, curvature = dθ/ds

The first looping roller coasters, built in the 1890s, used circular loops and injured their riders. The reason is one formula. A body moving at speed v round a curve of radius r is accelerated toward the centre by v²/r. To get over the top of a circular loop without falling, a car must enter the bottom so fast that the riders are pressed into their seats with six times their own weight, and that force arrives the instant the track changes from straight to curved.

The cure, introduced in 1976 on Revolution at Six Flags Magic Mountain in California, was to change the shape. A modern loop is built from clothoids, curves whose curvature, the rate at which the direction turns per metre of track, grows steadily along its length. The curve is gentle at the bottom, where the car is fast, and tight at the top, where it is slow. Since the force is v²/r, a big radius where v is large and a small radius where v is small keeps the push nearly constant and far lower.

Clothoids are everywhere once you look. Motorway exit ramps and railway curves use them so that the steering wheel, or the sideways force on a passenger, changes smoothly. For another curve chosen by calculus, see the fastest slide between two points.

Differential equationEngineering and physics · 15 of 50

15. Car suspension and earthquake-proof towers

m x″ + c x′ + k x = 0

Push down on the corner of a car and let go. A spring pushes back in proportion to how far it is squeezed, a shock absorber pushes back in proportion to how fast it is moving, and the mass of the car resists any change in speed. Put those three sentences together and you have the most used equation in mechanical engineering: a second-order differential equation, with position, its first derivative and its second derivative all in one line.

Its solutions come in three kinds, and you have felt all of them. Too little damping and the car bounces up and down several times after a bump. Too much and it is harsh and slow to recover. In between is “critical” damping, the value that returns the car to level as quickly as possible without overshooting. The designer finds it by solving the equation: c = 2√(km).

Scale the same idea up five hundred times and you get the 660-tonne steel sphere that hangs near the top of the Taipei 101 tower. It is tuned to swing at the building’s own natural frequency, but out of step with it, so that when wind or an earthquake sets the tower swaying, the ball pulls the other way. The same equation, with different letters, describes the tuning circuit of a radio, a door closer, and the needle of a kitchen scale.

OptimizationEngineering and physics · 16 of 50

16. Insulating a house

dQ/dt = U · A · ΔT

A house in winter is the coffee cup again, with a furnace inside. Heat leaks out through walls, roof and windows at a rate proportional to their area, to how well they conduct, and to the difference between indoor and outdoor temperature. That rate is a derivative: joules per second, which is watts.

The heating bill is the integral of that rate over the whole winter. Since the outside temperature changes hour by hour, engineers add up the temperature difference over time into a single number called degree-days, and multiply. A house in Stockholm and the same house in Madrid differ only in that integral.

Then comes the optimization. Doubling the thickness of insulation halves the heat lost through it, so each extra centimetre saves less than the one before, while costing the same. Write the total cost, insulation plus a lifetime of heating, as a function of thickness; it is a valley, like the one for the can. Differentiate, set to zero, and you have the thickness that building codes are based on. A thermal camera shows you the same calculation as a picture: the bright patches are where the derivative is largest.

For the classroom · Engineering and physics

Three problems to try

  1. A closed cylindrical tin must hold exactly 1 litre (1,000 cm³). Find the radius and height that use the least metal.

    Show the answer

    r³ = V / 2π = 159.2, so r = 5.42 cm and h = 2r = 10.84 cm.

  2. A shelf sags 2 mm under a row of books. You replace it with one of the same wood and thickness but twice as long, carrying books at the same weight per metre. Estimate the new sag.

    Show the answer

    Sag grows with L⁴: 2⁴ = 16, so about 32 mm. Long shelves need a support in the middle.

  3. A capacitor reaches 63% of full charge in 2 seconds. What percentage will it have reached after 4 seconds?

    Show the answer

    The time constant is 2 s, so 4 s is two time constants: 1 − e⁻² = 86.5%.

Examples 17–24 · Drug doses, caffeine, CT scans, blood flow, epidemics

Applications of calculus in medicine and biology

The body is a set of quantities that rise and fall at rates that depend on themselves. That is exactly what a differential equation describes.

Differential equationMedicine and biology · 17 of 50

17. Medicine doses, half-lives and your afternoon coffee

dC/dt = −kC  ⟹  C(t) = C₀ (½)t / t½

Your liver does not remove caffeine at a steady pace, so many milligrams an hour. It removes a steady fraction. The more there is, the faster it goes. That is the cooling law again with different letters, and it has the same kind of solution: a curve that halves, and halves again, on a fixed schedule. For a healthy adult the half-life of caffeine is about five hours, though it ranges widely from one person to the next.

Run the numbers on a 3 pm cup with its 95 milligrams. At 8 pm, half is left. At 1 am, a quarter. And because each cup decays on its own while the next is poured on top, the day’s total is a sum of overlapping curves. Build your own day in the lab below and see what you are taking to bed.

This picture is the working tool of every pharmacist. A drug’s label says “one tablet every eight hours” because someone solved this equation for that drug and found the schedule that keeps the saw-toothed curve above the level where it works and below the level where it harms. Take doses at a fixed interval and the peaks climb for a while and then level off, at a height the same calculation predicts; it takes about five half-lives to get there, which is why some medicines need days to reach full effect.

Change the half-life, as illness, age or another medicine can, and the right schedule changes with it. That is the mathematics behind a doctor lowering a dose for a patient whose kidneys are working slowly.

What is still in you at bedtime

Lab 04 · dC/dt = −kC

01002003004006 am10 am2 pm6 pm10 pm2 am6 amtime of daycaffeine in the body, mgbed, 11 pm

caffeine left at 11 pm55 mg

0.6cups, as if drunk at lights-out

285mg drunk today

Tap the hours you drink a cup

Each cup adds 95 mg at once and then fades by half every 5 hours, because the body clears caffeine at a rate proportional to how much is there. Move the 3 pm cup to 11 am and watch the bedtime number.

IntegralMedicine and biology · 18 of 50

18. CT and MRI scans

I = I₀ e−∫ μ(x) dx

An ordinary X-ray is a shadow. It tells you how much of the beam was absorbed along each line through the body, and nothing about where along the line that happened. A rib in front and a tumour behind are squashed into one grey value. That value is an integral: the total of the tissue’s density, added up along the path of the ray.

A CT scanner takes that same measurement along hundreds of thousands of lines, from every angle around you. The question is then purely mathematical. If you know the integral of a function along every line through it, can you recover the function itself? The Austrian mathematician Johann Radon proved in 1917 that you can, and gave the formula. Nobody had a use for it. Half a century later Allan Cormack and Godfrey Hounsfield turned it into a machine; the first patient was scanned in 1971, and the two shared a Nobel Prize in 1979.

MRI builds its pictures with a different integral. The scanner records radio signals from the hydrogen in your body as a mixture of frequencies, and the image is recovered with a Fourier transform, the same operation that compresses your photos. In both machines the hardware only collects integrals. The picture the doctor looks at is computed.

IntegralMedicine and biology · 19 of 50

19. Blood flow and blocked arteries

Q = π ΔP r⁴ / (8 η L)

Blood in an artery does not move as a solid plug. It sticks to the wall, where its speed is zero, and runs fastest along the centre line. In between, the speed follows a parabola. To find how much blood actually gets through each second, you have to add up the flow in every thin ring from the centre to the wall, each ring with its own speed and its own area. That sum is an integral, first done by the French physician Jean Poiseuille around 1840.

The result is startling. The flow depends on the fourth power of the radius. One power of r² comes from the area of the pipe; the other comes from the fact that a wider pipe also lets the centre run faster. So a vessel that is narrowed to half its radius does not carry half the blood, or a quarter. At the same pressure it carries one sixteenth.

Medicine lives with the consequences. A modest build-up on an artery wall has a large effect, and the heart must raise the pressure to compensate. In the other direction, the body controls where blood goes with tiny muscles that change the radius of small arteries by a few per cent. The same law sizes intravenous needles, drinking straws, oil pipelines and the nozzles of inkjet printers.

IntegralMedicine and biology · 20 of 50

20. Measuring the output of the heart

F = A / ∫ c(t) dt

How many litres of blood does a patient’s heart pump each minute? You cannot put a flow meter in the aorta. What doctors do instead is a neat piece of calculus called the indicator-dilution method.

A known amount of dye, or more often today a measured dose of cold saline, is injected into a vein near the heart. A sensor a little further downstream records the concentration as the marked blood sweeps past: it rises, peaks and tails away over ten or twenty seconds. If the heart is pumping strongly, the dye is diluted into a lot of blood and washes past quickly, so the curve is low and brief. If the heart is weak, the curve is tall and long.

All the dye must pass the sensor eventually, so the amount injected equals the flow multiplied by the area under the concentration curve. Turn that round and the flow is the dose divided by an integral. Monitors in intensive care units do this sum automatically, many times a day.

Adolf FickJohann RadonWürzburg, 1870 · the heart’s outputVienna, 1917 · the maths of the scan

Adolf Fick (left) showed in 1870 how to measure the heart’s output from oxygen alone. Johann Radon (right) proved in 1917 that a shape can be rebuilt from its shadows, half a century before the first CT scanner used his result.

Differential equationMedicine and biology · 21 of 50

21. Epidemics and the curve that gets flattened

dS/dt = −βSI, dI/dt = βSI − γI

In 1927 a Scottish biochemist, William Kermack, and an army doctor, Anderson McKendrick, wrote down the simplest possible account of an outbreak. Sort the population into three groups: Susceptible, Infected, Recovered. New infections happen when a susceptible person meets an infected one, so they occur at a rate proportional to S times I. Infected people recover at a steady rate. That is all.

Those two sentences are two differential equations, and their solution is the curve everyone learned to recognise: a slow start, an explosive rise, a peak and a decline. The model explains why an epidemic turns round before everyone has caught the disease. The number of infected stops growing at the moment dI/dt = 0, which happens when the susceptible share has fallen to 1/R₀, where R₀ is the number of people one case infects at the start. That threshold, 1 − 1/R₀, is the “herd immunity” figure quoted in the news.

It also explains what distancing and vaccination do. Lowering the contact rate β does not just delay the peak. It makes the peak lower and reduces the total number of people ever infected. The flattened curve in the figure is the same equation with a smaller β.

Differential equationMedicine and biology · 22 of 50

22. Tumour growth and the timing of treatment

dN/dt = r N ln(K / N)

A single cell that divides, and whose daughters divide, grows exponentially: the rate of growth is proportional to the number of cells. If tumours kept that up they would be far more dangerous than they are. In practice a tumour slows as it grows, because its inner cells run short of oxygen and food. The curve that fits the measurements best was written in 1825 by Benjamin Gompertz, an actuary studying human lifespans, long before anyone applied it to cells.

The Gompertz equation says the growth rate is proportional to the size, multiplied by a factor that shrinks as the tumour approaches a ceiling. Its solution is an S-shaped curve that rises fast early and levels off. Oncologists use models of this kind to estimate how long a tumour has been growing, to compare how quickly it is changing between two scans, and to plan the spacing of treatment. Chemotherapy kills a fraction of dividing cells with each dose, so small, fast-growing tumours respond differently from large, slow ones, and the schedule is tuned to the curve.

The exponential early phase also carries a sobering piece of arithmetic, worked out on the right: most of a tumour’s history is over before it is large enough to find. That is the mathematical argument for screening.

OptimizationMedicine and biology · 23 of 50

23. Populations, fisheries and wildlife

dP/dt = r P (1 − P / K)

Put a few fish in an empty lake and their numbers grow in proportion to how many there are. But a lake can feed only so many. In 1838 the Belgian mathematician Pierre-François Verhulst added one term to the exponential-growth equation to account for that: a factor (1 − P/K) that shrinks toward zero as the population P approaches the carrying capacity K. The result is the logistic equation, and its solution is the S-curve that describes yeast in a flask, deer on an island and the spread of a new phone through a market.

Now ask the question a fishery manager must answer: how many fish can be taken each year, for ever? You can only harvest what the population adds. So look at the growth rate, rP(1 − P/K), as a function of P. It is zero when there are no fish and zero when the lake is full, and in between it rises to a peak. Take the derivative, set it to zero, and the peak is at exactly half the carrying capacity.

That number, the maximum sustainable yield, is written into fishing quotas around the world. It also carries a warning that the mathematics makes plain. Harvest a little more than the peak and the population cannot replace what is taken; it slides down the left side of the curve, where growth is slower still, and collapses. Several great fisheries were lost that way.

DerivativeMedicine and biology · 24 of 50

24. Glucose monitors and insulin pumps

trend = dG/dt

A person with diabetes who wears a continuous glucose monitor sees two things on the screen: a number, and an arrow. The number is the glucose level now. The arrow is its derivative: flat if the level is steady, tilted if it is drifting, pointing straight up or down if it is changing by more than a couple of units a minute.

The arrow often matters more than the number. A reading of 120 that is falling fast calls for something sweet; the same 120 rising fast after a meal calls for insulin. Reading one without the other is like knowing where a car is but not which way it is going. Users learn to do a piece of calculus in their heads: take the current value, add the rate times twenty minutes, and act on where they are going to be. That is a tangent-line approximation, the first application of the derivative in any textbook.

Automated insulin pumps go further. They estimate how much earlier insulin is still active, which decays along the same half-life curve as any other drug, predict the glucose curve half an hour ahead, and adjust the dose every few minutes with a controller that is a close relative of the PID in a thermostat. It is feedback control, running quietly under someone’s shirt.

For the classroom · Medicine and biology

Three problems to try

  1. A medicine has a half-life of 6 hours. A patient takes 400 mg. How much remains after 18 hours?

    Show the answer

    18 hours is three half-lives: 400 → 200 → 100 → 50 mg.

  2. The radius of a small artery is halved. By what factor does the flow fall, if the pressure is unchanged?

    Show the answer

    Flow goes as r⁴, and (½)⁴ = 1/16. The flow falls to about 6% of what it was.

  3. A new virus has R₀ = 4. What share of the population must be immune for an outbreak to die down?

    Show the answer

    1 − 1/R₀ = 1 − 1/4 = 75%.

Examples 25–31 · Compound interest, loans, profit, pricing, options

Applications of calculus in business, economics and finance

The word “marginal” in an economics textbook is the word “derivative” in disguise.

Differential equationBusiness, economics and finance · 25 of 50

25. Compound interest and the number e

dM/dt = rM  ⟹  M = M₀ ert

In 1683 the Swiss mathematician Jacob Bernoulli asked a banker’s question. Lend one unit of money at 100% interest a year and you get back two. But suppose the interest is added half-way through, at 50%, and then that larger sum earns the second 50%. Now you get 2.25. Add it quarterly and you get more still. If the bank compounded every day, every second, every instant, would the total grow without limit?

It does not. It closes in on 2.71828…, a number Bernoulli could only trap between 2 and 3 and which Leonhard Euler later named e. It is what you get when growth is proportional to size at every instant, which is the caffeine equation with the minus sign flipped. For that reason e appears wherever something grows or decays in proportion to itself: populations, radioactive atoms, the cooling cup, the charge in a capacitor.

You use a shadow of it whenever you do money arithmetic in your head. How long does a sum take to double at a given rate of interest? The exact answer needs a logarithm. The banker’s shortcut, already in print in 1494, is to divide 72 by the rate: at 6% money doubles in about 12 years, at 9% in 8. The same rule tells you how fast a debt doubles on a credit card charging 24% (three years) and how quickly prices double under steady inflation.

The practical lesson is in the shape of the curve. Exponential growth is slow for a long time and then steep, so most of the reward comes at the end. Ten thousand left alone at 7% is worth about 20,000 after ten years, 40,000 after twenty and 80,000 after thirty. The third decade earns four times what the first did, on the same original deposit.

The bank that pays every instant

Lab 05 · (1 + 1/n)ⁿ → e

$1.00 at 100% a year, paid once a year, becomes

$2.00000

Still $0.71828 short of the ceiling.

Splitting the year finer always helps, but less each time. The limit of that process is a number, e, and it is the base of every curve whose growth is proportional to its size.

Years to double your money

The rule of 72

2% a year3% a year4% a year6% a year8% a year10% a year12% a year
Exactln 2 ÷ ln(1 + r)35.023.417.711.99.07.36.1
Rule of 7272 ÷ rate, in your head36.024.018.012.09.07.26.0
The rule works because the natural logarithm of 2 is 0.693, so doubling takes about 69.3 ÷ rate years with continuous growth. For yearly compounding the constant creeps up, and 72 divides neatly by 2, 3, 4, 6, 8, 9 and 12.

Differential equationBusiness, economics and finance · 26 of 50

26. Mortgages and loans

dB/dt = rB − p

A loan is compound interest with a leak. Every month the balance grows by the interest and shrinks by your payment. In the language of calculus, the rate of change of the balance B is the interest rB minus the payment rate p. Solve that equation with the condition that the balance reaches zero on the last day, and you get the fixed monthly payment that every bank and every spreadsheet calculates.

The solution has a shape that surprises most borrowers. In the first years almost the whole payment is interest, because the balance is large. On a thirty-year loan of $300,000 at 6%, the first payment of $1,798.65 contains $1,500 of interest and reduces the debt by less than $300. The balance does not fall in a straight line. It curves, slowly at first and steeply at the end, and it takes twenty-one of the thirty years to pay off the first half.

That same curve is why a small extra payment early in a loan matters so much: it removes principal that would otherwise have earned interest for decades. And it is why the total repaid on that loan is about $647,500, more than twice what was borrowed. None of this is hidden in the small print. It is the solution of one differential equation.

OptimizationBusiness, economics and finance · 27 of 50

27. Marginal cost and maximum profit

P′(q) = 0 ⟺ MR = MC

Ask an economist what the two-hundredth loaf costs a bakery to make and you will not be given the average cost. You will be given the marginal cost: how much the total cost rises when one more loaf is baked. That is the derivative of the cost function. Marginal revenue is the derivative of income in the same way, and marginal anything is a derivative.

The reason economists think this way is that decisions are made at the margin. A firm should make one more unit whenever that unit brings in more than it costs. It should stop at the point where the two are equal. That is the rule “marginal revenue equals marginal cost”, and it is nothing more than the statement that profit, revenue minus cost, has a derivative of zero at its maximum.

On a graph you can see it without any algebra. Profit is the vertical gap between the revenue curve and the cost curve. The gap is widest where the two curves are parallel, where their slopes are equal. Airlines pricing a last seat, factories planning a shift and power stations deciding whether to start another turbine are all standing at that point on the curve.

Alfred MarshallCambridge, 1890 · Principles of Economics

Alfred Marshall drew the crossing curves of supply and demand that every economics student still copies. His Principles of Economics (1890) taught the subject to think in derivatives: what matters is the next unit, not the average one.

DerivativeBusiness, economics and finance · 28 of 50

28. Price elasticity of demand

E = (dQ/dP) · (P / Q)

A café raises the price of a coffee by 10%. Some customers shrug; some walk away. Whether the café ends up with more money or less depends on how many do which, and economists measure that with a single number built from a derivative.

The derivative dQ/dP says how many sales are lost per unit of price increase. Multiply it by P/Q and it becomes a ratio of percentages: a 1% rise in price causes an E% fall in sales. If E is smaller than 1 in size, demand is “inelastic”: customers barely react, and raising the price raises revenue. Petrol, salt and medicine behave like this. If E is larger than 1, demand is “elastic”, and a price rise loses more in customers than it gains per sale. Restaurant meals and airline holidays behave like that.

Revenue is price times quantity, and a line of calculus shows it peaks exactly where E equals 1. Supermarkets estimate elasticities for thousands of products from their till data. Governments use them to predict what a tax on sugar or tobacco will do, and ride-hailing apps recalculate them every few minutes when they set surge prices.

IntegralBusiness, economics and finance · 29 of 50

29. Consumer surplus and totals from rates

CS = ∫ (D(q) − p) dq

You would have paid $5 for the coffee. It cost $3. You walked out $2 ahead, and nobody recorded it. Economists call that gain consumer surplus, and they measure the total for a whole market with an integral.

Line the buyers up from the most eager to the least. The demand curve shows what each one in turn would have been willing to pay. Everyone pays the same market price, so each buyer’s gain is the gap between the curve and the price line. Add the gaps up across all the buyers and you get the area between the demand curve and the price: ∫ (D(q) − p) dq. When a government weighs a new bridge, a tariff or a merger, the change in that area is how the benefit or harm to the public is put into money.

The same move, turning a curve into a total by taking the area under it, runs all through economics. A flow of income, integrated and discounted, is the present value of a pension or a company. The Gini coefficient, the standard measure of inequality, is the area between a country’s actual income curve and the line of perfect equality. Each of them is an integral with a different label.

Differential equationBusiness, economics and finance · 30 of 50

30. Stock options and the Black–Scholes equation

∂V/∂t + ½σ²S² ∂²V/∂S² + rS ∂V/∂S = rV

An option is the right, but not the duty, to buy a share at a fixed price on a future date. If the share ends above that price you pocket the difference; if not, you walk away. What is such a right worth today, when nobody knows where the share will end? For decades traders guessed.

In 1973 Fischer Black, Myron Scholes and Robert Merton found the answer. They showed that an option can be exactly balanced, moment by moment, by holding the right amount of the share itself, and that this requirement forces the option’s value to obey a partial differential equation. With a change of variables it turns into the heat equation, the same one that governs a roast in the oven. The uncertainty in the share price spreads out over time the way heat spreads through metal.

The formula went from a journal to the trading floor within a couple of years, programmed into pocket calculators, and Scholes and Merton received the Nobel Prize in economics in 1997. Traders speak calculus daily without noticing: an option’s “delta” is the derivative of its value with respect to the share price, its “gamma” is the second derivative, and “theta” is the derivative with respect to time. The model has limits, as the crashes of 1987 and 2008 showed, since real markets jump in ways the equation does not allow. It remains the starting point for pricing trillions of dollars of contracts.

OptimizationBusiness, economics and finance · 31 of 50

31. How much stock a shop should order

Q* = √(2DS / H)

A bicycle shop sells 1,200 inner tubes a year. It could order them all in January and pay to store a mountain of rubber. It could order ten at a time and pay a delivery charge every three days. Neither is sensible. In 1913 a production engineer named Ford W. Harris wrote down the cost of each policy and found the best one with a single derivative.

If the shop orders Q tubes at a time, stock falls steadily from Q to zero and is then refilled, so on average Q/2 tubes are sitting on the shelf. That average is itself an integral: the area under the saw-tooth in the figure, divided by time. Storage cost is therefore proportional to Q. The number of orders a year is D/Q, so ordering cost is proportional to 1/Q. Add the two, differentiate with respect to Q, set the result to zero, and you get the economic order quantity.

A neat property falls out. At the best order size the yearly storage cost and the yearly ordering cost are exactly equal. And as with the drinks can, the bottom of the cost curve is flat, so being 20% off costs under 2%. The formula is more than a century old and still sits inside the inventory software of nearly every warehouse and supermarket.

For the classroom · Business, economics and finance

Three problems to try

  1. Using the rule of 72, about how long does $5,000 take to become $20,000 at 8% a year?

    Show the answer

    Doubling takes 72 / 8 = 9 years. $5,000 → $10,000 → $20,000 is two doublings: about 18 years.

  2. A firm’s daily profit from making q items is P(q) = 50q − 0.5q² − 300 dollars. What output maximises profit, and what is the maximum?

    Show the answer

    P′(q) = 50 − q = 0 gives q = 50. P(50) = 2,500 − 1,250 − 300 = $950.

  3. Demand is p = 30 − q and the market price is $10. Find the consumer surplus.

    Show the answer

    Quantity sold is 20. The surplus is the triangle ½ × 20 × (30 − 10) = $200.

Examples 32–37 · Machine learning, graphics, games, photos, lifts

Applications of calculus in computer science and AI

The device you are reading this on performs more calculus in a second than a mathematician does in a lifetime.

OptimizationComputer science and AI · 32 of 50

32. Machine learning and every AI you talk to

w ← w − η · ∂L/∂w

A neural network is a very long formula with adjustable numbers in it, called weights. A large language model has hundreds of billions of them. “Training” means finding values for all those weights that make the formula’s answers as good as possible, and it is done with a method Augustin-Louis Cauchy described in 1847.

Measure how wrong the network is on some examples; call that number the loss. The loss depends on every weight, so picture it as a landscape with billions of dimensions, and the network as a hiker in fog trying to reach the lowest valley. The hiker cannot see the valley. But the derivative of the loss with respect to each weight says which way is downhill for that weight. Nudge every weight a small step in its downhill direction, and repeat a few million times. That is gradient descent.

Computing billions of derivatives at once sounds impossible. The trick that makes it cheap is the chain rule, the same one taught in a first calculus course: the derivative of a function of a function is the product of the derivatives. A network is functions nested inside functions, so the chain rule can be applied layer by layer from the output backwards. The procedure is called backpropagation, and it is running in data centres right now on a scale that uses a noticeable share of the world’s electricity. Recommendation feeds, translation, speech recognition, image generators and chat assistants are all products of it.

Augustin-Louis CauchyParis, 1847 · the method of steepest descent

Augustin-Louis Cauchy described the method in three pages in 1847, as a way of solving equations for the orbits of stars: follow the slope downhill, a small step at a time. Every neural network trained today uses it.

IntegralComputer science and AI · 33 of 50

33. Computer graphics and animated films

Lout = Lemitted + ∫ f · Lin · cos θ dω

Why does a real room look real? Because every point in it is lit not only by the lamp but by every other surface: the red sofa tints the white wall, the floor brightens the ceiling. To compute the colour of one point you must add up the light arriving from every direction, and each of those arriving rays left some other point whose colour depends on the light arriving there.

In 1986 James Kajiya wrote that idea as a single integral equation, known since as the rendering equation. Every realistic computer-generated image is an attempt to solve it. It cannot be solved exactly, so renderers estimate the integral by sampling: they follow thousands of random light paths for each pixel and average the results, a technique called Monte Carlo integration. More samples give a cleaner picture, which is why a single frame of an animated feature film can take many hours of computer time.

Calculus is in the motion as well. Hair, cloth, smoke and water are simulated by solving differential equations for each frame. The smooth curves that draw every letter on this page, and every shape in a vector illustration, are Bézier curves, polynomials defined by their derivatives at the ends. And the easing of an animated button on your phone is a curve chosen for its slope.

IntegralComputer science and AI · 34 of 50

34. Video game physics

v ← v + a·Δt, x ← x + v·Δt

Press the jump button and your character rises, slows, hangs and falls along a clean parabola. No parabola is stored anywhere in the game. Sixty times a second the physics engine does two tiny sums for every moving object: add acceleration times the time-step to the velocity, then add velocity times the time-step to the position.

That is integration done numerically, by the method Leonhard Euler published in 1768. Instead of finding a formula for the whole motion, you walk along it in short straight steps, using the derivative at each point to decide where to go next. It works for a ball, a car, a rag doll or ten thousand pieces of an exploding wall, including cases where no formula exists at all.

The method has a price, and gamers have met it. Each straight step slightly misses the true curve, and the errors add up: with big time-steps a bouncing ball can gain energy from nowhere, and a fast bullet can pass clean through a thin wall between one frame and the next. So engines use small steps and smarter schemes such as Verlet and Runge–Kutta integration. The same family of methods flies spacecraft, forecasts weather and simulates car crashes before any metal is bent.

IntegralComputer science and AI · 35 of 50

35. Photos, music and noise-cancelling headphones

an = (2/T) ∫ f(t) cos(2πnt/T) dt

In 1807 Joseph Fourier made a claim so bold that the leading mathematicians of Paris refused to publish it: any signal at all, however jagged, can be built by adding together plain sine waves of different frequencies. He was right, and the recipe for finding how much of each wave is needed is an integral.

That idea is why your phone can hold ten thousand photographs. A JPEG cuts the picture into small blocks, uses a Fourier-type transform to rewrite each block as a sum of patterns from smooth to finely striped, and throws away the fine patterns your eye would not miss. An MP3 does the same to sound, dropping frequencies masked by louder ones. Streaming video does both, sixty times a second. A typical photo shrinks to a tenth of its raw size with no visible loss.

Noise-cancelling headphones run the idea in real time. A microphone samples the drone of the aircraft cabin, a chip breaks it into its frequencies, and the speaker plays the same waves upside down so that the two cancel. The same mathematics tunes your radio, sharpens ultrasound images and lets a single fibre carry thousands of phone calls. We built it up from scratch in the Fourier transform, explained.

Joseph FourierParis, 1822 · the theory of heat№ 5 · heat in a roast№ 35 · music in a file№ 42 · warmth of a planet

Joseph Fourier appears three times on this page. His 1822 book on heat gave us the equation behind a roasting joint, the idea that any signal is a sum of pure waves, and, two years later, the first argument that the atmosphere keeps the Earth warm.

DerivativeComputer science and AI · 36 of 50

36. Robots, drones and self-driving cars

x(t) → v = x′ → a = x″

A machine that moves itself has to keep answering three questions: where am I, how fast am I going, and how fast is that changing? They are a function and its first two derivatives, and no robot can do without all three.

Planning comes first. A robot arm told to move a cup from one spot to another cannot simply jump to top speed; the motors would stall or the coffee would spill. Its controller designs a path in time on which position, velocity and acceleration all start and end at zero and change smoothly in between. The standard choice is a fifth-degree polynomial, picked because it has the smallest possible total jerk. Human arms, measured in the laboratory, move along almost the same curve.

Then comes knowing where you are. A drone’s gyroscope reports how fast it is rotating; integrate that and you have its tilt. Its accelerometer reports acceleration; integrate twice and you have position. Each integral drifts, so the flight computer blends them with GPS and camera data hundreds of times a second using a Kalman filter, the method that guided Apollo to the Moon. A self-driving car adds one more derivative-based calculation, repeated for every object it sees: given that car’s position and velocity, where will it be in two seconds?

DerivativeComputer science and AI · 37 of 50

37. Lifts, trains and the comfort of a smooth ride

jerk = da/dt = d³x/dt³

Passengers in a modern airliner cruise at 900 km/h and feel nothing. Speed, the first derivative of position, cannot be felt at all. Steady acceleration, the second derivative, feels like a firm push into the seat and is easy to brace against. What makes people stumble and spill their drinks is the third derivative: a sudden change in acceleration. Engineers call it jerk.

You feel it in the last instant of a clumsy stop, when the car’s deceleration vanishes abruptly and your head rocks back. Good drivers ease off the brake just before the car halts for exactly this reason. Lift controllers do the same automatically. A high-speed lift is programmed with strict limits on jerk, typically around one metre per second cubed, so that the acceleration builds up and fades away over a second or so. The fastest lifts in the world travel at more than 70 km/h, and a glass of water on the floor does not ripple.

Train and metro timetables are built on the same limits, and so are the motion profiles of industrial robots, camera gimbals and the print heads of 3D printers. The derivatives beyond jerk have unofficial names too, borrowed from a cereal box: snap, crackle and pop.

For the classroom · Computer science and AI

Three problems to try

  1. A model has loss L(w) = w². Starting at w = 4 with learning rate 0.1, what is w after one step of gradient descent?

    Show the answer

    L′(4) = 8, so w = 4 − 0.1 × 8 = 3.2.

  2. Use Euler’s method with step 0.5 to estimate y(1) for dy/dt = y, y(0) = 1. Compare with the exact value.

    Show the answer

    Step 1: y = 1 + 0.5 × 1 = 1.5. Step 2: y = 1.5 + 0.5 × 1.5 = 2.25. Exact: e = 2.718. Smaller steps close the gap.

  3. An object’s position is x(t) = t³ metres. Find its velocity, acceleration and jerk at t = 2 s.

    Show the answer

    v = 3t² = 12 m/s, a = 6t = 12 m/s², jerk = 6 m/s³.

Examples 38–40 · Rockets, orbits, satellites, the discovery of Neptune

Applications of calculus in space and astronomy

Calculus was invented to explain the motion of the Moon. It has been going back there ever since.

IntegralSpace and astronomy · 38 of 50

38. Rockets and the rocket equation

Δv = ve ∫ dm / m = ve ln (m₀ / m₁)

A launch fills the screen: a tower of metal the height of an office block, and nearly everything you are looking at is about to be burned. A schoolteacher explained why in 1903. A car pushes against the road and a plane against the air. A rocket in space has nothing to push against, so it carries its own something: it throws mass out of the back, very fast, and is shoved forward in return. The trouble is that early in the flight, most of what the engine is lifting is the fuel it will need later. Every kilogram burned at the end had to be carried, and paid for, by fuel burned at the beginning.

Konstantin Tsiolkovsky, a nearly deaf mathematics teacher in the Russian town of Kaluga, turned that into a calculation. Take one small moment of the burn. A little mass dm leaves at the exhaust speed, and the rocket, whose mass at that moment is m, gains a little speed in proportion to dm/m. Add up all those small gains from full tanks to empty. The sum of dm/m is one of the first integrals anyone learns, and it is a logarithm. The speed a rocket can gain is its exhaust speed times the natural logarithm of its full mass over its empty mass.

The logarithm is the cruel part. To gain twice the speed you do not need twice the fuel; you need to square the ratio of full mass to empty. Reaching orbit costs about 9.4 kilometres a second once gravity and air are paid for. Try to buy that with one tank in the lab below. With kerosene you need a machine that is about 95% propellant, with everything else, tanks, engines, guidance and cargo, squeezed into the remaining twentieth. For comparison, a full drinks can is about 95% drink. A rocket has to be built as lightly as a drinks can and then survive a launch.

That is why rockets are so hard, why they shed empty stages as they climb, each stage starting the logarithm afresh with less dead weight, and why the thing on your screen looks the way it does.

Fuel up a rocket

Lab 06 · Δv = vₑ ln(m₀ / m₁)

speed this rocket can gain

5.9 km/s

With this propellant, a single stage needs to be 95% fuel to reach orbit, leaving 5% for tanks, engines and cargo. The logarithm is why: each extra km/s costs more than the last. It is also why rockets drop their empty stages on the way up.

A moon rocket on the pad

What the tower is made of

about 91%propellant: kerosene, hydrogen and liquid oxygen

about 9%tanks, engines, and the spacecraft on top

~2,900 ta Saturn V at lift-off, fully fuelled

Approximate figures for the Saturn V that launched the Apollo missions. The command, service and lunar modules together were well under 2% of the lift-off mass.
Konstantin TsiolkovskyA Saturn V rocketKatherine Johnson, NASA mathematicianKaluga, 1903 · the equationLangley, 1962 · the orbit

Konstantin Tsiolkovsky (left) wrote the rocket equation sixty years before anyone could use it. Katherine Johnson (right) used it, and a great deal more calculus, at NASA. A Saturn V stands between them.

Differential equationSpace and astronomy · 39 of 50

39. Orbits, satellites and bringing astronauts home

d²r/dt² = −GM r / |r|³

Isaac Newton asked his readers to imagine a cannon on a very high mountain. Fire it gently and the ball lands nearby. Fire it harder and it lands further off. Fire it hard enough and the ground curves away beneath the ball as fast as the ball falls: it never lands. It is in orbit. An orbit is not an escape from gravity. It is a fall that keeps missing.

The path is the solution of a differential equation. Gravity sets the acceleration, the second derivative of position, at every point; integrate once for velocity and again for position. For one planet and one small satellite the answer is an ellipse. Add the bulge of the Earth, the pull of the Moon and the drag of the last wisps of air, and it has to be done numerically, step by step.

In February 1962, before John Glenn became the first American to orbit the Earth, his trajectory had been worked out by a new electronic computer. Glenn did not entirely trust it. He asked for the figures to be checked by hand by Katherine Johnson, a mathematician at NASA’s Langley laboratory. “If she says they’re good,” he said, “then I’m ready to go.” She ran the same equations on a desk calculator, through launch, three orbits and re-entry. They were good.

The satellites that tell your phone where it is fly on those same equations, and so do every weather picture, every live broadcast from the other side of the world and every astronaut who has come home.

Katherine Johnson seated at her desk at NASA Langley in 1966, with an adding machine and a celestial training device
Katherine Johnson at her desk at NASA's Langley Research Center, 1966. NASA photograph.

Differential equationSpace and astronomy · 40 of 50

40. Predicting eclipses and finding planets

F = G m₁ m₂ / r² ⟹ T² ∝ a³

Johannes Kepler spent years fitting curves to observations of Mars and found three rules: planets move on ellipses, they sweep out equal areas in equal times, and the square of a planet’s year is proportional to the cube of its distance from the Sun. He had no idea why. In 1687 Newton showed that all three follow, by calculus, from a single law of gravity. It was the first time a few lines of mathematics had explained the heavens, and it is the result calculus was invented for.

The method proved its power in public. Edmond Halley used it to predict that a comet seen in 1682 would return in 1758; it did, sixteen years after his death. Then came a harder test. By the 1840s the planet Uranus was drifting off its calculated path. The French mathematician Urbain Le Verrier assumed an unseen planet was tugging on it and worked the problem backwards: given the wobble, where must the culprit be? He sent his answer to the Berlin Observatory. On the night the letter arrived, 23 September 1846, Johann Galle pointed a telescope at the spot and found Neptune within one degree of it. A planet had been discovered with a pen.

The same calculations give the times of solar eclipses to the second, centuries in advance, and allowed the Voyager probes to be threaded past four planets on one trajectory. They work this well because the sky is not arbitrary. It runs on laws exact enough to be trusted, and plain enough to be learned.

Neptune, photographed by Voyager 2Urbain Le VerrierParis, 31 Aug 1846 · the predictionBerlin, 23 Sept 1846 · found within 1°

Urbain Le Verrier never looked through the telescope. He calculated where an unseen planet had to be to explain the wobble in the orbit of Uranus, and posted the answer to Berlin. Neptune was found the night the letter arrived.

For the classroom · Space and astronomy

Three problems to try

  1. A rocket stage has exhaust speed 4 km/s and burns until its mass is one tenth of what it was. What speed does it gain?

    Show the answer

    Δv = 4 × ln 10 = 4 × 2.30 = 9.2 km/s.

  2. Mars is 1.52 times as far from the Sun as the Earth. How long is a Martian year?

    Show the answer

    T = 1.52^1.5 = 1.87 Earth years, about 687 days.

  3. A satellite circles at 7.7 km/s at a distance of 6,770 km from the Earth’s centre. What is its acceleration toward the Earth?

    Show the answer

    a = v²/r = 7,700² / 6,770,000 = 8.8 m/s². That is the strength of gravity at that height: the satellite is in free fall.

Examples 41–44 · Forecasts, climate, carbon dating, rivers and floods

Applications of calculus in weather and earth science

The atmosphere and the oceans are fluids, and the ground is a clock.

Differential equationWeather and earth science · 41 of 50

41. The weather forecast

state(t + Δt) = state(t) + rate × Δt

In 1922 an English Quaker named Lewis Fry Richardson published a mad idea. The atmosphere, he said, obeys known laws: the equations of moving fluids, of heat and of moisture. So divide the sky into boxes, measure the wind, pressure and temperature in each, use the equations to calculate how fast each number is changing, step forward a short time, and repeat. Weather prediction would become arithmetic.

He tried it by hand, during breaks from driving an ambulance in the First World War. One six-hour forecast for central Europe took him six weeks and came out badly wrong. He imagined a vast hall with 64,000 human calculators working in step to keep pace with the weather. The method was right. He only lacked a computer, and in 1950 one of the first electronic machines, ENIAC, produced the first successful numerical forecast.

Today’s forecasts are Richardson’s scheme exactly, on boxes a few kilometres across, stepped forward every few minutes by some of the largest computers on Earth. The mathematics also explains the limit. In 1963 Edward Lorenz found that these equations amplify the smallest difference in the starting data, the “butterfly effect”, so that useful detail runs out after about two weeks. Within that horizon, though, the gain has been steady: forecasts have gained about one day of useful range every decade since the 1980s.

Differential equationWeather and earth science · 42 of 50

42. The temperature of the planet

C dT/dt = energy in − energy out

Why is the Earth the temperature it is, and not a hundred degrees hotter or colder? The answer is a balance, and the equation for it is the coffee-cup equation with the Sun as the heater. Sunlight arrives at a steady rate. The planet radiates heat away to space at a rate that climbs steeply with its temperature, as the fourth power. If more comes in than goes out, the temperature rises; as it rises, the outflow grows; and the planet settles where dT/dt is zero.

Setting the two sides equal takes one line and gives −18 °C, which is the temperature the Earth would have with no atmosphere. The real average at the surface is about +15 °C. The 33-degree difference is the natural greenhouse effect: water vapour and carbon dioxide absorb part of the outgoing heat, so the surface must be warmer for the books to balance. It is the reason the oceans are liquid.

A full climate model is the same balance written out for every box of air, sea and ice, with the fluid equations of the weather forecast underneath, run forward for decades instead of days. The oceans store so much heat that the planet responds slowly, the way a full kettle responds slowly to the flame, and working out that lag is again a differential equation.

The Earth, photographed from Apollo 17Svante ArrheniusLewis Fry RichardsonStockholm, 1896 · CO₂ and temperature1922 · a forecast worked by hand

Svante Arrhenius (left) worked out by hand in 1896 how much carbon dioxide warms the planet. Lewis Fry Richardson (right) tried the first numerical weather forecast in 1922, also by hand. Both sums are now run on supercomputers, with the same equations.

Differential equationWeather and earth science · 43 of 50

43. Carbon dating

dN/dt = −λN  ⟹  N = N₀ (½)t / 5730

High in the atmosphere, cosmic rays turn a little nitrogen into a radioactive form of carbon, carbon-14. It mixes into the air as carbon dioxide, plants take it in, animals eat the plants, and so every living thing carries the same small proportion of it. At death the intake stops, and the carbon-14 already present begins to disappear.

It disappears by the law of the cooling coffee and the fading caffeine. Each atom has the same chance of decaying in any given second, so the number decaying per second is proportional to the number left. The solution is an exponential with a half-life of 5,730 years. Measure what fraction of the original carbon-14 remains in a piece of wood, cloth, bone or parchment, and the equation returns its age.

Willard Libby worked the method out in Chicago in 1949 and tested it on objects of known age, including wood from an Egyptian tomb; it earned him a Nobel Prize. It has since dated the Dead Sea Scrolls to about two thousand years, the “Iceman” found in the Alps to about 5,300, and countless hearths, ships and manuscripts. After eight or nine half-lives too little is left to measure, so the method reaches back about 50,000 years. For older rocks, geologists use the same equation with slower clocks, such as uranium decaying to lead.

IntegralWeather and earth science · 44 of 50

44. Rivers, reservoirs and flood warnings

V = ∫ Q(t) dt,   dV/dt = Qin − Qout

A gauge on a river measures a rate: how many cubic metres of water pass each second. After heavy rain that rate climbs, peaks and falls away over hours or days, tracing a curve hydrologists call a hydrograph. The question a town downstream cares about is different. It is not how fast the water is coming but how much is coming in total, because that is what must fit between the banks or behind the dam.

The total is the area under the hydrograph: the integral of the flow over the length of the storm. A reservoir operator watches the other side of the same calculation. The volume stored changes at a rate equal to inflow minus outflow, a differential equation, and the gates must be opened early enough that the integral of the expected inflow has somewhere to go. Open too late and the dam overtops; open too early and a summer’s water supply runs out to sea.

The same bookkeeping, a rate integrated into a stock, is used to size storm drains under a city, to plan irrigation, to budget the water behind a hydroelectric dam, and to estimate how much ice a glacier loses in a summer. Whenever you see a unit like “cubic metres per second”, an integral is waiting to be taken.

For the classroom · Weather and earth science

Three problems to try

  1. A sample of charcoal has 12.5% of its original carbon-14. How old is it?

    Show the answer

    12.5% is one eighth, which is three half-lives: 3 × 5,730 = 17,190 years.

  2. A river flows at a steady 200 m³/s. How much water passes in one day?

    Show the answer

    200 × 86,400 s = 17.3 million cubic metres.

  3. At noon it is 12 °C and the temperature is falling at 0.8 °C per hour. Use one Euler step to forecast 6 pm.

    Show the answer

    12 − 0.8 × 6 = 7.2 °C. A real forecast would recompute the rate every few minutes.

Examples 45–50 · Sprinting, the perfect throw, arches, sound

Applications of calculus in sports, architecture and music

Even where nobody is calculating, the best shapes and the best techniques turn out to be answers to calculus problems.

DerivativeSports, architecture and music · 45 of 50

45. Sprinting and split times

v = ds/dt, a = dv/dt

A stopwatch gives one number for a 100-metre race, and that number hides nearly everything interesting. Divide the distance by the time and you get the average speed, which no sprinter ever actually runs at. Starting from rest, the runner must spend most of the race going faster than the average to make up for the beginning.

To see what really happened you need the position at many moments, the split times, and then you need the derivative. The slope of the distance–time curve at each instant is the speed. The slope of the speed curve is the acceleration. Do this for an elite sprinter and a clear picture appears: violent acceleration for the first two seconds, a peak around the 60 to 70 metre mark, and then, against all appearances, a slight slowing to the line. The winner of a 100 metres is usually the runner who slows down least.

Coaches now collect this data with lasers and radar in every training session, and the same analysis is run on swimmers, cyclists, racing cars and thoroughbred horses. We took one race apart completely, split by split, in Usain Bolt’s 9.58 world record, explained with calculus.

OptimizationSports, architecture and music · 46 of 50

46. The best angle for a throw, a kick or a shot

R = (v² / g) sin 2θ, dR/dθ = 0

Throw a ball at a fixed speed. Aim low and it travels fast across the ground but lands quickly. Aim high and it stays up a long time but goes nowhere. Somewhere in between is the angle that sends it furthest, and finding it is a standard exercise. Write the range as a function of the angle, R = (v²/g) sin 2θ, differentiate, and set the derivative to zero. The answer is 45 degrees, and the formula also shows a pretty symmetry: 30 and 60 degrees give the same distance.

Then reality improves the problem. A shot-putter releases the shot from two metres above the ground, which lowers the best angle to about 42 degrees. More important, the human body can push harder horizontally than upward, so the release speed drops as the angle rises. Put both effects into the function and differentiate again, and the optimum falls to 35 to 38 degrees, which is what champions use. Long jumpers take off at only about 20 degrees, because they cannot convert their run-up speed into height.

With air resistance the best angle falls further still. A golf drive leaves the club at only 10 to 15 degrees and relies on backspin for lift. A basketball free throw is the same calculation turned round: the shooter wants the angle that makes the hoop look widest and the result least sensitive to small errors, about 50 degrees. In each case the athlete’s years of practice have found the place where a derivative is zero.

Galileo GalileiTwo New Sciences, 1638 · the parabola

Galileo Galilei showed that a thrown object follows a parabola, and published the proof in Two New Sciences in 1638. Every free throw, long jump and goal kick since has been a footnote to it.

IntegralSports, architecture and music · 47 of 50

47. Cycling, running and energy burned

E = ∫ P(t) dt

Serious cyclists ride with a power meter, a set of strain gauges in the pedals or cranks that reports, second by second, how many watts the rider is producing. A watt is a joule per second: a rate. The meter’s graph jumps about with every hill and every sprint.

What the body cares about is the total. The work done over a ride is the integral of power over time, the area under that jagged graph. Because muscles are only about a quarter efficient, the energy burned is roughly four times the work delivered to the pedals, and by a convenient accident of units that makes the kilojoules of work on the bike computer almost equal to the kilocalories of food used.

The same data drive a nice optimization problem. A rider has a limited store of high-intensity energy and must decide where on the course to spend it. Because air resistance grows with the cube of speed, power spent going fast downhill buys little; the calculus says to push harder on the climbs and into headwinds, and ease off when the going is fast. Marathon pacing, swimming splits and the energy management of a Formula 1 car’s battery are worked out the same way.

Differential equationSports, architecture and music · 48 of 50

48. Arches, domes and the Gateway Arch

y = a cosh(x / a)

In 1675 the English scientist Robert Hooke published a riddle, an anagram in Latin, whose solution he revealed only later: “As hangs the flexible line, so but inverted will stand the rigid arch.” A hanging chain holds itself up purely by tension; every link pulls on its neighbours along the line of the chain and nothing tries to bend it. Flip the shape upside down and every force reverses. Tension becomes compression. An arch built in that shape carries its own weight with no bending at all, which is exactly what stone and brick, strong when squeezed and weak when bent, require.

The shape is the catenary, the solution of the differential equation for a hanging chain, and its formula uses the hyperbolic cosine, a combination of two exponentials. Christopher Wren, with Hooke’s advice, hid a catenary-like cone inside the dome of St Paul’s Cathedral. Antoni Gaudí designed the vaults of his churches in Barcelona by hanging strings and small bags of lead shot from a board, letting gravity solve the equations, and then looking at the model in a mirror.

The most famous example stands in St. Louis. Eero Saarinen’s Gateway Arch, finished in 1965, is 192 metres tall and 192 metres wide, and its centre line is a weighted catenary: the shape a chain takes when its links are heavier toward the ends, as the arch’s own legs are thicker toward the ground. The equation is engraved, in effect, in about 39,000 tonnes of steel and concrete.

Differential equationSports, architecture and music · 49 of 50

49. Musical instruments and sound

∂²u/∂t² = c² ∂²u/∂x²

Pluck a guitar string and each small piece of it is pulled back toward the straight line by its neighbours. The more sharply the string is bent at that point, the harder the pull. “How sharply bent” is the second derivative of the string’s shape, and “how hard it is accelerated” is the second derivative of its position in time. Set them proportional to each other and you have the wave equation, written by Jean le Rond d’Alembert in 1747.

Its solutions for a string held at both ends are a family of standing waves: one hump, two humps, three, and so on. The first is the note you hear. The others, at exactly two, three and four times its frequency, are the harmonics, and they sound at the same time. How strongly each one is present is what makes a guitar, a violin and a piano sound different on the same note, and why a string plucked near the bridge sounds brighter than one plucked in the middle.

The equation also gives the rule every instrument maker uses: frequency is proportional to the square root of tension and inversely proportional to length. Halve the vibrating length with a finger and the note rises an octave. Drums, bells, organ pipes and the air inside a flute obey versions of the same equation, and so does every synthesizer, which solves it backwards: choose the harmonics, and build the sound.

IntegralSports, architecture and music · 50 of 50

50. Statistics, polls and the bell curve

P(a < X < b) = ∫ f(x) dx

The heights of adults, the errors in a measurement, the scores on a large exam and the weights of apples from one tree all pile up in the same shape: many near the middle, fewer further out, in a smooth symmetric hump. It is the normal distribution, the bell curve, and it is drawn so that probability is area. The chance that a value falls between two limits is the area under the curve between them, which is an integral.

This particular integral has no formula in terms of ordinary functions, so for two centuries people used printed tables and now use software. The results are the most quoted numbers in science. About 68% of values lie within one standard deviation of the mean, 95% within two, and 99.7% within three. Every “margin of error” in an opinion poll, every “statistically significant” result in a medical trial, every quality-control limit on a production line and every “1-in-100-year flood” is one of those areas.

A Galton board shows it happening. Beads fall through rows of pegs, bouncing left or right at random, and collect at the bottom in a perfect bell. The curve also hides one of the loveliest surprises in mathematics: the total area under it involves the number π, although there is no circle in sight. We followed that up in the integral that puts π under the bell curve.

Carl Friedrich GaussGöttingen, 1809 · the law of errors68% within one sigma

Carl Friedrich Gauss published the bell curve in 1809 as the law of errors in astronomical measurements. It turned out to describe heights, exam marks and polling errors as well, because all of them are sums of many small chances.

For the classroom · Sports, architecture and music

Three problems to try

  1. A ball is thrown at 15 m/s at 45° from ground level. Ignoring air, how far away does it land?

    Show the answer

    R = v² / g = 225 / 9.8 = 23 m.

  2. A runner produces 150 W of useful power for 2 hours. How much work is that, in kilowatt-hours and in megajoules?

    Show the answer

    150 W × 2 h = 300 Wh = 0.3 kWh, which is 1.08 MJ.

  3. Exam scores are normally distributed with mean 500 and standard deviation 100. What share of candidates score above 700?

    Show the answer

    700 is two standard deviations above the mean, so about 2.5%.

The same 50 examples, sorted by the idea they use

Applications of derivatives, integrals and differential equations

Everything hands-on from this page, in one place

A calculus kit for home or classroom

Calculus sticks when you can measure it. These are the instruments, kits and models mentioned beside the examples above, each one a way to watch a derivative, an integral or a differential equation happen in front of you.

Ember Temperature Control Smart Mug 2, 14 oz, BlackGoes with no. 1Ember Temperature Control Smart Mug 2, 14 oz, BlackCheck price on Amazon →OBDLink MX+ OBD2 Bluetooth ScannerGoes with no. 2OBDLink MX+ OBD2 Bluetooth ScannerCheck price on Amazon →Garmin eTrex 22x Rugged Handheld GPS NavigatorGoes with no. 4Garmin eTrex 22x Rugged Handheld GPS NavigatorCheck price on Amazon →MEATER Plus Smart Meat Thermometer (Honey)Goes with no. 5MEATER Plus Smart Meat Thermometer (Honey)Check price on Amazon →ELEGOO UNO R3 Project Super Starter KitGoes with no. 6ELEGOO UNO R3 Project Super Starter KitCheck price on Amazon →Garmin Forerunner 165 Running Smartwatch, BlackGoes with no. 8Garmin Forerunner 165 Running Smartwatch, BlackCheck price on Amazon →Thames & Kosmos Structural Engineering: Bridges & SkyscrapersGoes with no. 10Thames & Kosmos Structural Engineering: Bridges & SkyscrapersCheck price on Amazon →Snap Circuits Classic SC-300 Electronics Exploration KitGoes with no. 12Snap Circuits Classic SC-300 Electronics Exploration KitCheck price on Amazon →Klein Tools MM400 Auto-Ranging Digital MultimeterGoes with no. 12Klein Tools MM400 Auto-Ranging Digital MultimeterCheck price on Amazon →POWERUP 4.0 Smartphone Controlled Paper Airplane KitGoes with no. 13POWERUP 4.0 Smartphone Controlled Paper Airplane KitCheck price on Amazon →Ravensburger GraviTrax Obstacle Starter SetGoes with no. 14Ravensburger GraviTrax Obstacle Starter SetCheck price on Amazon →TOPDON TC001 Thermal Imaging Camera for AndroidGoes with no. 16TOPDON TC001 Thermal Imaging Camera for AndroidCheck price on Amazon →Pandemic Board GameGoes with no. 21Pandemic Board GameCheck price on Amazon →Texas Instruments BA II Plus Financial CalculatorGoes with no. 25Texas Instruments BA II Plus Financial CalculatorCheck price on Amazon →CanaKit Raspberry Pi 5 Starter Kit PROGoes with no. 32CanaKit Raspberry Pi 5 Starter Kit PROCheck price on Amazon →Sony WH-1000XM5 Wireless Noise Canceling Headphones, BlackGoes with no. 35Sony WH-1000XM5 Wireless Noise Canceling Headphones, BlackCheck price on Amazon →Makeblock mBot2 Coding Robot KitGoes with no. 36Makeblock mBot2 Coding Robot KitCheck price on Amazon →DJI Mini 4K Camera Drone ComboGoes with no. 36DJI Mini 4K Camera Drone ComboCheck price on Amazon →LEGO Icons NASA Artemis Space Launch System (10341)Goes with no. 38LEGO Icons NASA Artemis Space Launch System (10341)Check price on Amazon →Estes 1469 Tandem-X Model Rocket Launch SetGoes with no. 38Estes 1469 Tandem-X Model Rocket Launch SetCheck price on Amazon →Celestron NexStar 8SE Computerized TelescopeGoes with no. 40Celestron NexStar 8SE Computerized TelescopeCheck price on Amazon →Ambient Weather WS-2902 WiFi Smart Weather StationGoes with no. 41Ambient Weather WS-2902 WiFi Smart Weather StationCheck price on Amazon →GQ GMC-300S Geiger Counter Radiation DetectorGoes with no. 43GQ GMC-300S Geiger Counter Radiation DetectorCheck price on Amazon →Pocket Radar Ball Coach Radar GunGoes with no. 45Pocket Radar Ball Coach Radar GunCheck price on Amazon →Garmin Edge 540 GPS Cycling ComputerGoes with no. 47Garmin Edge 540 GPS Cycling ComputerCheck price on Amazon →3B Scientific U10100 Tuning Fork Set, C-Major Scale (8 forks in case)Goes with no. 493B Scientific U10100 Tuning Fork Set, C-Major Scale (8 forks in case)Check price on Amazon →Galton Board Simple Edition Probability DemonstratorGoes with no. 50Galton Board Simple Edition Probability DemonstratorCheck price on Amazon →

As an Amazon Associate, Abakcus earns from qualifying purchases. It costs you nothing extra.

If this page made you curious

The best books to learn calculus

Eight books we recommend, from a story you can read on a train to a full course with every problem worked out. None of them needs a teacher. The full list, with 25 titles in order of difficulty, is in the best calculus books.

For students taking the course

The best calculators for calculus

A graphing calculator draws the curve, finds the slope at a point and adds up the area under it, which is most of what a first course asks for. These four are our top picks; the full comparison, with exam rules, is in the best calculators for calculus students.

As an Amazon Associate, Abakcus earns from qualifying purchases. It costs you nothing extra.

Who actually uses it at work

Jobs that use calculus

JobWhat they use calculus forExamples above
Civil, mechanical and aerospace engineersStress in beams, fluid flow, heat transfer, vibration, trajectories9–16, 38–39
Electrical and electronics engineersCircuits, signals, control systems6, 12, 35–37
Doctors, pharmacists and biomedical engineersDrug dosing, medical imaging, blood flow, growth models17–24
Epidemiologists and ecologistsSpread of disease, population models21, 23
Economists, actuaries and financial analystsMarginal analysis, interest, risk, option pricing25–31, 50
Data scientists and machine-learning engineersTraining models by gradient descent, probability32, 50
Game developers and animatorsPhysics engines, lighting, motion curves33–34
ArchitectsLoads, arches, curved surfaces, heat loss10–11, 16, 48
Meteorologists and climate scientistsForecast models, energy balance41–42
Astronomers and physicistsOrbits, gravity, waves, almost everything else38–40, 49
Sports scientists and coachesSpeed and acceleration from timing data, pacing45–47

In most of these jobs software does the arithmetic. What the person brings is knowing which quantity is a rate, which is a total, and whether the answer on the screen makes sense.

Who invented calculus, and why?

Isaac Newton in England and Gottfried Wilhelm Leibniz in Germany worked it out independently. Newton had his method by 1666, when he was twenty-three, and used it to explain the motion of the Moon and the planets. Leibniz found his in 1675 and published first, in 1684. The notation every student uses today, dy/dx and the long S of the integral sign, is his.

Neither started from nothing. Archimedes had found areas by adding up thin slices around 250 BC. Kepler did the same for wine barrels in 1615, and Fermat was finding maxima and tangents in the 1630s. What Newton and Leibniz saw was that the two problems, slopes and areas, undo each other. That single observation turned a set of clever tricks into a method anyone could learn.

Johannes Kepler1615the wine barrel
Jacob Bernoulli1683the interest
Isaac Newton1701the cooling cup
Konstantin Tsiolkovsky1903the rocket
Katherine Johnson, NASA mathematician1962the orbit
Astronaut Bruce McCandless floating free in space, 19841984the result

Four centuries of applied calculus: Kepler, Jacob Bernoulli, Newton, Tsiolkovsky, Katherine Johnson, and Bruce McCandless flying free of the Space Shuttle in 1984, on an orbit computed in advance.

Why is calculus so useful?

Look back over the list and something odd stands out. A cup of coffee, a bloodstream, a bank balance and a lump of ancient carbon have nothing to do with one another. Yet they follow the same equation, letter for letter. A car and a moon rocket obey the same three laws of motion. The shape that saves metal in a can was first found in a wine barrel.

Nobody arranged for mathematics worked out with pen and paper to fit the world this closely. It simply does, in the kitchen and in orbit alike, and it has not failed yet. The honest response to that is wonder. The world is not a heap of unrelated happenings. It is ordered, and ordered in a way a human mind is able to read, which looks a great deal less like an accident than like a gift from the One who made both the world and the mind.

If you would like to learn to read it yourself, start where Richard Feynman did, with a library book and a notebook, or pick one of the books above. And there is more to explore here: the integral hiding under every bell curve, and four thousand years of people chasing a single number.

Quick answers

Calculus in real life: questions people ask

How is calculus used in everyday life?

Anything that changes at a rate is described by calculus. A car's speedometer shows a derivative and its odometer an integral. A cooling drink, a dose of medicine wearing off and money earning interest all follow the same differential equation. Engineers use derivatives to find the best shape for a can or a bridge, and your phone's GPS, weather app and photo compression all run on it.

What are 10 real-life applications of calculus?

Ten common ones are: working out braking distance from speed, setting medicine doses from half-lives, calculating compound interest and loan repayments, designing bridges and buildings, shaping packaging to use the least material, training artificial intelligence by gradient descent, forecasting the weather, producing CT and MRI scans, compressing photos and music, and planning rocket launches and satellite orbits.

What is a simple real-life example of a derivative?

The speedometer in a car. Position changes with time, and the rate of that change at this instant is your speed, which is the derivative of position. Press the pedal and the needle moves: that rate of change of speed is acceleration, the second derivative. Other everyday derivatives are the trend arrow on a glucose monitor and the marginal cost of making one more item.

What is a simple real-life example of an integral?

The odometer. It adds up your speed over every instant of the trip to give total distance. An electricity bill is another: it adds up the power you draw, moment by moment, into kilowatt-hours. So are the calories on a fitness tracker and the volume of water a river delivers during a storm.

Where are differential equations used in real life?

Wherever the rate of change of something depends on its current state. Cooling food, drug levels in the blood, compound interest, the spread of an epidemic, the motion of a car's suspension, radioactive dating, weather forecasts and satellite orbits are all solutions of differential equations.

How do engineers use calculus?

Engineers use integrals to find the stress and deflection of beams, the lift on a wing and the heat lost through a wall. They use derivatives to find the cheapest or strongest design, and differential equations to predict how circuits, suspensions, buildings and control systems respond over time.

How is calculus used in medicine?

Drug dosing schedules come from exponential decay equations and each drug's half-life. CT and MRI scanners rebuild images by inverting integrals. Blood flow, cardiac output, tumour growth and the spread of infections are all modelled with calculus, and glucose monitors report the rate of change of blood sugar.

How is calculus used in business and economics?

Marginal cost and marginal revenue are derivatives, and profit is greatest where they are equal. Elasticity measures how demand responds to a change in price. Integrals give totals such as consumer surplus, and differential equations describe compound interest, loan balances and the pricing of stock options.

Is calculus used in computer science and AI?

Yes. Neural networks are trained by gradient descent, which uses the derivative of the error with respect to every parameter, computed with the chain rule. Computer graphics solve integral equations for light, game engines integrate motion step by step, and image and audio compression rely on the Fourier transform.

Should you add milk to coffee straight away to keep it hot?

Yes. Newton's law of cooling says an object loses heat at a rate proportional to how much hotter it is than the room. Adding cold milk early lowers the temperature at once, so the cup then cools more slowly. In a simple model of a mug left for fifteen minutes, milk first ends up a degree or two warmer than milk last.

What is the rocket equation?

Published by Konstantin Tsiolkovsky in 1903, it says the speed a rocket can gain equals its exhaust speed times the natural logarithm of its starting mass divided by its final mass. It comes from integrating dm/m as fuel burns. Because of the logarithm, reaching orbit takes a rocket that is roughly 90% propellant at lift-off.

Who invented calculus?

Isaac Newton and Gottfried Wilhelm Leibniz developed it independently in the late 1600s. Newton had his method by 1666; Leibniz found his in 1675 and published first, in 1684. The notation used today, dy/dx and the integral sign, comes from Leibniz. Both built on earlier work by Archimedes, Kepler and Fermat.

Do you need calculus for jobs outside science?

Finance, medicine, economics, data science, architecture, animation and machine learning all rest on it. Software does most of the arithmetic, but knowing what a rate of change and an accumulated total mean is what lets you read the answer and notice when it is wrong.

What is the best book to understand what calculus is for?

Infinite Powers by Steven Strogatz explains calculus through its real uses, from GPS to medicine, without requiring any mathematics. For learning to do it yourself, Calculus Made Easy by Silvanus P. Thompson has been the friendliest starting point since 1910.

Sources & further reading

  • Isaac Newton, "Scala graduum caloris", Philosophical Transactions of the Royal Society 22 (1701), for the law of cooling.
  • Johannes Kepler, Nova stereometria doliorum vinariorum (Linz, 1615), for the wine barrels.
  • Jacob Bernoulli, on compound interest, Acta Eruditorum (1683–1690); Luca Pacioli, Summa de arithmetica (1494), for the rule of 72.
  • Joseph Fourier, Théorie analytique de la chaleur (1822), for the heat equation.
  • W. O. Kermack and A. G. McKendrick, "A contribution to the mathematical theory of epidemics", Proceedings of the Royal Society A 115 (1927).
  • F. Black and M. Scholes, "The pricing of options and corporate liabilities", Journal of Political Economy 81 (1973).
  • K. E. Tsiolkovsky, "Exploration of Outer Space by Means of Rocket Devices" (1903), for the rocket equation.
  • NASA, Katherine Johnson biography, for the Friendship 7 calculations and John Glenn's request.
  • L. F. Richardson, Weather Prediction by Numerical Process (Cambridge, 1922).
  • J. Radon (1917) on recovering a function from its line integrals; G. Hounsfield (1973) on computed tomography.
  • P.-F. Verhulst (1838) for the logistic equation; B. Gompertz (1825) for the Gompertz curve; F. W. Harris, "How many parts to make at once" (1913), for the order quantity.
  • J. T. Kajiya, "The rendering equation", SIGGRAPH (1986); A.-L. Cauchy (1847) for the method of gradient descent.
  • W. F. Libby, Radiocarbon Dating (Chicago, 1952); E. N. Lorenz, "Deterministic nonperiodic flow" (1963).
  • Biomechanical analysis of the 100 m final at the 2009 World Championships in Berlin (IAAF / DLV), for the split times.
  • U.S. Food and Drug Administration, consumer guidance on caffeine, for typical half-life and content of a cup of coffee.
  • The labs on this page are simplified models: constant brake friction, instant absorption of caffeine, a single-stage rocket without air or gravity losses, and a mug with one fixed cooling rate. They show the shape of each law, not a measurement of your kitchen. Nothing here is medical or financial advice. Photographs: NASA (public domain); A small cup of coffee by Julius Schorzman (CC BY-SA 2.0), via Wikimedia Commons; cut-outs made from them for this page.

Beyond Euclid

Liked this? Get one like it every week.

One email a week, handpicked by Ali. 242 issues so far. Free to join.

As an Amazon Associate, Abakcus earns from qualifying purchases.