The Spacetime Metric
Level 3 · Undergraduate coreFirst- and second-year universityAbout 14 hours

Calculus, vectors, and differential equations

Build the mathematical language that turns physical stories into local laws and testable trajectories.

Connect derivatives, integrals, vector fields, linear algebra, Fourier modes, and differential equations to the site's mechanics, fields, relativity, and quantum pathways.

Before you begin

  • Level 2 mechanics
  • Algebra, trigonometry, and functions
  • Comfort reading graphs

By the end, you can

  • Interpret derivatives and integrals physically.
  • Compute with vectors, matrices, gradients, divergence, and curl.
  • Solve representative first- and second-order differential equations.
  • Use dimensional analysis, scaling, and numerical integration to test a model.

Interactive model

Explore before calculating

A vector field assigns a vector to each position. These Newtonian acceleration arrows show direction only; use the sample values for magnitude. Both masses contribute in the two-body view.

Gravity has no universal down

Imagine small test objects all around the masses. Each arrow shows the direction in which gravity changes an object’s motion, not the path it follows.

Mass arrangement
Gravity directions in three dimensionsDots mark sample positions. Arrows point along the net gravitational acceleration. The outlined dot is the selected sample. All non-zero arrows have the same length in 3D: they show direction only. Read the strength in the sample values. An arrow can look shorter when it points toward or away from your viewpoint.

Outside one spherical mass, gravity points toward its center from every direction.

All non-zero arrows have the same length in 3D: they show direction only. Read the strength in the sample values. An arrow can look shorter when it points toward or away from your viewpoint. Paler arrows are in the farther half of the scene; pale does not mean weaker gravity.

Viewpoint

These controls move your viewpoint. They do not move the masses or change the gravitational field.

Try it: where is down?

  1. Choose one mass. Predict where the arrows on its far side point, then turn the view to check. Look from above and below: do the arrows still point toward the mass?
  2. Choose two masses and turn the view again. Each arrow now combines both pulls; it need not point at either center. The smaller mass contributes too.

Did turning the view change gravity, or only how you see it?

Check your answer

Only your view changed. The masses and the pull at each point stayed the same. There is no bottom underneath the whole scene.

Selected sample · Scaled teaching units

x, y and z are scene coordinates, not universal up or down.

Position (x, y, z)
1.25; 0.02604; 0
Acceleration (x, y, z)
-2.559; -0.05333; 0
Strength
2.56

Masses in this snapshot

  • A: Mass 4; Radius 0.64; Center (0; 0; 0)
All sample values
The same sample positions and field values used by the diagram
SamplePosition (x, y, z)Acceleration (x, y, z)Strength
11.25; 0.02604; 0-2.559; -0.05333; 02.56
2-1.25; -0.02604; 02.559; 0.05333; 02.56
3-0.9199; 0.07813; 0.84271.884; -0.16; -1.7262.56
40.9199; -0.07813; -0.8427-1.884; 0.16; 1.7262.56
50.1087; 0.1302; -1.238-0.2226; -0.2667; 2.5362.56
6-0.1087; -0.1302; 1.2380.2226; 0.2667; -2.5362.56
70.7524; 0.1823; 0.9814-1.541; -0.3733; -2.012.56
8-0.7524; -0.1823; -0.98141.541; 0.3733; 2.012.56
9-1.209; 0.2344; -0.21392.476; -0.48; 0.4382.56
101.209; -0.2344; 0.2139-2.476; 0.48; -0.4382.56
111.027; 0.2865; -0.6531-2.103; -0.5867; 1.3372.56
12-1.027; -0.2865; 0.65312.103; 0.5867; -1.3372.56
13-0.3124; 0.3385; 1.1620.6397; -0.6933; -2.382.56
140.3124; -0.3385; -1.162-0.6397; 0.6933; 2.382.56
15-0.5473; 0.3906; -1.0541.121; -0.8; 2.1582.56
160.5473; -0.3906; 1.054-1.121; 0.8; -2.1582.56
171.098; 0.4427; 0.401-2.249; -0.9067; -0.82132.56
18-1.098; -0.4427; -0.4012.249; 0.9067; 0.82132.56
19-1.061; 0.4948; 0.4382.173; -1.013; -0.8972.56
201.061; -0.4948; -0.438-2.173; 1.013; 0.8972.56
210.4764; 0.5469; -1.018-0.9757; -1.12; 2.0852.56
22-0.4764; -0.5469; 1.0180.9757; 1.12; -2.0852.56
230.3284; 0.599; 1.047-0.6725; -1.227; -2.1442.56
24-0.3284; -0.599; -1.0470.6725; 1.227; 2.1442.56
25-0.9232; 0.651; -0.5351.891; -1.333; 1.0962.56
260.9232; -0.651; 0.535-1.891; 1.333; -1.0962.56
271.009; 0.7031; -0.2219-2.067; -1.44; 0.45452.56
28-1.009; -0.7031; 0.22192.067; 1.44; -0.45452.56
29-0.5729; 0.7552; 0.81481.173; -1.547; -1.6692.56
300.5729; -0.7552; -0.8148-1.173; 1.547; 1.6692.56
31-0.1226; 0.8073; -0.94640.2512; -1.653; 1.9382.56
320.1226; -0.8073; 0.9464-0.2512; 1.653; -1.9382.56
330.6941; 0.8594; 0.585-1.422; -1.76; -1.1982.56
34-0.6941; -0.8594; -0.5851.422; 1.76; 1.1982.56
35-0.8547; 0.9115; 0.035341.75; -1.867; -0.072382.56
360.8547; -0.9115; -0.03534-1.75; 1.867; 0.072382.56
370.5644; 0.9635; -0.5617-1.156; -1.973; 1.152.56
38-0.5644; -0.9635; 0.56171.156; 1.973; -1.152.56
39-0.03366; 1.016; 0.72790.06894; -2.08; -1.4912.56
400.03366; -1.016; -0.7279-0.06894; 2.08; 1.4912.56
41-0.4165; 1.068; -0.49910.8529; -2.187; 1.0222.56
420.4165; -1.068; 0.4991-0.8529; 2.187; -1.0222.56
430.5505; 1.12; 0.07407-1.127; -2.293; -0.15172.56
44-0.5505; -1.12; -0.074071.127; 2.293; 0.15172.56
45-0.3571; 1.172; 0.24840.7313; -2.4; -0.50882.56
460.3571; -1.172; -0.2484-0.7313; 2.4; 0.50882.56
470.05571; 1.224; -0.2476-0.1141; -2.507; 0.50722.56
48-0.05571; -1.224; 0.24760.1141; 2.507; -0.50722.56
492.05; 0.04271; 0-0.9516; -0.01983; 00.9518
50-2.05; -0.04271; 00.9516; 0.01983; 00.9518
51-1.509; 0.1281; 1.3820.7005; -0.05949; -0.64170.9518
521.509; -0.1281; -1.382-0.7005; 0.05949; 0.64170.9518
530.1782; 0.2135; -2.031-0.08276; -0.09915; 0.9430.9518
54-0.1782; -0.2135; 2.0310.08276; 0.09915; -0.9430.9518
551.234; 0.299; 1.609-0.5729; -0.1388; -0.74730.9518
56-1.234; -0.299; -1.6090.5729; 0.1388; 0.74730.9518
57-1.983; 0.3844; -0.35070.9206; -0.1785; 0.16280.9518
581.983; -0.3844; 0.3507-0.9206; 0.1785; -0.16280.9518
591.684; 0.4698; -1.071-0.7817; -0.2181; 0.49730.9518
60-1.684; -0.4698; 1.0710.7817; 0.2181; -0.49730.9518
61-0.5123; 0.5552; 1.9060.2379; -0.2578; -0.88480.9518
620.5123; -0.5552; -1.906-0.2379; 0.2578; 0.88480.9518
63-0.8975; 0.6406; -1.7280.4167; -0.2974; 0.80240.9518
640.8975; -0.6406; 1.728-0.4167; 0.2974; -0.80240.9518
651.801; 0.726; 0.6576-0.8361; -0.3371; -0.30530.9518
66-1.801; -0.726; -0.65760.8361; 0.3371; 0.30530.9518
67-1.74; 0.8115; 0.71830.8079; -0.3768; -0.33350.9518
681.74; -0.8115; -0.7183-0.8079; 0.3768; 0.33350.9518
690.7813; 0.8969; -1.67-0.3628; -0.4164; 0.77520.9518
70-0.7813; -0.8969; 1.670.3628; 0.4164; -0.77520.9518
710.5385; 0.9823; 1.717-0.25; -0.4561; -0.79710.9518
72-0.5385; -0.9823; -1.7170.25; 0.4561; 0.79710.9518
73-1.514; 1.068; -0.87750.703; -0.4957; 0.40740.9518
741.514; -1.068; 0.8775-0.703; 0.4957; -0.40740.9518
751.655; 1.153; -0.3639-0.7686; -0.5354; 0.1690.9518
76-1.655; -1.153; 0.36390.7686; 0.5354; -0.1690.9518
77-0.9395; 1.239; 1.3360.4362; -0.5751; -0.62050.9518
780.9395; -1.239; -1.336-0.4362; 0.5751; 0.62050.9518
79-0.2011; 1.324; -1.5520.09339; -0.6147; 0.72070.9518
800.2011; -1.324; 1.552-0.09339; 0.6147; -0.72070.9518
811.138; 1.409; 0.9594-0.5285; -0.6544; -0.44540.9518
82-1.138; -1.409; -0.95940.5285; 0.6544; 0.44540.9518
83-1.402; 1.495; 0.057960.6508; -0.694; -0.026910.9518
841.402; -1.495; -0.05796-0.6508; 0.694; 0.026910.9518
850.9257; 1.58; -0.9212-0.4298; -0.7337; 0.42770.9518
86-0.9257; -1.58; 0.92120.4298; 0.7337; -0.42770.9518
87-0.0552; 1.666; 1.1940.02563; -0.7733; -0.55430.9518
880.0552; -1.666; -1.194-0.02563; 0.7733; 0.55430.9518
89-0.683; 1.751; -0.81850.3171; -0.813; 0.380.9518
900.683; -1.751; 0.8185-0.3171; 0.813; -0.380.9518
910.9029; 1.836; 0.1215-0.4192; -0.8527; -0.05640.9518
92-0.9029; -1.836; -0.12150.4192; 0.8527; 0.05640.9518
93-0.5856; 1.922; 0.40740.2719; -0.8923; -0.18920.9518
940.5856; -1.922; -0.4074-0.2719; 0.8923; 0.18920.9518
950.09136; 2.007; -0.4061-0.04242; -0.932; 0.18860.9518
96-0.09136; -2.007; 0.40610.04242; 0.932; -0.18860.9518

This Newtonian snapshot assumes each body's mass is distributed the same way in every direction from its center. It shows only the exterior field, not spacetime curvature. The bodies stay fixed; their motion is not simulated.

Live laboratory

Numerical oscillator bench

Integrate one oscillator with symplectic Euler. Change physical parameters and step size, then watch the trajectory and energy-error warning respond.

ω: 2.000 rad/s

Period: 3.142 s

Max energy drift: 5.26%

Level 3 · Undergraduate core teaching kit

Record the investigation. Teach the reasoning.

A learner-facing lab record and a course-specific instructor guide turn the live model into a repeatable classroom investigation.

Learner record

Oscillator convergence and energy-drift study

When does a numerical trajectory represent the differential equation rather than the stepping method's error?

Download learner record

Instructor guide

Teach for evidence, not button pushing

Learners separate physical parameters from numerical controls and justify convergence using trajectory and invariant diagnostics.

Download instructor guide
Open the complete print-friendly teaching kit →

Lesson 1 of 3

Derivatives, integrals, and local change

How does an infinitesimal rate produce a finite measurable history?

A derivative is a local linear approximation: velocity is dx/dt, acceleration is d²x/dt², and a field gradient gives the steepest local change.

An integral accumulates local contributions. Displacement accumulates velocity; work accumulates force along a path; probability accumulates density over a region.

derivativeintegralgradientdifferential

Worked example

A particle has v(t)=3t² m/s. Find displacement from t=0 to 2 s.

  1. 1. Integrate v over time.
  2. 2. ∫₀²3t²dt = [t³]₀².
  3. 3. Evaluate 8−0.

The displacement is 8 m.

Try it

Slope-to-area duality

Materials: Graph paper or a plotting notebook.

  1. 1. Plot x=t³.
  2. 2. Estimate tangent slopes.
  3. 3. Plot v=3t².
  4. 4. Estimate area under v and compare with changes in x.

Notice: Differentiation and integration connect one physical history in two complementary ways.

Check your understanding: What does ∫F·dr represent?

Answer: Work transferred by a force along a path.

The dot product keeps the component parallel to each displacement element.

Lesson 2 of 3

Vector fields, flux, and circulation

How do local arrows encode sources, sinks, and rotation?

The gradient maps scalar change, divergence measures local outward flux, and curl measures local circulation. These operators make Maxwell's equations compact.

Integral theorems connect local differential statements to measurable boundary fluxes and loops.

vector fielddivergencecurlflux

Worked example

For F=(x,y,z), compute ∇·F.

  1. 1. Differentiate Fx with respect to x: 1.
  2. 2. Differentiate Fy with respect to y: 1.
  3. 3. Differentiate Fz with respect to z: 1.

∇·F=3, a uniform positive source density in this mathematical field.

Try it

Field topology sketch

Materials: Paper and several vector-field formulas.

  1. 1. Sample arrows on a grid.
  2. 2. Mark regions of positive or negative divergence.
  3. 3. Trace a small loop to test circulation.
  4. 4. Compare local and boundary descriptions.

Notice: A picture can suggest topology, while derivatives quantify it.

Check your understanding: What does zero divergence guarantee?

Answer: No local net source or sink; it does not guarantee the field is zero or curl-free.

A divergence-free field can still circulate.

Lesson 3 of 3

Differential equations, modes, and computation

How do laws plus initial conditions generate trajectories and spectra?

A differential equation specifies how a state changes. Initial or boundary conditions select one solution from a family.

Linear systems decompose into modes; Fourier analysis represents complex signals as frequency components. Numerical stepping approximates systems without closed-form solutions.

differential equationinitial conditionnormal modenumerical stability

Worked example

Solve dx/dt=−kx with x(0)=x₀.

  1. 1. Separate variables: dx/x=−kdt.
  2. 2. Integrate: ln x=−kt+C.
  3. 3. Apply x(0)=x₀.

x(t)=x₀e⁻ᵏᵗ, the universal exponential-relaxation form.

Try it

Euler-versus-exact decay

Materials: Spreadsheet or code notebook.

  1. 1. Choose k and x₀.
  2. 2. Step xₙ₊₁=xₙ−k xₙΔt.
  3. 3. Compare with x₀e⁻ᵏᵗ.
  4. 4. Reduce Δt and measure error.

Notice: Numerical answers converge only when the step is small enough and the scheme is stable.

Check your understanding: Why are boundary conditions essential for a cavity-mode problem?

Answer: They select which solutions of the field equation are allowed.

The differential equation alone permits a broader family than the physical geometry.

Formula-to-meaning deck

Read the equation in ordinary language.

v=dx/dt; a=d²x/dt²

Successive time derivatives turn position into velocity and acceleration.

∇f; ∇·F; ∇×F

Gradient, divergence, and curl quantify scalar change, flux sources, and circulation.

dy/dt=f(t,y)

A first-order differential equation generates state evolution from initial data.

Independent practice

Problem set

Work each problem before opening its hint and solution.

  1. 1. Differentiate x(t)=A cos(ωt) twice and identify the equation it satisfies.

    Reveal hint

    Each derivative brings a factor ω and alternates sine/cosine.

    Reveal solution

    x¨=−ω²x, so x¨+ω²x=0.

  2. 2. Compute the gradient of f=x²+y²+z².

    Reveal hint

    Differentiate once with respect to each coordinate.

    Reveal solution

    ∇f=(2x,2y,2z).

  3. 3. Estimate one Euler step for dy/dt=−2y, y(0)=1, Δt=0.1.

    Reveal hint

    y₁=y₀+f(y₀)Δt.

    Reveal solution

    y₁=1−2(1)(0.1)=0.8.

Derivation studio

Build the result, line by line.

Keep the assumptions visible so the mathematics remains auditable.

Starting point

Simple harmonic motion from Hooke's law

F=−kx and F=ma

  1. 1. Set m x¨=−kx.
  2. 2. Divide by m: x¨+(k/m)x=0.
  3. 3. Test x=A cos(ωt+φ).
  4. 4. Match coefficients to obtain ω²=k/m.

x(t)=A cos(√(k/m)t+φ)

A local restoring force generates a global periodic trajectory; initial conditions set amplitude and phase.

Starting point

Wave equation from a stretched string

Transverse force balance on a short string element

  1. 1. Use small-slope tension components at both ends.
  2. 2. Net transverse force is T(∂²y/∂x²)Δx.
  3. 3. Element mass is μΔx.
  4. 4. Apply Newton's law and cancel Δx.

∂²y/∂t²=(T/μ)∂²y/∂x²

Wave speed c=√(T/μ) emerges from restoring tension and inertia per length.

Computational notebook

Turn the model into an experiment.

Numerical oscillator laboratory

When does Euler integration distort an oscillator's conserved energy?

Inputs

  • m, k, initial x and v
  • time step Δt
  • Euler and symplectic-Euler choices

Algorithm

  1. 1. Integrate position and velocity.
  2. 2. Compute K+U each step.
  3. 3. Repeat for several Δt.
  4. 4. Compare phase and energy drift.

Evidence to produce

  • Trajectory and phase-space plots
  • Relative energy error versus time
  • A justified stable-step recommendation

Continue into the evidence