Formulas used in the lab

These are the relations the desk uses or reports. The interactive run is a numerical integration except where a vacuum projectile also has a closed form. Symbols use SI-like units in the projectile, pendulum, spring, and collision experiments. The orbital scene uses a scaled unit system with G = 1.

Formulas reported or integrated by the lab
NameRelationNotes
Projectile range (vacuum)R = v0² sin(2θ) / gFlat ground, no drag, launch and landing at y = 0.
Projectile apex (vacuum)H = (v0 sin θ)² / (2g)Time to apex is (v0 sin θ) / g.
Projectile flight (vacuum)T = 2 v0 sin θ / gWith linear drag the path is integrated with RK4 instead.
Double-pendulum energyE = KE1 + KE2 + m1 g y1 + m2 g y2Angles from the downward vertical; y is upward. E is nearly constant when damping is zero.
Natural frequencyω0 = √(k / m)Undamped angular frequency of the spring-mass system.
Damping ratioζ = c / (2 √(k m))ζ < 1 underdamped, ζ = 1 critical, ζ > 1 overdamped. Critical c is 2 √(k m).
1D collision (restitution e)v1' = ((m1 − e m2) v1 + m2 (1 + e) v2) / (m1 + m2)Momentum is conserved. Kinetic energy is conserved when e = 1.
Softened gravitya = −G M r / (r² + ε²)^{3/2}Velocity Verlet. Softening avoids a singularity at the origin. A circular launch uses the same term.

The double pendulum uses the standard two-angle Lagrangian equations and a classical RK4 stepper. The orbital integrator is Velocity Verlet. Neither method posts data anywhere; a CSV is built in the tab and saved as a local download.

Questions

Why is energy not exactly constant on the double pendulum?

RK4 is not a symplectic integrator. With damping at zero and a 1/240 s step, the relative drift stays small (well under half a percent over a few seconds in the built-in check), which is enough for a clear demonstration.

What is the softening length ε?

It keeps the gravitational acceleration finite at r = 0 so a satellite that heads toward the star does not explode the step. Circular-orbit speed uses the same term so a preset circular path stays close to a circle.