Type on any line or blank, tap the circles and meters, sketch right on the diagrams and grids, or switch Draw on to write with a finger, stylus or mouse. Your work is saved in this browser on this device only. Nothing is sent anywhere.

v += a·dt · x −= η·f′(x)games · easing · GPS · learning
MathSciencePsychology4 · TechnologyHistoryLanguage & StorytellingArt & DesignExecution
Unizon
Calculus Path · Lens 4: Technology

The Technology
of Calculus

The opening question
A video game draws a new picture 60 times a second. How does it know where a falling ball should be in the next picture?

Step a game ball through time with velocity and acceleration, design smooth animations with easing curves, see how GPS turns timing into position and speed, watch a computer learn by rolling downhill, and find square roots with tangent lines.

Inside this module
  • 00First Principlesp.2
  • 01Game physicsp.4
  • 02Easingp.5
  • 03GPSp.6
  • 04Gradient descentp.7
  • 05Newton’s methodp.8
  • ✦Self-check · Make it · 5 Questions · Side Questp.9
How this works
CoreThe main path. Everyone does this part.
Level UpOptional, harder challenges if you want to push further.
Try ItBounce a ball on paper.

You'll need: a calculator, graph paper, a spreadsheet, a flipbook or sticky notes and a device with an adult’s permission.

Calculus Path · Unizon01/12
Calculus Path · Unizon · Lens 4: Technology00 · Start here
Before anything else
First
Principles

A first principle is a basic truth you can build on. The technology of calculus rests on four: computers take tiny steps, smooth motion means smooth rates, timing can measure distance and downhill finds the best answer.

1

What do I already know?

Dump it all out. Half-sure counts.
How do you think a game makes a jump look real?
How does a map app know how fast you’re going?
Circle every word you could explain to a friend right now. Underline the ones you've heard but couldn't explain.
frametime stepEuler’s methodeasingease-inease-outsatellitesignal timingloss functiongradient descentlearning rateNewton’s method
2

What is necessary?

The building blocks you need before going further

Everything in this module is built from four bricks. Rate yourself on each one, then check the example to see if your rating holds up.

TinySteps. dt
Got itKindaNot yet
SmoothRates. ~
Got itKindaNot yet
TimingDistance. c·t
Got itKindaNot yet
DownhillBest. −f′
Got itKindaNot yet
Is anything else necessary? What else do you think you'd need to know or have to really get this topic?
The Technology of Calculus · Calculus Path · Unizon02/12
Calculus Path · Unizon · Lens 4: Technology00 · Start here
3

What is the objective?

What am I trying to understand or be able to do by the end?
The module's objective

By the end, you’ll be able to step a falling object forward frame by frame, explain easing with derivatives, describe how GPS finds position and speed, run gradient descent by hand and use Newton’s method to find a square root.

  • 01Do 2 game-physics steps.
  • 02Explain ease-in.
  • 03Say why GPS needs 4 satellites.
  • 04Run 3 steps of gradient descent.
  • 05Spot a too-big step.
  • 06Find √2 with Newton’s method.
My objective

The list on the left is ours. Now make it yours. What do you want out of this?

By the end, I want to be able to
The part I'm most curious about is
I'll know I've got there when
Knowledge meter

How much do you know about the technology of calculus right now? Shade the boxes in pencil. You'll come back at the end (p.9) and shade it again in pen.

NothingCould teach it

Why start this way? When you know what you already have (1), what you need (2) and where you're going (3), you learn faster and you notice the gaps. Every module on the Calculus Path starts with these same three questions.

Your route through this module
00
First Principles
01
Games
02
Easing
03
GPS
04
Learning
05
Roots
✓
Check
▶
Make
?
5 Qs
★
Quest
The Technology of Calculus · Calculus Path · Unizon03/12
Calculus Path · Unizon · Lens 4: Technology01 · Games
01
Physics, 60 times a second

Game physics

Games step motion forward in tiny time slices.

Frame by frame

Euler’s method

Games can’t solve motion exactly, so each frame they take a small time step dt:

  • new velocity = v + a × dt
  • new position = x + (new v) × dt

At 60 frames per second, dt is about 0.0167 s.

A falling ball

dt = 0.1 s, a = 9.8 m/s2

Stepv (m/s)x fallen (m)
000
10.980.098
21.960.294

The exact fall after 0.2 s is 0.196 m. Smaller steps get closer.

Adding up tiny changes

Integration in code

Each step adds a small change: that’s a Riemann sum (Lens 1) running in real time. Game engines also handle collisions, friction and bounces, often by flipping and shrinking the velocity when a ball hits the ground.

Think & talk
  • Which game has the most realistic jumps you’ve seen?
  • What would happen in a game if dt were much too big?
Try it

Step it

Continue the table for steps 3, 4 and 5. Then compare with the exact distance 4.9t2 at t = 0.5 s. How big is the error?
Level Up

Why do smaller time steps give better results?

Each step’s error is smaller, like thinner rectangles
The Technology of Calculus · Calculus Path · Unizon04/12
Calculus Path · Unizon · Lens 4: Technology02 · Easing
02
Smooth starts and stops

Easing

Easing makes speed start and end at zero.

Easing

Natural motion

Real things don’t start or stop instantly. Animators use easing curves for position over time (t from 0 to 1):

  • Ease-in: p = t2 (starts slow)
  • Ease-out: p = 1 − (1 − t)2 (ends slow)

At t = 0.5: ease-in 0.25, ease-out 0.75.

Speed is the derivative

Check the start

For ease-in, speed = p′ = 2t, which is 0 at the start, so the motion begins gently. For ease-out, p′ = 2(1 − t), which is 0 at the end. Web designers use curves like CSS ease-in-out, which is cubic-bezier(0.42, 0, 0.58, 1) (Lens 7).

Why it feels right

Brains and motion

Sudden starts look robotic because the speed jumps, an infinite acceleration. Easing keeps speed continuous, and good easing limits jerk too (Lens 3). That’s why menus slide and phone screens bounce instead of snapping.

Think & talk
  • Where have you noticed easing in apps or menus?
  • Why does sudden motion look less natural?
Try it

Flipbook

Make a 10-page flipbook of a ball moving across. Space the positions with ease-in (0, 0.01, 0.04, 0.09 … of the width). Then make one with even spacing. Which looks more natural?
Level Up

For ease-out p = 1 − (1 − t)2, what is the speed at t = 0?

p′ = 2(1 − t) = 2
The Technology of Calculus · Calculus Path · Unizon05/12
Calculus Path · Unizon · Lens 4: Technology03 · GPS
03
Where am I, and how fast?

GPS

GPS turns signal timing into position and speed.

How GPS works

Timing is distance

About 30 GPS satellites orbit about 20,200 km up, each sending its position and a precise time. Radio travels at the speed of light, about 300 m per microsecond, so a receiver turns signal delays into distances. It needs at least 4 satellites: 3 for position, 1 to correct its own clock.

Speed from change

Derivatives in your phone

Your speed is the rate of change of position. A receiver can compare positions second by second, or measure the tiny Doppler shift in each satellite’s signal, which depends on how fast you’re moving relative to it.

Relativity in your pocket

38 microseconds a day

GPS satellite clocks run faster than ground clocks by about 38 microseconds per day, because of Einstein’s relativity. Light goes about 11 km in that time, so without corrections, positions would drift by kilometres each day.

Think & talk
  • How would life change without GPS for a week?
  • Should apps always ask before using your location? Why?
Try it

Walk speed

With an adult’s OK, record a walk in a map or fitness app. Note the distance and time for 3 parts of the walk. Find your average speed for each part. Where did you speed up?
Level Up

A timing error of 1 microsecond is about how far?

About 300 m
The Technology of Calculus · Calculus Path · Unizon06/12
Calculus Path · Unizon · Lens 4: Technology04 · Learning
04
How machines learn

Gradient descent

Step against the slope to reach a minimum.

Learning by going downhill

Gradient descent

Machine-learning models learn by reducing a loss, a measure of how wrong they are. They nudge each setting a little against the slope:

xnew = x − η · f′(x)

η (eta) is the learning rate, the step size.

By hand

f(x) = (x − 3)2, η = 0.25

f′(x) = 2(x − 3). Start at x = 0:

Stepx
00
11.5
22.25
32.625

It heads toward the minimum at x = 3.

Too big a step

Overshooting

With η = 1.1, x goes 0 → 6.6 → −1.32 and jumps farther away each time. Choosing the learning rate is part of the art. Real models adjust millions or billions of settings at once, each with its own slope, using the same idea.

Think & talk
  • Why might a computer need many small steps instead of one big jump?
  • What problems would you want a learning computer to help with?
Try it

Run it

Run 3 steps of gradient descent on f(x) = (x − 3)2 from x = 10 with η = 0.25. Then try η = 0.5. What happens with η = 0.5, and why?
Level Up

With η = 0.25 and x = 1.5, what is the next x?

1.5 − 0.25 × 2(1.5 − 3) = 2.25
The Technology of Calculus · Calculus Path · Unizon07/12
Calculus Path · Unizon · Lens 4: Technology05 · Roots
05
Tangent lines find answers

Newton’s method

Follow tangents to zoom in on a root.

Newton’s method

Tangents find roots

To solve f(x) = 0, start with a guess, follow the tangent line to where it hits zero, and repeat:

xnew = x − f(x)/f′(x)

√2 by hand

f(x) = x2 − 2

The formula becomes xnew = (x + 2/x)/2. Start at 1:

Stepx
01
11.5
21.41667
31.414216

The correct digits roughly double each step.

Inside your calculator

Fast methods

Calculators and computers use fast step-by-step methods like this one, along with others such as series and shortcuts built into the chip, to find roots, logs and trig values. Averaging rules like this for square roots are often traced back to ancient Babylon and Heron of Alexandria.

Think & talk
  • Why is a good first guess helpful?
  • Can you think of other times you got closer step by step?
Try it

Root of 10

Use xnew = (x + 10/x)/2 starting at 3. Do 3 steps. Square your answer to check it. How many steps until your calculator can’t tell the difference?
Level Up

First step for √10 from x = 3?

(3 + 10/3)/2 ≈ 3.1667
The Technology of Calculus · Calculus Path · Unizon08/12
Calculus Path · Unizon · Lens 4: TechnologySelf-check
✓
No pressure, just proof

Quick self-check

Six questions, covering every stop. Show your thinking. Answers are upside down at the bottom; no peeking till you're done.

1 · What does a game add to velocity each frame?

2 · What is speed at the start of ease-in?

3 · Why does GPS need 4 satellites?

4 · What is the learning rate?

5 · What happens if it’s too big?

6 · State Newton’s method.

1) a × dt · 2) zero · 3) 3 for position plus 1 for clock error · 4) the step size η · 5) it overshoots and can diverge · 6) x − f(x)/f′(x)
Back to First Principles

Re-shade your knowledge meter

How much do you know about the technology of calculus now? Flip back to p.3 and shade the meter again in pen (or shade this one). Did any of the four bricks on p.2 move from "Not yet" to "Got it"?

NothingCould teach it
Did I hit my objective? What's my evidence?
The idea that surprised me most:
The Technology of Calculus · Calculus Path · Unizon09/12
Calculus Path · Unizon · Lens 4: TechnologyMini challenge · Make it
Mini challenge · Execution

Bounce a ball on paper

Can you code physics without a computer?

1 · Plan

Simulate a ball dropped from 2 m with dt = 0.1 s and a = 9.8 m/s2 in a table or spreadsheet. When height goes below 0, set it to 0 and flip the velocity, keeping 80% of the speed (a bounce). Run 30 steps.

  • Columns: t, v, height
  • Bounce rule written
  • 30 steps
  • Graph made

2 · Results

BounceTime (s)Peak height (m)
Start02
1
2
3

3 · Must-haves

  • Height–time graph
  • Peaks shrink
  • dt halved test
  • Explain each rule

4 · What I found

What fraction of the height does each bounce keep? What changed when you halved dt? How would a game use this?

Safety first

Use a spreadsheet or paper. If you try a coding site, use one that runs without an account, with an adult’s OK, and don’t share personal details.

The Technology of Calculus · Calculus Path · Unizon10/12
Calculus Path · Unizon · Lens 4: Technology5 Questions I Still Have
The best part of learning is what's next

5 Questions
I Still Have

This module didn't answer everything. Good. Write 5 new questions it didn't answer, one of each type below. There are no wrong questions, only ones nobody's asked yet.

1
How does it work?
Pick something you've seen or used and wonder about the inside of. e.g. "How do games stop things passing through walls?"
2
Why?
Ask about a reason or a cause. e.g. "How do self-driving cars predict motion?"
3
What if?
Change one thing and imagine the result. e.g. "What if GPS stopped working for a day?"
4
Connect it
Link this to another lens (math, science, psychology, technology, history, language & storytelling, art & design, execution) or another subject. e.g. "Who invented calculus? (Lens 5!)"
5
My life & community
Bring it home: your family, your friends, your community. e.g. "What could I teach a computer to learn?"

★ Star the one question you'd most like answered. You'll need it on the next page.

The Technology of Calculus · Calculus Path · Unizon11/12
Calculus Path · Unizon · Lens 4: TechnologySide Quest · Optional
Optional · for the curious

Side Quest

Take your starred question from p.11 and go find the answer, or at least a better question. You're the researcher now.

My quest question:

1What I'll find out

Break your big question into 2 or 3 smaller ones you could actually answer.

2Where I'll look

A library (Edmonton Public Library counts!)An astronomer, engineer or planetarium guideAn experiment I run myselfTrustworthy websites (who wrote it? when?)A book or documentary

3How I'll share it

A one-page zineA 60-second video or talkA poster or infographicA 2-minute talkSomething else

Who I'll share it with:

Done by:

Next on the Calculus Path Lens 5 · History asks: how did Archimedes, the Kerala school, Newton and Leibniz build calculus?
The Technology of Calculus · Calculus Path · Unizon12/12