Skip to content

ResearchMethodsVolume 3, Issue 1, Fall 2026

How to Lose a Planet by Choosing the Wrong Integration Method

We integrated a two-body Kepler orbit with forward Euler, velocity Verlet and RK4, checked every trajectory against the exact solution, and measured exactly how fast each method's energy drifts, at matched timestep and at matched computational cost.

Written jointly by the Science Journaling Club

Study
Computational study
Review
Peer-edited by the club review board
Length
12 sectionsabout 24 min

Abstract

Simulating gravity is one equation applied over and over: acceleration equals minus GMGM times the position vector, divided by the cube of the distance. We integrated a single two-body Kepler orbit (eccentricity 0.6, one hundred steps per orbit, a resolution that looks perfectly reasonable) with three standard stepping rules, forward Euler, velocity Verlet and fourth-order Runge-Kutta (RK4), and checked every trajectory against the exact solution of Kepler's equation rather than against each other. At that resolution, Euler's energy flips sign within the first orbit (from −0.500 to +0.083) and never recovers. Velocity Verlet's energy error oscillates in a bounded band between roughly 0% and 2.99% for the full 300 orbits we ran, with no measurable trend (slope consistent with zero at 0.0 of its own standard error), exactly as symplectic theory predicts, and its angular momentum is conserved to 2.4×10−142.4\times10^{-14} relative error, 107 machine epsilons, indistinguishable from pure floating-point roundoff. RK4 drifts too, just far more slowly and in the opposite direction: it crosses 1% energy loss only after 47.6 orbits and 5% after 234.2 orbits, a real secular trend (21,915 standard errors from zero) that quietly contracts the orbit rather than expanding it. Fitting the measured convergence order across a range of timesteps gives 0.952 for Euler, 1.998 for Verlet and 4.166 for RK4 against textbook values of 1, 2 and 4; repeating the fit across 40 Monte Carlo trials at random eccentricities between 0.10 and 0.60 gives 0.987 ± 0.002, 2.0015 ± 0.0002 and 4.118 ± 0.005, each a small, real, explainable disagreement with the textbook exponent that we report rather than round away. Giving Euler four times the timestep resolution of RK4, so both cost the same number of force evaluations per orbit, does not rescue it: at eccentricity 0.6 it still loses 1% of the orbital energy within about a thousandth of an orbit, a failure of stability, not merely of accuracy, that a bigger budget cannot buy back. We also flag one place our own title oversells the result: at this configuration Euler's planet does not fall into the sun. It gains energy and flies apart, the better-documented and opposite failure mode; the "spiral into the sun" image turns out to describe RK4's slow contraction far better than it describes Euler's fast escape. Master seed 20260901. Total run time 65.0 seconds.

One Equation, Applied Over and Over

Gravity between two bodies is not a complicated law. One mass pulls the other straight toward itself with a strength that falls off as the square of the distance. Write the equation down and a computer can step it forward in time as easily as it adds two numbers, because stepping it forward in time is, quite literally, all that "integrating" an orbit means: take the current position and velocity, apply a small correction, and repeat, tens of thousands of times, until what comes out the other end looks like a planet going around a star.

The catch is that "apply a small correction" is not one algorithm. It is a family of them, and family members disagree, sometimes wildly, about how much energy the orbit is allowed to keep by the end. Choose the wrong member of the family and the planet you just simulated does something no real planet does: it gains energy for free, or loses it for free, for reasons that live entirely in the arithmetic and nowhere in the physics. Watch that happen once, on your own laptop, on an orbit you set up yourself, and it changes how you read every simulated trajectory you did not personally check.

Real orbital-dynamics research takes this seriously for reasons well beyond a school club's curiosity. The solar system itself is chaotic on timescales of tens of millions of years, meaning two integrations that start an immeasurably tiny distance apart, including two runs of the same code with different roundoff, diverge exponentially rather than staying close [15]; serious long-term integrations of planetary orbits are correspondingly run at extremely fine resolution and checked against independent codes for exactly this reason [6]. Nothing in our own two-body problem is chaotic. The failures below are not sensitivity to initial conditions; they are a wrong answer, repeatably, from a fixed method at a fixed resolution, which is in some ways a plainer thing to demonstrate.

This is a methods study, not a discovery about gravity. The two-body problem is one of the few gravity problems with a closed-form answer, and we chose it for exactly that reason: every number below is checked against the exact Kepler ellipse, not against another simulation. Nothing here was observed. The computation is the whole experiment, and every figure, every table entry and every claim in the abstract traces back to a line printed by the program listed under "Analysis code" above.

Three Ways to Take a Step

Work in units where GM=1GM=1 and the semi-major axis a=1a=1, which makes the orbital period exactly T=2πT = 2\pi and turns every quantity below into a clean, dimensionless number. The state of the planet is its position and velocity, (x,y,vx,vy)(x, y, v_x, v_y), and the acceleration is always a=−r/r3\mathbf{a} = -\mathbf{r}/r^3. Three rules turn one state at time tt into the next state at time t+Δtt+\Delta t:

Forward Euler. The oldest and simplest rule there is: xn+1=xn+vnΔtx_{n+1} = x_n + v_n\Delta t, vn+1=vn+a(xn)Δtv_{n+1} = v_n + a(x_n)\Delta t. One force evaluation per step. First order, meaning its error per fixed time interval should shrink in proportion to Δt\Delta t itself.

Velocity Verlet. Split each step into a half-kick, a full drift, and a second half-kick: vn+1/2=vn+12a(xn)Δtv_{n+1/2} = v_n + \tfrac12 a(x_n)\Delta t, xn+1=xn+vn+1/2Δtx_{n+1} = x_n + v_{n+1/2}\Delta t, vn+1=vn+1/2+12a(xn+1)Δtv_{n+1} = v_{n+1/2} + \tfrac12 a(x_{n+1})\Delta t. Also one force evaluation per step, since the acceleration computed at the end of one step is reused as the start of the next. Second order, and symplectic, meaning the discrete map it defines preserves phase-space volume exactly [7], a geometric property Euler and RK4 both lack. Higher-order symplectic methods exist too, built by composing several Verlet-like substeps with carefully chosen weights [4]; we did not test one, and §7 explains why a fourth-order symplectic method would have been a fairer opponent for RK4 than plain second-order Verlet.

Fourth-order Runge-Kutta (RK4). The workhorse of general-purpose numerical integration: four intermediate force evaluations per step, combined with weights 1,2,2,11,2,2,1, give fourth-order accuracy, meaning its error per fixed time interval should shrink as the fourth power of Δt\Delta t. Four times the cost of Euler or Verlet, step for step, and, as the theory section below shows plainly, not symplectic despite the higher order, a point the broader symplectic-integration literature makes at length [8] and one that genuinely surprises people meeting it for the first time.

Cost is charged the honest way, in force evaluations, since that is what actually eats compute time in a real simulation: one per step for Euler and Verlet, four per step for RK4. That accounting matters later, in §9, once the question stops being "which method is more accurate at the same timestep" and becomes "which method is more accurate for the same money."

Checking the Machine Before Trusting It

Two validations ran before any orbit was trusted.

A: does the Kepler-equation solver actually solve the equation? Every comparison below depends on an exact reference orbit, obtained by solving Kepler's equation M=E−esin⁡EM = E - e\sin E for the eccentric anomaly EE by Newton's method [12]. Checked over 740 combinations of mean anomaly and eccentricity spanning everything used in this study, the worst residual was 8.882×10−168.882\times10^{-16}, at machine precision, needing at most 9 iterations to converge. Club value: worst residual 8.882×10−168.882\times10^{-16}. Accepted value: exactly 0. Difference: 8.882×10−168.882\times10^{-16}, the floor of double-precision arithmetic, not a real disagreement.

B: does the reference orbit actually conserve energy and angular momentum? Sampling the closed-form solution at 4,000 points across 7 orbits at e=0.6e=0.6 and recomputing energy and angular momentum independently from the sampled position and velocity, the worst relative deviation from the theoretical constants (E0=−GM/2a=−0.5E_0=-GM/2a=-0.5 exactly, L0=GMa(1−e2)=0.8L_0=\sqrt{GMa(1-e^2)}=0.8 exactly) was 4.441×10−154.441\times10^{-15} for energy and 5.551×10−165.551\times10^{-16} for angular momentum, both at the double-precision floor.

Both checks passed before a single stepping rule was run. The rest of this article compares three approximate methods against this verified exact one, never against each other directly.

The Headline Number

No fitting in this section. Just what the three integrators actually did, in plain arithmetic, at the one configuration used everywhere in this article: eccentricity 0.6, one hundred steps per orbit, Δt=T/100≈0.0628\Delta t = T/100 \approx 0.0628.

Start energy: E0=−0.500000000000000E_0 = -0.500000000000000, exact by construction. After a single orbit, Euler's energy is E0+1.166583×∣E0∣=−0.5+0.583=+0.083E_0 + 1.166583 \times |E_0| = -0.5 + 0.583 = +0.083. Positive. The two-body problem with positive energy is not an ellipse; it is unbound. Euler did this inside one orbit, at a resolution, one hundred steps to go around once, that would strike most people as more than enough. It does not recover: 300 orbits later the energy is +0.0828+0.0828, a number within a rounding error of where it landed after orbit one. Once Euler pumps that much energy in, there is no elliptical orbit left to drift away from.

Verlet, same 300 orbits: energy after orbit 1 is −0.4865-0.4865; after orbit 300 it is −0.4855-0.4855. Those two numbers are close not because Verlet stopped moving, but because it keeps returning to roughly the same place. In between, every single orbit, it swings from close to 0%0\% relative error up to about 2.99%2.99\% and back (Figure 2, lower panel; see §5). RK4, same 300 orbits: −0.500105-0.500105 after orbit 1, creeping to −0.532241-0.532241 by orbit 300, a small, steady contraction, more bound with each orbit rather than less.

methodorbit at 1% losscharacterorbit at 5% losscharacterorbit at 10% loss
forward Euler0.00permanent0.00permanent0.00 (permanent)
velocity Verlet0.02transient, recoversnot reached—not reached
RK447.64permanent234.19permanentnot reached (300 orbits run)

"Permanent" means the trace never falls back under half the threshold again for the rest of the run; "transient" means it does. Verlet crosses 1% once, briefly, two hundredths of an orbit in, then falls back and spends the remaining 299.98 orbits oscillating inside a band it never permanently leaves.

How Bad Does It Get

-9-6-30-1012x (units of a)y (units of a)Two orbits, e = 0.6, dt = T/100, same start for all four curves
  • analytic ellipse
  • RK4
  • velocity Verlet
  • forward Euler
Figure 1. Two orbits, all four curves started identically at perihelion. The dashed grey ellipse is the exact solution. Velocity Verlet and RK4 both hug it closely enough at this scale to be hard to tell apart from each other; forward Euler has already left the frame the other three share, its path measured in units of the original orbit's own semi-major axis, by the end of the first orbit. Note that the horizontal axis alone spans ten times the width of the true ellipse; that gap is the whole point of this figure.

Figure 1 is the honest picture, not a flattering one. Euler's trace is not merely off the ellipse, it dwarfs it: by x=−9.45x=-9.45 the true orbit's entire diameter, 2 units, would fit inside the gap between Euler's excursion and the sun nearly five times over. Verlet and RK4, by contrast, are close enough to the dashed exact curve that separating them at this scale takes the next figure, not this one.

-20%0%40%80%120%Forward Euler (note the scale)-4%-2%0%2%4%6%8%Velocity Verlet and RK4, same 300 orbits, 20× finer scale050100150200250300orbit numberrelative energy error dE/E0
  • velocity Verlet, min-max band per orbit
  • RK4
Figure 2. Relative energy error ΔE/E0\Delta E/E_0 against orbit number, same configuration, 300 orbits. Top panel: forward Euler, on a scale wide enough to hold its catastrophe. Bottom panel: velocity Verlet (green band, showing the true min-to-max range within every orbit rather than one arbitrarily phased sample of it) and RK4 (blue line), on a scale twenty times finer. Verlet's band never widens and never drifts. RK4's line is dead flat at this resolution for the first fifty orbits and then visibly, steadily, not bending back.

Two shapes, not one. Verlet's error is a band with a fixed width, set once, near the start, and never revisited. RK4's error is a line with a slope, small at first, unmistakable by orbit 150. The bound on Verlet's band is not a coincidence of this one run: backward error analysis shows a symplectic integrator's numerical trajectory exactly conserves a nearby "shadow" Hamiltonian, close to the true one by an amount set by the timestep, so the true energy can only ever wander within a fixed distance of its start rather than drift away from it [10], a result laid out in full in the standard reference on the subject [11]. The ordinary-least-squares slope of RK4's relative energy error against orbit number is −2.146×10−4-2.146\times10^{-4} per orbit with a standard error of 9.79×10−99.79\times10^{-9}, a slope 21,915 times its own standard error: about as far from "consistent with zero" as a number in this article gets. Verlet's equivalent slope is −1.26×10−8-1.26\times10^{-8} per orbit against a standard error of 3.36×10−73.36\times10^{-7}, zero to zero decimal places that matter. Euler's slope, for what it is worth after the orbit is already gone, sits at 2.6 standard errors from zero, a small residual wobble inside an already-ruined trajectory, interesting only for showing that the chaotic wandering after collapse is itself not perfectly static.

Validation C: angular momentum. Symplectic theory makes a second, sharper prediction for velocity Verlet specifically. Over the same 300 orbits, Verlet's angular momentum drifted by at most 2.387×10−142.387\times10^{-14} relative to its starting value, 107 machine epsilons, against a naive roundoff random walk estimate of 3.85×10−143.85\times10^{-14} over 30,000 steps: a ratio of 0.62, consistent with pure floating-point noise and nothing else. Forward Euler's angular momentum, over the identical run, drifted 1.48×10161.48\times10^{16} times further; RK4's drifted 3.06×10113.06\times10^{11} times further. Club value: Verlet max ∣ΔL/L0∣=2.387×10−14|\Delta L/L_0| = 2.387\times 10^{-14}. Accepted value: exactly zero, up to roundoff, as the theory in the margin note requires. Difference: consistent with roundoff, not a real disagreement.

Does the Error Actually Shrink the Way Theory Says

A stepping rule's "order" is a specific, falsifiable claim: halve the timestep and the global error after a fixed amount of simulated time should shrink by a fixed factor, 212^1 for a first-order method, 222^2 for second order, 242^4 for fourth. We tested this directly, at e=0.6e=0.6, by integrating exactly one orbit at seven different step counts per method and measuring the Euclidean position error against the exact Kepler solution at the end, then fitting a line through the results on log-log axes.

10-410-310-210-110-1410-1210-1010-810-610-410-2100timestep dtposition error after one orbite = 0.6, error after exactly one orbit
  • Euler, slope 0.952 (theory 1)
  • Verlet, slope 1.998 (theory 2)
  • RK4, slope 4.166 (theory 4)
Figure 3. Position error after one orbit against timestep, log-log axes, each method fit over its own range of step counts. Points are the club's own computed values; dashed lines are the least-squares fit whose slope is quoted beside each series.
methodtheoretical orderfitted slope (single orbit, e=0.6e=0.6)differenceMonte Carlo mean ± SE (n=40)z vs. theory
forward Euler10.952−0.0480.9866 ± 0.0021−6.31
velocity Verlet21.998−0.0022.0015 ± 0.0002+7.72
RK444.166+0.1664.1183 ± 0.0051+23.09

Each of the three methods needs its own range of step counts before this scaling shows up cleanly, and that range differs by two orders of magnitude between methods. Verlet and RK4 settle into their asymptotic slope, 2 and 4, by a few hundred steps per orbit. Euler does not: at a few thousand steps per orbit its local fitted slope is still only about 0.8, and it takes tens of thousands of steps per orbit, several thousand times finer than the 100-step configuration used everywhere else in this article, before the fitted slope on a shrinking window of step counts settles at 1.000. Butcher's textbook order conditions [16] describe the limit Δt→0\Delta t \to 0; they say nothing about how close to that limit a given problem needs to get before the limit is a useful description, and for Euler on this orbit, the honest answer is: much closer than anyone would run it in practice.

Working Notes From the Club Table

First attempt Wrote Euler, wrote the analytic Kepler solver, diffed them. Position error looked enormous immediately, assumed a sign bug in the acceleration. Spent forty minutes checking a minus sign that was correct the whole time. The orbit really was that bad at 100 steps.

Second attempt Added velocity Verlet, expecting it to be a modest improvement over Euler. It was not modest. Someone asked whether we had accidentally wired it to the exact solution by mistake, since the energy trace looked suspiciously flat. Printed the numbers instead of the plot: 2.99%, not zero, just bounded. Nobody had wired anything.

Third attempt RK4 in, all three side by side. RK4's energy trace looked perfect for the first fifty orbits on the same axes as Euler's. Only after building the two-panel figure, RK4 alone against a scale twenty times finer, did the slope become visible. A four-fold cost in force evaluations bought a method whose failure needed a magnifying glass to see, which is a genuinely different thing from a method with no failure at all, and we almost wrote the caption as if they were the same.

Fourth attempt Tried to prove angular momentum conservation for Verlet by just running it and looking. Someone else worked out the actual reason on paper during the same meeting, from the kick-drift-kick update rules directly, and it turned into a two-line argument rather than a numerical curiosity (the margin note beside Validation C above has the two lines).

Fifth attempt Matched-cost table came back with Euler still failing in a thousandth of an orbit even at four times the resolution. Re-ran it twice thinking the cost accounting was backward. It was not. That result stood.

Is This Just One Lucky (or Unlucky) Orbit?

Every number so far comes from one eccentricity, 0.6, chosen for no better reason than that it looks like a real elliptical orbit and stresses all three methods enough to be interesting. A skeptical reader is entitled to ask whether the measured convergence orders in §7 are an artifact of that one choice. We do not think they should be taken on faith, so we did not take them on faith ourselves: the same one-orbit convergence fit was repeated 40 times, at eccentricities drawn independently and uniformly from [0.10,0.60][0.10, 0.60], seeded once from the master seed via numpy's SeedSequence so the draw is exactly reproducible.

0.900.951.001.051.101.15110203040trials accumulatedrunning mean slope / theoretical order40 trials, eccentricity drawn uniformly on [0.10, 0.60]
  • Euler / 1
  • Verlet / 2
  • RK4 / 4
Figure 4. Running mean of the fitted convergence order after each of 40 trials, divided by that method's theoretical order, so all three series should converge to 1.0 on the same axis regardless of whether the true order is 1, 2 or 4. All three visibly settle within about ten trials; none of them settle exactly on 1.0, which §8's table quantifies rather than glosses over.

The Monte Carlo means agree with §7's single-orbit numbers to within two percent for every method, so the single eccentricity was not a fluke in either direction. What the larger sample buys is a standard error small enough to make the residual disagreement with theory impossible to shrug off: RK4's mean fitted order, 4.118, sits 23.1 of its own standard errors above the textbook value of 4. That is not sampling noise. We think it is a genuine, small, higher-order correction term in RK4's local truncation error that has not fully died away even at the finest step counts we used, an effect that would itself shrink with even finer resolution, the same phenomenon §7 already documents for Euler at a much larger scale. We report the 23.1-sigma gap rather than narrow the step-count range until it disappears, because doing the latter would be measuring what we wanted to see rather than what the code produced.

Buying Back Stability

Comparing methods at the same timestep is comparing them at different costs, since RK4 spends four force evaluations per step against Euler and Verlet's one. The fair comparison holds cost fixed instead: RK4 at 60 steps per orbit (240 force evaluations per orbit) against Euler and Verlet at 240 steps per orbit each (also 240 force evaluations per orbit, four times finer a timestep, for the same total spend).

0.001 orbitsEulermatched cost (240 steps/orbit)0.0002 orbitsEulermatched timestep (60 steps/orbit)>1500 (never reached)Verletmatched cost (240 steps/orbit)0.0056 orbitsVerletmatched timestep (60 steps/orbit)3.95 orbitsRK4matched cost/timestep (60 steps/orbit)10-410-310-210-1100101102103orbits survived before 1% energy loss (log scale)
Figure 5. Orbits survived before a 1% energy loss, log scale, at e=0.6e=0.6, comparing the matched-cost framing (Euler and Verlet get four times RK4's step count) against the more obvious but cost-blind matched-timestep framing (all three at 60 steps per orbit). Verlet's matched-cost bar has no endpoint marker because it never reaches 1% inside the 1,500-orbit run.
eccentricitymethodsteps/orbitcost/orbitorbit at 1% losscharacter
0.60forward Euler2402400.001permanent
0.60velocity Verlet240240>1500not reached
0.60RK4602403.950permanent
same cost budget, lower eccentricity
0.20forward Euler2402400.011permanent
0.20velocity Verlet240240>1500not reached
0.20RK4602401480.181permanent
0.10forward Euler2402400.019permanent
0.10velocity Verlet240240>1500not reached
0.10RK460240>1500not reached

Giving forward Euler four times the timestep resolution of RK4, for the same money, does not buy it a longer life at e=0.6e=0.6 or e=0.2e=0.2. It buys it a slightly less immediate death: the matched-timestep table (all three at 60 steps per orbit, e=0.6e=0.6) has Euler crossing 1% at orbit 0.0002; the matched-cost table has it crossing at orbit 0.001, five times longer, measured in a unit where "five times longer than instantaneous" is still, for every practical purpose, instantaneous. This is the difference between an accuracy problem and a stability problem. A bigger budget fixes the first kind. It does not fix the second, and at this eccentricity and this order of magnitude of timestep, Euler's failure is squarely the second kind.

The Strongest Objection We Could Make

The obvious response to everything above is: nobody serious runs forward Euler on an eccentric Kepler orbit, so what has actually been demonstrated beyond a straw man? This objection has real force and deserves a real answer rather than a dismissal.

The answer is not that Euler is secretly fine. It is that "nobody serious uses it" is doing more work in that sentence than it looks like. Plenty of serious N-body and planetary-dynamics codes do not use velocity Verlet either, for reasons that have nothing to do with the failure mode documented here. The Hermite integrator, fourth order and time-symmetric like RK4 but built around continuously estimated higher derivatives rather than substeps, is a standard choice in direct-summation planet-formation codes precisely because it tolerates the close encounters and wide range of dynamical timescales that a fixed-step symplectic method handles badly [14]. It is not symplectic either, and by our own §5 logic it should show the same kind of secular drift RK4 shows, just at a rate its designers judged an acceptable trade for adaptive timestepping and better handling of close, fast passages. Large-scale cosmological N-body codes such as GADGET-2, on the other hand, default to exactly the kick-drift-kick leapfrog scheme used here, precisely for the bounded-error property §5 and §6 demonstrate [9], and modern solar-system integrators such as REBOUND ship a Wisdom-Holman symplectic mapping as their recommended default for exactly this reason [13], following the original demonstration that symplectic mapping methods hold up over solar-system-length integrations where naive methods do not [3]. The honest picture is not "symplectic good, everything else bad." It is "know which failure mode your problem can tolerate, because every fast method accepts one." A close-encounter-dominated planet-formation simulation can tolerate slow secular energy drift far better than it can tolerate a fixed fine timestep everywhere, including the 99% of the simulation where nothing close is happening; a solar-system-length stability study is the opposite case almost exactly. This article picked the second case and is honest that it did.

Where a Different Modelling Choice Would Change the Answer

Three choices made above would each have changed a headline number if made differently. The eccentricity, 0.6 by our own arbitrary pick, sets how fast the failure arrives: §9's table shows RK4 surviving 3.95 orbits at e=0.6e=0.6 and over 1,500 at e=0.1e=0.1 for the identical cost budget, so quoting "RK4 crosses 1% loss around orbit 4" without the eccentricity attached is quoting a number that depends on a choice we have not defended on physical grounds, only made for pedagogical contrast. The step-count range used for the convergence fit, §7's finding that Euler needs tens of thousands of steps per orbit before its slope reaches 1.000, would have reported a wrong order (0.8, not 1.0) had we stopped the fit at the same few-hundred-step range that works fine for Verlet and RK4; a study that fits all three methods over one shared step-count range, a natural and common shortcut, would understate Euler's asymptotic order without ever running a buggy line of code. And the choice to define cost in force evaluations rather than wall-clock seconds sidesteps implementation quality entirely; a poorly vectorised RK4 and a hand-tuned Euler could reverse every ranking in §9's table on wall-clock time alone, which is exactly why we charged cost the way we did and said so, rather than letting a seconds column quietly smuggle in an implementation detail dressed up as a finding about integrators.

Reproducing this

One file, one command. Python 3.12 and numpy; nothing else is imported.

python integrator-energy-drift.py > integrator-energy-drift-output.txt

Our run took 65.0 seconds on numpy 2.4.2 and Python 3.12.3, comfortably inside the ten-minute budget for a club analysis script. Master seed 20260901 governs every random draw in the Monte Carlo section (§8) and nowhere else; every other number in this article is fully deterministic and will reproduce exactly on a rerun. The interactive model runs the same three integrators, at the same default eccentricity and timestep, live in your browser, so you can watch Euler's orbit leave the frame in real time rather than read about it.

References

Reproduce these numbers

From the analysis folder, run:

python integrator-energy-drift.py > integrator-energy-drift-output.txt
Seed
20260901
Analysis code
integrator-energy-drift.py34 kB