The model
For a planet of negligible mass around the Sun, with ,
In au and years, au³/yr². The Earth starts from , , , au/yr. Its energy per unit mass is au²/yr², and it should remain constant.
Euler (step ): , (likewise in ).
Euler–Cromer: first , and then : the new velocity is used to move the position.
Project phases
Week 1 — From the derivative to the equation of motion
- With Velocity, acceleration and derivatives we write and and approximate them with difference quotients: .
- We derive the gravitational acceleration by components from directed toward the Sun (lesson Universal gravitation and satellites).
- We check the units: with au and yr, the third law gives .
- Three steps by hand with and Euler, in a table in the notebook, as in the lesson. We observe that already grows in the first step.
Week 2 — Euler in the spreadsheet
- Columns:
t,x,y,vx,vy,r,ax,ay,E. Row 2: initial conditions. Row 3 onward: Euler formulas referring to the previous row; in a separate cell (for example$B$1) so it can be changed without rewriting. - With (100 steps per year) we drag down 100 rows and plot
yagainstx(scatter chart with lines). The orbit does not close: it is an outward spiral. - We plot
Eagainstt: the energy rises steadily. We calculate the relative error after one revolution: and . - We repeat with , , , (up to 1 000 rows). Table: against error. The error goes down proportionally to : Euler is first order. For 1 % error we would need (about 600 rows); for 0.001 %, a million.
Week 3 — Euler–Cromer
- We duplicate the sheet and change only the order: first the velocity, then the position with the new velocity.
- With the same the orbit closes and the energy oscillates around without drift. We measure the error in after one revolution and the amplitude of the oscillation of .
- Table and log–log graph of error against for both methods: the slope of the line is the order of the method. For Euler ≈ 1; for Euler–Cromer the position error is also ~, but the energy does not drift: that is the difference that matters in the long run.
- Badge goal: find the largest for which the Euler–Cromer orbit closes with less than 1 % error in after one revolution, and the largest that achieves it with Euler. Compare how many rows each one needs.
Week 4 — Mars and an elliptical orbit
- Mars: , au/yr (circular velocity). How many steps are needed to complete one revolution? We measure the period in the sheet (when
ycrosses zero going upward again) and compare it with the third law: years. - Elliptical orbit: Earth with . We calculate the expected eccentricity from the energy and the angular momentum and compare it with the one the sheet gives ().
- We check with the simulator Keplerian orbit (exact solution) and, to see higher-order integrators, with N bodies.
- Kepler’s second law in the sheet: we calculate in each row: with Euler–Cromer it is conserved much better.
Week 5 — Report
- Report of 3 to 4 pages: model and units, methods, graphs (orbits and energy), error table with the log–log graph, result of the 1 % goal, Mars and the ellipse, conclusions.
- A 5-minute presentation per pair showing the sheet live: they change and the audience sees how the orbit changes.
- Final discussion: why does such a small change in the order of two lines (Euler → Euler–Cromer) change the result so much? (Euler–Cromer is symplectic: it preserves area in phase space; they will see this at university.)
Mathematics in the project
- Differential equation: is second order; it becomes a first-order system with .
- Euler: . Local error , global error after steps .
- Energy: . In Euler, on a circular orbit, each step multiplies by : the energy grows ~ per step and ~ per revolution.
- Log–log graph: if error , then : the slope is .
- Third law: ; with , (years, au).
Assessment rubric
| Criterion | Developing | Achieved | Advanced |
|---|---|---|---|
| Model and units | Copies the equations without justification | Derives the acceleration components and justifies | Verifies the model with the third law for Mars and an ellipse |
| Implementation | Sheet with reference errors or without parameterized | Both methods correct, in a cell, graphs of orbit and energy | Documented sheet, with and calculated and compared with theory |
| Error analysis | Notices that Euler “opens up” | Error– table and log–log graph with slope ≈ 1 | Explains with the energy why Euler drifts and Euler–Cromer oscillates; reaches the 1 % goal |
| Report and presentation | Incomplete | Complete, with graphs and conclusions | Shows the sheet live and answers questions about the order of the method |
Variants and extensions
- Programming language: rewrite the sheet in Python or JavaScript (20 lines) and compare with the spreadsheet; then try the Verlet method or RK4 (the basis of the higher-education project Your own N-body integrator).
- Earth satellite: replace with km³/s² and simulate a satellite in low Earth orbit (units km and s).
- Two planets: add Jupiter as a second body (without mutual interaction first, with it afterwards) and observe the perturbation on the Earth.
Inclusion
- Spreadsheets work with screen readers; the graphs are complemented with the numerical table read out loud.
- Pair work with roles: one writes the formulas and the other checks the first three steps by hand; then they swap.
- A template with the columns and the first row for those who need initial scaffolding; the 1 % goal has levels (5 %, 2 %, 1 %).
Safety
- Computer-lab work: eye breaks every 25 minutes and proper posture.
- Save the sheet often and with a version name (
orbita-v1,orbita-v2). - As everywhere on the portal: never look at the Sun directly or with instruments without a certified filter.