# Solving projectile motion using least action principle and level sets

I'm trying to compute 1D projectile motion -- basically throwing a ball up and catching it in the same hand. I want to use Lagrangian dynamics and find a numerical solution out of interest.

I started trying to compute a trajectory that minimizes the action functional

$$S = \int Ldt = \int((1/2) m \dot{y}^2 - mgy)dt$$

using Path Integral Monte Carlo.

Then I realized that the trajectory appears to be the intersection of the Lagrangian surface with a plane. So I started to think level sets.

The slope of the plane appears to be $$\frac{dz}{dy} = \frac{-1}{2g}; \frac{dz}{dv}=0$$ and passes through the initial condition $$(y_0 = 0, v_0 = 5)$$. My question is: where does the slope of this plane come from? Any other information about level sets and direct minimization of the action functional would be appreciated also.

• Comment to the post (v3): Note that the principle of stationary action requires boundary conditions; not initial conditions. Feb 26 '20 at 21:10

FWIW, the simplest is probably to graph the mechanical energy $$(y,\dot{y})\mapsto \frac{m}{2}\dot{y}^2 + mgy$$ rather than the Lagrangian. Because of energy conservation the stationary paths would then be level sets.