---
title: "Principle of Stationary Action Interactive Lab | Sandbox Physics"
description: "Must the physical path have the smallest action? No; it only has to be stationary, meaning a small change to the path leaves the action unchanged to first order. For short trips that stationary path is a minimum. For long enough trips, past a so-called conjugate point, it can become a saddle instead. For a mass on a spring, that happens once the trip lasts longer than half an oscillation period."
canonical_url: "https://sandboxphysics.com/labs/stationary-action/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/stationary-action/"
last_modified: "2026-10-22"
---

M081 · Action with fixed endpoints

# Principle of Stationary Action

**Must the physical path have the smallest action?** No; it only has to be stationary, meaning a small change to the path leaves the action unchanged to first order. For short trips that stationary path is a minimum. For long enough trips, past a so-called conjugate point, it can become a saddle instead. For a mass on a spring, that happens once the trip lasts longer than half an oscillation period.

Drag a trial path while its endpoints stay fixed. Compare the action, its first variation and the residual of the equation of motion for free motion, uniform gravity and harmonic motion. Then move from a minimum to a saddle, and test compatible and impossible endpoints at a conjugate time.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

A single particle moves freely, in a uniform gravitational potential or in an exact harmonic potential. All paths share the same fixed endpoints and differ only in six editable sine modes. An analytic reference exists only for compatible endpoints; at a conjugate time it is just one member of a family of solutions that is not unique. The gradient projected onto the six modes and the continuous Newton residual are separate checks.

Physics tutorial

## First variation and curvature answer different questions

**Background** Many paths join the same start and end points in a fixed time. Only the physical path also obeys the equations of motion.

**Why it matters** The principle of stationary action, together with the second variation, explains why the physical path can sit at a saddle of the action.

Start with the essentials

- **Focus question**: Must the physical path have the smallest action?
- **One-sentence intuition**: A zero first variation picks out the actual motion. The second variation then tells whether that path is a minimum, has a flat direction or is a saddle.

### Core mathematical model

#### Action with fixed endpoints

$$
S[q]=\int_0^T\left(\frac{m\dot q^2}{2}-V(q)\right)dt,\qquad q(0)=q_0,\ q(T)=q_T
$$

The action is the time integral of the Lagrangian, not of the total energy. When the path in between changes, the endpoints stay put.

#### A stationary action gives Newton's law

$$
\delta S=-\int_0^T\left(m\ddot q+V^{\prime}(q)\right)\eta(t)dt,\qquad\eta(0)=\eta(T)=0
$$

On a true path the force residual is zero. The gradient over the six modes tests only the directions you can edit; the plotted residual tests the full continuous equation.

#### Editable paths keep the endpoints fixed

$$
q(t)=q_b(t)+\sum_{n=1}^{6}a_n\sin\frac{n\pi t}{T}
$$

When the endpoints are compatible, the base path is the analytic true path. When harmonic endpoints are impossible, the base is a straight line between them, and the case is marked as having no physical solution.

#### Curvature decides minimum or saddle

$$
\Delta S=\frac m4\sum_{n=1}^{6}a_n^2\left(\frac{n^2\pi^2}{T}-\omega^2T\right)
$$

Around a compatible harmonic reference, the first variation is zero. A mode with too long a half-wavelength lowers the action, while higher modes still raise it. For free motion and uniform gravity, the frequency term is zero.

#### Conjugate times need compatible endpoints

$$
\omega T=k\pi\quad\Longrightarrow\quad q_T=(-1)^kq_0
$$

When this condition holds exactly, a pair of endpoints can have infinitely many physical paths or none. A flat mode does not single out one path. The interval control measures time in units of the harmonic half-period.

#### An independent check on the numerical integral

$$
\epsilon_Q=\left|S_{\rm Simpson}-S_{\rm closed}\right|
$$

The displayed action comes from the closed-form quadratic expression. A composite Simpson integration with 512 intervals checks the path integral independently; the difference between them is not a complete error bound.

### Common difficulties

#### Stationary does not always mean minimum

**Typical misconception** The true path must have less action than every nearby path.

**Better mental model** Once the interval is longer than half a harmonic period, some directions have negative curvature and the stationary path is a saddle.

#### A flat direction does not mean a unique path

**Typical misconception** If both the slope and the curvature are zero, they pick out one motion.

**Better mental model** With compatible endpoints at a conjugate time, a whole family of true paths lies along the flat direction.

#### Impossible endpoints stay impossible

**Typical misconception** Any two endpoint positions can be joined by a harmonic path.

**Better mental model** At a conjugate time, incompatible endpoints have no solution. The straight base line is only a candidate you can edit.

#### Six modes test only six directions

**Typical misconception** Six small derivatives prove the path is stationary in every possible direction.

**Better mental model** The finite basis tests only six directions. Check the residual of the continuous equation and the analytic reference as well.

### Run the experiment

1. 01

   #### Return to a minimum

   Choose Short-interval minimum, then press Restore reference.

   **What to observe:** The slope and the force residual approach zero, and pushing the path along the first mode raises the action.

2. 02

   #### Find a saddle

   Choose Stationary saddle, then compare modes one and three.

   **What to observe:** Around the same stationary path, one mode lowers the action and the other raises it.

3. 03

   #### Test endpoints at a conjugate time

   Compare the Conjugate-time family and Impossible endpoints presets.

   **What to observe:** A family of physical paths along a flat direction is a different case from endpoints that have no classical solution at all.

4. 04

   #### Edit the path and check the numbers

   Drag the orange handle and compare the gradient, the residual and the quadrature difference.

   **What to observe:** The endpoints stay fixed, and the exact action agrees with the independent numerical integral.

Physical conclusion

Before concluding anything, compare the numerical checks with the analytic or refined reference.

Motion & dynamics · Starter path

## From a falling ball to an orbit

Start by measuring gravity and splitting motion into components. Then add contact forces and collisions, and follow the same laws all the way to an orbit.

[Start here → **Free Fall & Measuring Gravity** Capture a few drops and fit the camera positions to estimate gravitational acceleration. Then add air damping and watch the fit drift from the truth. Observe · 14 min](https://sandboxphysics.com/labs/free-fall/)

1. [1 Free Fall & Measuring Gravity](https://sandboxphysics.com/labs/free-fall/)
2. [2 Projectile Flight Designer](https://sandboxphysics.com/labs/projectile-flight/)
3. [3 Inclined Plane & Friction](https://sandboxphysics.com/labs/inclined-plane/)
4. [4 One-Dimensional Collision Bench](https://sandboxphysics.com/labs/collision-bench/)
5. [5 Mass–Spring Oscillator](https://sandboxphysics.com/labs/mass-spring/)
6. [6 How Orbits Take Shape](https://sandboxphysics.com/labs/orbit/)

[View the full path →](https://sandboxphysics.com/topics/mechanics/#starter-path)
