The first step in deriving the equation of motion is to determine the Lagrangian of the system. The Lagrangian contains both the kinetic and potential energy of the system and hence both will be calculated next.
Substituting: v=s˙ where s˙=dtds is the trike's velocity in m⋅s−1 into Equation (??) yields: T=2ms˙2.
The potential energy term will only include the conservative force of gravitation. To compute it, we need to be able to formulate the height of the trike above sea level in terms of s. If we have inclination/declination angle data for the hill in question, let us define θ(s) as the declination angle (positive when downhill) at s metres from the summit. If we form an infinitesimal triangle on the hill/mountain, we will see that dh=−dssinθ and hence: dsdh=−sinθ(s). Integrating from the summit, we obtain that: h(s)=hsummit−∫0ssinθ(σ)dσ. Where hsummit is the height of the hill/mountain, or rather its tallest point accessible by road, and we use σ as a dummy (integration) variable for distance from the summit.
Hence if gravitational acceleration can be assumed to be constant: V=mg(hsummit−∫0ssinθ(σ)dσ).
The Lagrangian is, by definition: L=T−V.
Substituting Equations (??) and (5) into Equation (6). Therefore our Lagrangian is: L=2ms˙2−mg(hsummit−∫0ssinθ(σ)dσ).