Saturday, January 24, 2026

Physics+ Lagrangian Math: UNIZOR.COM - Physics+ 4 All - Lagrangian

Notes to a video lecture on UNIZOR.COM

Lagrangian Math+

This lecture contains additional mathematical material needed to introduce Lagrangian Mechanics in generalized coordinates and, in particular, to prove the uniformity of Euler-Lagrange equation for non-Cartesian coordinates.

Assume, we have a smooth real function S(...) of n real arguments qi (i∈[1,n]), each of which, in turn, is a function of some unique for all functions parameter t that we can call "time" for definitiveness.
That is, function S(...), ultimately, is a function of time t and can be expressed as
S(t) = S(q1(t),q2(t),...qn(t))

We will use apostrophe (') to indicate a derivative of any function by time t.
So, S'(t)=dS(t)/dt and
qk'(t)=dqk(t)/dt.

When taking partial derivatives, we treat qk and qk' as independent variables, even though both originate from the same time-dependent functions.

Lemma 1
∂S' /∂qk' = ∂S /∂qk
for any k∈[1,n]

PROOF:
From the rules of differentiation follows that
S'(t) = dS(t)/dt =
= dS(q1(t),...qn(t))/dt =
=
Σi{[∂S(q1,...qn)/∂qi]·qi'(t)} =
= Σi [hi(q1,...qn) · qi'(t)]
where for each i∈[1,n]
hi(q1,...qn) = ∂S(q1,...qn)/∂qi

Now S'(t), the derivative of function S(t) by time, is represented as a function of 2n arguments - all qi and all qi':
S' = S'(q1,...qn,q1',...qn')

This function is a sum of n components, and only one of them, the kth one, contains qk' multiplied by hk(q1,...qn).
Other components are independent of qk', and differentiating by qk' would nullify them.

Partially differentiating this sum by qk' and dropping all nullified members except the kth one, we get
∂S' /∂qk' = hk(q1,...qn) =
= ∂S(q1,...qn)/∂qk = ∂S /∂qk

End of proof.

Lemma 2
/∂qk[dS/dt] = d/dt[∂S/∂qk]
for any k∈[1,n]

PROOF:
Consider separately left and right sides of the equation we have to prove.
From the rules of differentiation follows that the expression on the left side equals to
/∂qk[dS/dt] =
= ∂/∂qk
[dS(q1(t),...qn(t))/dt] =
= ∂/∂qk
Σi{[∂S(...)/∂qi]·qi'(t)} =
since each qi'(t) in the sum above is independent of qk(t), it can be considered as a constant for partial differentiation by qk(t)
= Σi{/∂qk[∂S(...)/∂qi]}·qi'(t) =
= Σi[∂²S(...)/∂qk∂qi]·qi'(t)

On the other hand, the right side of the expression we have to prove is
d/dt[∂S/∂qk] =
= d/dt
[∂S(q1(t),...qn(t))/∂qk] =
= Σi[∂²S(...)/∂qi∂qk]·qi'(t)

Comparing the two final expressions for left and right sides of the original equation, we see that the only difference is in the order of differentiation of S(...) by two arguments:
∂²S(...)/∂qk∂qi on the left side,
∂²S(...)/∂qi∂qk on the right.

According to the known properties of partial differentiation, the order of differentiation by different arguments is irrelevant (Schwarz Theorem, not covered in this course, states that the sufficient condition for this is that both mixed derivatives exist and are continuous),
∂²S(...)/∂qi∂qk = ∂²S(...)/∂qk∂qi
That proves the equality between left and right sides of the original equation we have to prove.

Uniform Cartesian Coordinates

Consider a mechanical system of N objects in three-dimensional space.
Let's introduce the uniform Cartesian coordinates {s1,...sn} (where n=3N) to replace familiar symbolics {x1,y1,z1,...xN,yN,zN}.

This is just a change of symbolics we use, not a change in a concept. These uniform Cartesian coordinates are still the same Cartesian coordinates, just with another name.
This will help us to more conveniently express the transformation from Cartesian coordinates (in their uniform symbolics) to non-Cartesian (generalized) and back.

So, we will use
s1 for x1
s2 for y1
s3 for z1
etc. up to
sn−2 for xN
sn−1 for yN
sn for zN

In principle, there is no mathematical difference between considering a system as N components in three-dimensional space with three time-dependent coordinates each {x1(t),y1(t),z1(t),...xN(t),yN(t),zN(t)} and a mathematical representation of this system as a point in 3N-dimensional configuration space with n=3N time-dependent coordinates {s1(t),...sn(t)}.
In all cases the trajectory of an entire system is defined by a set of n=3N real time-dependent positional parameters.

Sometimes, to shorten the formula, we will omit time (t) mentioning a coordinate only, like si.
Sometimes, we will use a single bold symbol s instead of a set of all uniform Cartesian coordinates {s1,...sn} for brevity.

As proven in the previous lecture Lagrangian in N Degrees of Freedom, for a conservative (see lectures in the Laws of Newton part of this course) mechanical system these functions si(t) must satisfy the Euler-Lagrange equations that in this case of using uniform Cartesian coordinates can be written as
∂L/∂si(t) = d/dt ∂L/∂si'(t)
for i∈[1,n], where n=3N and L=K−U is a Lagrangian of the system - a difference between its total kinetic and potential energies.

Recall that potential energy of an entire system is a sum of potential energies of its components, each of which is a function of position of all components.
So, potential energy of an entire system is a function of positions of all components.
U = U[s1(t),s2(t),...sn(t)]

In its turn, kinetic energy of an entire system is a sum of kinetic energies of all system's components, each of which depends on velocity of that particular component, which means that kinetic energy of an entire system depends on velocities of all its components
K = K[s'1(t),s'2(t),...s'n(t)]
(apostrophe indicates a differentiation by time t).

From the above follows that Lagrangian of a system is a function of positions and velocities of all system's components
L = L[s1(t),...sn(t),s'1(t),...s'n(t)]

The solution to a system of n=3N Euler-Lagrange equations s(t) describes the trajectory of our system in n-dimensional configuration space.

Transformation of Coordinates

Consider a moving mechanical system with its state described by two different sets of parameters
s(t) = {s1(t),s2(t),...sn(t)}
and
q(t) = {q1(t),q2(t),...qn(t)}

Further assume that these two coordinate systems are mutually transformable from one to another by known inverse to each other transformation functions
si = Si(q1,q2,...qn)
qi = Qi(s1,s2,...sn)
for all i∈[1,n]
or, for brevity,
s=S(q) and q=Q(s).

The above transformations are inverse to each other in a sense that applying S-transformation to q and then applying Q-transformation to results of the first transformation s would result in original q:
qi = Qi(S1(q),S2(q),...Sn(q))
In short, q=Q[S(q)]
Same in reverse order:
si = Si(Q1(s),Q2(s),...Qn(s))
In short, s=S[Q(s)]

IT IS EXTREMELY IMPORTANT TO UNDERSTAND
that for the same moment in time t mutually transformable into each other coordinates {s1(t),...sn(t)} and {q1(t),...qn(t)} are different, but at the same time t they describe the same physical location of each component of our system in space.

For example, consider Cartesian (x,y) and polar (r,θ) coordinates of a moving object on a plane.
Assume, they share the origin and the positive ray of X-axis of Cartesian coordinates coincides with the base ray of polar coordinates.
If {x(t),y(t)} is a trajectory of some object, and, as we know, the rules of transformation of coordinates are
x = r·cos(θ)
y = r·sin(θ)
then {x(t),y(t)} and {r(t),θ(t)} describe the same motion of our object along its physical trajectory on a plane.
That is, physical location {x(t),y(t)} in Cartesian coordinates for any t is the same as location {r(t),θ(t)} in polar coordinates.

Consequently, it means that for the same moment in time t
(a) velocity vector in Cartesian coordinates Vcar(t) is expressed differently than in polar Vpol(t), but it has the same magnitude and direction on a plane in both systems of coordinates;
(b) kinetic energy expressed in Cartesian coordinates as a function of time Kcar(t) looks differently than in polar Kpol(t), but they are equal in value: Kcar(t)=Kpol(t);
(c) potential energy is also the same: Ucar(t)=Upol(t).

For those in doubts let's do a calculation of velocity magnitude v.
In Cartesian coordinates velocity vector Vcar(t) has components (x'(t),y'(y)) and magnitude
vcar(t) = √(x'(t))²+(y'(t))²
In polar coordinates velocity vector Vpol(t) can be projected to radial and tangential directions with components r'(t) and r(t)·θ'(t); its magnitude equals to
vpol(t) = √(r'(t))²+(r(t)·θ'(t))²
Since x(t)=r(t)·cos(θ(t)) and y(t)=r(t)·sin(θ(t)), the velocity components are
x'(t) = r'(t)·cos(θ(t))−r(t)·sin(θ(t))·θ'(t)
y'(t) = r'(t)·sin(θ(t))+r(t)·cos(θ(t))·θ'(t)
vcar²(t) = (x'(t))²+(y'(t))² =
= (r'(t))²·cos²(θ(t)) −
− 2r'(t)·cos(θ(t))·r(t)·sin(θ(t))·θ'(t) +
+ r²(t)·sin²(θ(t))·(θ'(t))² +
+ (r'(t))²·sin²(θ(t)) +
+ 2r'(t)·sin(θ(t))·r(t)·cos(θ(t))·θ'(t) +
+ r²(t)·cos²(θ(t))·(θ'(t))² =
= (r'(t))² + r²(t)·(θ'(t))² = vpol²(t)

The same equality can be established for any physical characteristic (like energy) which is independent of a point of view of an observer.

For all our purposes we will assume that coordinate transformation functions Qk(s) and Sk(q) (k∈[1,n]) do exist, are sufficiently differentiable and transform one set of coordinates into another and back.

Any physical characteristic of a motion as a function of time which pertains only to a moving object (like kinetic energy or magnitude of velocity) and not to an observer (like a coordinate in some system) is expressed differently in different systems of coordinates but, calculated for the same moment of time, should give the same value.