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.


Thursday, December 25, 2025

Multivariable Function Limits: UNIZOR.COM - Math4Teens - Calculus - Limi...

Notes to a video lecture on http://www.unizor.com

Multivariable Limits

Sometimes we have to deal with functions of two or more arguments and have to analyze the behavior of such functions as their arguments approach certain values.

The usual way to analyze this situation is to fix all arguments except one and see what happens with the function if that single argument approach the value we are interested in.
The result of this process is the reduction of variables by one, and we can repeat the same thing for the next argument, then the next etc.

For example, consider a function
F(x,y,z) =
= arctan(x) + 2−y + z/(z+1)

and its behavior when all arguments increase without restriction.
1. Fix x and y, let z→+∞.
limz→+∞ z/(z+1) = 1
2. Our function now can be written as
F(x,y,+∞) = arctan(x)+2 −y+1
Fix x, let y→+∞.
limy→+∞ 2−y = 0
3. Our function now is
F(x,+∞,+∞) = arctan(x)+0+1
Let x→+∞.
limx→+∞ arctan(x) = π/2
The limit of our function when z→+∞, y→+∞, x→+∞ is
lim F(x,y,z) = π/2 + 1

This is great, but we have a result that seems to depend on the order of arguments we analyze.
Can the result be different if we choose a different order, say, fix z and y getting a limit by x, then fix z getting a limit by y and finish with a limit by z?

The answer is:
Under certain relatively broad conditions, the final result is not dependent on the order of taking limits by different arguments.

We consider only a case of a function of two arguments (in a general case of many arguments the proof is similar but a bit more tedious) and prove the theorem below.

Prior to that, let's talk about a particular type of taking a multivariable function to a limit - a uniform convergence.
Assume, we have to analyze the limit of function F(x,y) as x→a and y→b.
We say that function F(x,y) is converging uniformly by y to Y(y) as x→a if for any positive ε there is positive δ such that
|F(x,y)−Y(y)| < ε
as long as both |x−a| < δ and |y−b| < δ.

In other words, as x→a, not only F(x,y)→Y(y) for any specific value of y (so-called point convergence of F(x,y) to Y(y)), but F(x,y) gets equally close to Y(y) (distance less than small ε) for all values of y within certain neighborhood of its limit point y=b.

Theorem

Assume that all limits below exists and satisfy the conditions listed.
IF
limy→b F(x,y) = X(x)
         uniformly by x
limx→a X(x) = A
limx→a F(x,y) = Y(y)
         uniformly by y
limy→b Y(y) = B
THEN
A = B

Proof

Assume, A ≠ B.
Let |A−B|=d.
Let ε=d/4.

Then the following logic holds.

limx→a F(x,y) = Y(y) (uniformly by y) ⇒
⇒ ∃δa: |Y(y)−F(x,y)| < εx∈[a−δa,a+δa] and
y∈[b−δa,b+δa]

limy→b Y(y) = B
⇒ ∃δb: |B−Y(y)| < ε
y∈[b−δb,b+δb]

Let δ = min(δab)
Then from both above statements follows that within a small neighborhood of limit points x=a and y=b
x∈[a−δ,a+δ] and
y∈[b−δ,b+δ]
the following is true
|B−Y(y)|<ε and
|Y(y)−F(x,y)|<ε
from which, in turn, follows
|B−F(x,y)|<2ε=d/2

That is, within a small distance of arguments x and y around their limit points a and b the value of F(x,y) deviates from B by less than d/2.

Now repeat the same from the position of another limit of function F(x,y).

limy→b F(x,y) = X(x) (uniformly by x) ⇒
⇒ ∃γb: |X(x)−F(x,y)| < εx∈[a−γb,a+γb] and
y∈[b−γb,b+γb]

limx→a X(x) = A
⇒ ∃γa: |A−X(x)| < ε
x∈[a−γa,a+γa]

Let γ = min(γab)
Then from both above statements follows that within a small neighborhood of limit points x=a and y=b
x∈[a−γ,a+γ] and
y∈[b−γ,b+γ]
the following is true
|A−X(x)|<ε and
|X(x)−F(x,y)|<ε
from which, in turn, follows
|A−F(x,y)|<2ε=d/2

That is, within a small distance of arguments x and y around their limit points a and b the value of F(x,y) deviates from A by less than d/2.

Make our neighborhood even smaller by choosing β=min(γ,δ) and consider
x∈[a−β,a+β] and
y∈[b−β,b+β]

Now we see that within this neighborhood F(x,y) is closer to A by less than d/2 and closer to B by less than d/2, where d is the distance between A and B, which is impossible.

Therefore, A = B.

Thursday, December 18, 2025

Double Sequence Limits: UNIZOR.COM - Math4Teens - Calculus - Limit of Se...

Notes to a video lecture on http://www.unizor.com

Double Limits

Sometimes we are interested in sequences that depend on two natural numbers like {am,n}.
For example,
am,n=arctan(m)+2−n.

Now, if m→∞ and n→∞, how to calculate the limit of am,n?
It might be
limm→∞ [limn→∞ (am,n)]
or
limn→∞ [limm→∞ (am,n)]
depending on which index, m or n, we will use to go to a limit first, and there is no guarantee that the answers will be the same.

Let's check both methods.
limn→∞ (am,n) =
= limn→∞ (arctan(m) + 2−n) =
= arctan(m)

limm→∞ (arctan(m)) = π/2

If we change the order of limits,
limm→∞ (am,n) =
= limm→∞ (arctan(m) + 2−n) =
= π/2 + 2−n
limn→∞ (π/2 + 2−n) = π/2


As you see, the results are the same.

In some way, the equality of these two limits might be considered similar to a standard accounting procedure of checking the calculations.
Imagine an MN matrix with numbers.
If you summarize the numbers within each of M rows with row #i having a sum Ri and summarize all these row totals by i from 1 to M, you will get a total of all numbers in an original table.
If you summarize the numbers within each of N columns with column #j having a sum Sj and summarize all these column totals by j from 1 to N, you should get exactly the same total of all numbers.
If these two calculated totals are not equal, that is if
Σi∈[1,M] RiΣj∈[1,N] Sj
then your calculations are wrong.

The equality of two limits in the example above is not coincidental. We shall prove it as the theorem below.
But, to make our proof rigorous, we have to make a short comment about uniform convergence.
We say that sequence {am,n} is converging uniformly by m to bm as n→∞ if for any positive ε there is number K such that
|bm−am,n| < ε
as long as both n and m are greater than K.
Analogously, we say that sequence {am,n} is converging uniformly by n to cn as m→∞ if for any positive ε there is number K such that
|cn−am,n| < ε
as long as both n and m are greater than K.

Theorem

IF
limn→∞ (am,n) = bm
(uniformly by m)
limm→∞ (bm) = B
limm→∞ (am,n) = cn
(uniformly by n)
limn→∞ (cn) = C
THEN
B = C

Proof

Assume, B≠C and |B−C|=d.

Since limm→∞(bm)=B, there exists some natural number M1 such that
|B−bm| < d/4 for all m>M1

Since
limn→∞(am,n)=uniformly=bm
there exists some natural number N1 greater than M1 such that
|am,n−bm| < d/4 for all m,n>N1

Then, for all pairs m,n greater than N1 both following inequalities are true:
|B − bm| < d/4 and
|bm − am,n| < d/4
Therefore,
|B−am,n| < d/2
That is, our double sequence am,n with both indices m and n greater than N1 is closer to number B than d/2.

Let's use the same approach, but start from index n.
Since limn→∞(cn)=C, there exists some natural number N2 such that
|C−cn| < d/4 for all n>N2

Since
limm→∞(am,n)=uniformly=cn
there exists some natural number M2 greater than N2 such that
|am,n−cn| < d/4 for all m,n>M2

Then, for all pairs m,n greater than M2 both following inequalities are true:
|C − cn| < d/4 and
|cn − am,n| < d/4
Therefore,
|C−am,n| < d/2
That is, our double sequence am,n with both indices m and n greater than M2 is closer to number C than d/2.

Choosing K=max(N1,M2) we see that all am,n with indices greater than K should be closer to B than d/2 and at the same time should be closer to C than d/2.

With the distance between B and C equal to d it's impossible.
We came to contradiction that signifies that our initial assumption that B≠C is wrong.

Therefore, B=C.

For sequences that satisfy the conditions of the theorem above we can define their limit regardless of how we calculate it, starting from the first index or the second, and can combine indices in the notation
limm,n→∞ am,n = B

Not every sequence satisfies the conditions of this theorem.
For example, am,n=m/n has no unconditional limit.
If m is fixed and we vary n→∞, each bm is zero.
Hence, limm→∞ bm = 0
But if we fix n and vary m→∞, the resulting sequence {1/n,2/n,3/n...} has no limit for any n.

Thursday, November 20, 2025

Physics+ Lagrangian in N Degrees of Freedom: UNIZOR.COM - Physics+ 4 All...

Notes to a video lecture on UNIZOR.COM

Lagrangian
for N-dimensional Systems


Background

In one of the previous lectures we considered a point-mass object oscillating on a spring in an empty one-dimensional space with Cartesian coordinates (one degree of freedom).

In that case we defined a Lagrangian of an object as a difference between its kinetic and potential energies and built a theory equivalent to Newtonian but based on the Euler-Lagrange equation instead of the Newton's Second Law.

In another lecture we discussed a spring pendulum (two degrees of freedom) and used non-Cartesian parameters to define a state of a system - an angle of pendulum from a vertical and a spring's length.
It was possible but rather complicated to use the Newtonian approach, so we applied Lagrangian Mechanics to come up with the differential equations to describe a state of this system.

An important reason for using Lagrangian Mechanics with energies instead of vectors of force and accelerations in that second example was that energies are scalars, while forces and accelerations are vectors.
Manipulations with scalars are simpler, especially dealing with complex systems with more than one degree of freedom.

Obviously, no matter how we solve a problem, the calculated actual physical trajectories of objects in space must be the same.

Before proceeding any further, we strongly recommend to refresh your knowledge about conservative forces, independence of work performed by these forces from a trajectory of an object moved by them, a concept of a field and its potential.
The chapter Laws of Newton of this course is a good source of this information.

Recall that conservative forces are defined as those that depend only on position in space. Their work, performed by moving an object from one position to another, does not depend on trajectory or speed along this trajectory, but depends only on the beginning and ending positions of an object.

From the Energy Conservation Law follows that the work performed by a conservative force that moves an object changes the potential energy of this object by the amount of work performed.

Consider an isolated closed system of N point-mass objects acting on each other with conservative forces and no forces from outside of this system.
The force on the ith object is
Fi = {Fix,Fiy,Fiz}.
If this force moved this object by an infinitesimal increment
dri = {dxi,dyi,dzi},
it performed some infinitesimal amount of work
dWi = (Fi · dri) =
= Fix·dxi+Fiy·dyi+Fiz·dzi


From the Energy Conservation Law follows that potential energy of this object Ui should diminish by this amount of work
dUi = −dWi

When all N objects are moved by corresponding forces, the total increment of potential energy of an entire system is
dU = −Σi∈[1,N]dWi =
= −
Σi∈[1,N](Fi · dri) =
= −
Σi∈[1,N](Fix·dxi+Fiy·dyi+Fiz·dzi)

From this equation follows the relationship between an increment of a total potential energy of an entire system and each individual force
Fix = −∂U/∂xi
Fiy = −∂U/∂yi
Fiz = −∂U/∂zi

Using vectors and operator
i = {∂/∂xi,∂/∂yi,∂/∂zi}
above equations can be expressed as
Fi = −iU
for all i∈[1,N]

Lagrangian Mechanics was invented to simplify analysis of complex systems acted upon by conservative forces, like electrostatic, gravitational or spring forces.

We are going to prove that Lagrangian Mechanics of a closed (no external forces) mechanical system with its components acted among themselves with some conservative forces produces differential equations of motion that are equivalent to Newtonian equations, but easier to deal with.

Consider a system that consists of N point-masses with each ith component Ωi acted upon by conservative forces from all components within this system.
The time-dependent Cartesian coordinates of each Ωi are {xi(t),yi(t),zi(t)}, which we will denote as a vector ri(t).

Let a combined conservative force acting on component Ωi that depends on positions of all components of a system be
Fi(r1,...rN)

The Newton's Second Law of motion for each object in a system is, therefore,
Fi(r1(t),...rN(t)) = mi·r"i(t)
where each Fi is a vector of three components {Fix,Fiy,Fiz}, and each component is a function of 3N coordinates of all objects in a system,
mass mi is a mass of Ωi and
a symbol " means the second derivative of position vector ri(t) of object Ωi by time, that is, its vector of acceleration {x"i(t),y"i(t),z"i(t)}.

In coordinate form the above equation can be written as
Fix(r1(t),...rN(t)) = mi·x"i(t)
Fiy(r1(t),...rN(t)) = mi·y"i(t)
Fiz(r1(t),...rN(t)) = mi·z"i(t)

In summary, we have 3N differential equations of 2-nd order, three for each component of a system of N objects.

In case of multiple objects in three-dimensional space exerting forces on each other (like all the planets of our Solar system or a nucleus with all its electrons in an atom) the vectors of forces are directed in different directions and the system of differential equations based on Newton's Second law is extremely complex.

Let's approach it differently.
Since all forces Fi are conservative, each one can be represented as
Fi(r1(t),...rN(t)) =
= −
iU(r1(t),...rN(t))
where U(r1(t),...rN(t)) is a total potential energy of an entire system and
i is a vector of its partial derivatives by each coordinate of object Ωi.
i = {∂/∂xi,∂/∂yi,∂/∂zi}.

Let's shorten for convenience the results above as
Fi = −iU
and rewrite it in (x,y,z) components of Cartesian coordinates
Fix = −∂U/∂xi
Fiy = −∂U/∂yi
Fiz = −∂U/∂zi

As we see, knowing the potential energy of a system of objects is sufficient to know all the conservative forces acted on individual objects in this system.

The Newton's Second Law equation for object Ωi in vector form is
Fi(r1(t),...rN(t)) = mi·r"i(t)
which in coordinate form would be
Fix(x1(t),...zN(t)) = mi·x"i(t)
Fiy(x1(t),...zN(t)) = mi·y"i(t)
Fiz(x1(t),...zN(t)) = mi·z"i(t)
Using the potential energy, the same equations for object Ωi would be
−∂U /∂xi = mi·x"i(t)
−∂U /∂yi = mi·y"i(t)
−∂U /∂zi = mi·z"i(t)
where U=U(x1(t),...zN(t)) is a total potential energy of an entire system.

Let's address the mi·r"i(t) side of the Newton's Second Law and derive its value from the kinetic energy of an object Ωi.
We express a vector r"i(t) in (x,y,z) coordinates as
(x"i(t),y"i(t),z"i(t))

Kinetic energy of Ωi equals to Ki(t)=½mi·vi(t)² where vi is a linear speed along a trajectory
vi(t)² = r'i(t)·r'i(t) =
= x'i(t)²+y'i(t)²+z'i(t)²


Now we can express the components of an acceleration vector r"i(t) of Ωi in terms of its kinetic energy
Ki(t)=½mi·[x'i(t)²+y'i(t)²+z'i(t)²]

Partial derivatives of kinetic energy by each coordinate of velocity vector produces coordinates of an object's momentum
∂Ki /∂x'i = mi·x'i
∂Ki /∂y'i = mi·y'i
∂Ki /∂z'i = mi·z'i
Derivative by time of a momentum gives the right side of the Newton's Second Law d/dt ∂Ki /∂x'i = d/dt mi·x'i =
= mi·x"i

d/dt ∂Ki /∂y'i = d/dt mi·y'i =
= mi·y"i

d/dt ∂Ki /∂z'i = d/dt mi·z'i =
= mi·z"i


We are ready to express the Newton's Second Law in terms of kinetic and potential energy.

From
−∂U /∂xi = mi·x"i
and
d/dt ∂Ki /∂x'i = mi·x"i
follows
−∂U/∂xi = d/dt ∂Ki /∂x'i
Similarly,
−∂U /∂yi = d/dt ∂Ki /∂y'i
−∂U/∂zi = d/dt ∂Ki /∂z'i

The total kinetic energy of a system is a sum of kinetic energies of its components
K = K1+...+KN
Since each Ki depends only on a velocity of the ith object {x'i(t),y'i(t),z'i(t)}, partial derivative of Ki by x'i(t), y'i(t) or by z'i(t) is the same as partial derivatives of an entire kinetic energy of a system K by the same components x'i(t), y'i(t) or z'i(t) of the velocity of the ith object
∂Ki /∂x'i = ∂K/∂x'i
∂Ki /∂y'i = ∂K/∂y'i
∂Ki /∂z'i = ∂K/∂z'i

Using total kinetic energy of a system, the formulas describing the laws of motion of object Ωi would be
−∂U/∂xi = d/dt ∂K/∂x'i
−∂U/∂yi = d/dt ∂K/∂y'i
−∂U/∂zi = d/dt ∂K/∂z'i
Now the only participants in these equations are the total kinetic and potential energies of an entire system - just two numbers that depend on positions and velocities of system's components.

To make the theory more elegant, let's introduce a Lagrangian L=K−U that equals to a difference between kinetic and potential energy of this system.

Since kinetic energy of a system K is independent of positions of its components {xi(t),yi(t),zi(t)},
−∂U/∂xi=∂(K−U)/∂xi=∂L/∂xi
and similar with partial derivatives by yi and zi.

Since potential energy of a system U is independent on velocities of its components,
∂K/∂x'i=∂(K−U)/∂x'i=∂L/∂x'i
and similar with partial derivatives by yi and zi.

Therefore, our equations look even simpler
∂L/∂xi = d/dt ∂L/∂x'i
∂L/∂yi = d/dt ∂L/∂y'i
∂L/∂zi = d/dt ∂L/∂z'i

The equations above are also differential equations of the second order, like with Newton's Second Law.
There are also 3N of these equations (three coordinates for N objects in a system).
But there is only one number, Lagrangian, also called action, a function of all positions and velocities, to deal with for all objects instead of individual forces for each object.
Lagrangian Mechanics allows to deal with complex system in a simpler way.

As the cherry on top, consider the same equations in the form
d/dt ∂L/∂x'i − ∂L/∂xi = 0
d/dt ∂L/∂y'i − ∂L/∂yi = 0
d/dt ∂L/∂z'i − ∂L/∂zi = 0
In these equations Lagrangian L depends on 3N parameters, positions and velocities of N components of our system, which are, in turn, time-dependent.
So, ultimately, Lagrangian L is a function of time.

On one hand, these are equations that define a motion of a system, that is they define a trajectory of a system changing positions and velocities of its components from one moment in time to another.

On another hand, as we discussed in the Variations chapter of this course, they produce a function of time L(t) that brings to extremum (usually, minimum) the action functional
S = [t1,t2] L(t)·dt

Therefore, we can say that a mechanical system with only conservative forces present changes its state along an N-dimensional trajectory that minimizes the action functional above.

Sunday, September 21, 2025

Physics+ N-dimensional Lagrangian: UNIZOR.COM - Physics+ 4 All - Lagrangian

Notes to a video lecture on UNIZOR.COM

Lagrangian
for N-dimensional Systems


In one of the previous lectures we considered a point-mass object oscillating on a spring in an empty one-dimensional space with Cartesian coordinates (one degree of freedom).

In that case we defined a Lagrangian of an object as a difference between its kinetic and potential energies and built a theory equivalent to Newtonian but based on the Euler-Lagrange equation instead of the Newton's Second Law.

In another lecture we discussed a spring pendulum (two degrees of freedom) and used non-Cartesian parameters to define a state of a system - an angle of pendulum from a vertical and a spring's length.
It was possible but rather complicated to use the Newtonian approach, so we applied Lagrangian Mechanics to come up with the differential equations to describe a state of this system.

An important reason for using energies instead of vectors of force and acceleration in that second example was that energies are scalars, while forces and accelerations are vectors.
Manipulations with scalars are simpler, especially dealing with complex systems with more than one degree of freedom.

Obviously, no matter how we solve a problem, the calculated actual physical trajectories of objects in space must be the same.

Before proceeding any further, we strongly recommend to refresh your knowledge about conservative forces, independence of work performed by these forces from a trajectory of an object moved by them, a concept of a field and its potential.
The chapter Laws of Newton of this course is a good source of this information.

Recall that conservative forces are defined as those that depend only on position in space, independent of time. Their work, performed by moving an object from one position to another, does not depend on trajectory or speed along this trajectory, but depends only on the beginning and ending positions of an object.

From the Energy Conservation Law follows that the work performed by a conservative force that moves an object changes the potential energy of this object by the amount of work performed.

Recall that an increment of potential energy
ΔEpot=Epot(P2)−Epot(P1)
of an object moved by a conservative force F (a force of a field, a force of a spring etc.) from position P1 to P2 along any trajectory equals to the work performed by this conservative force.
ΔEpot = [P1~P2]F(P)·dr
where P is a variable position of an object moving along a trajectory from P1 to P2,
r=OP is a vector from the origin of coordinates O to a position of an object P as it moves along a trajectory,
multiplication F(P)·dr is a scalar product of two vectors - a vector of force and an infinitesimal vector of increment of a position of an object along its trajectory and
[P1~P2] denotes that an integral is taken along a trajectory from P1 to P2.

The same conservative force (a force of a field, a force of a spring etc.) can be represented as a vector of gradient of a potential
F = −Epot
where a minus sign '' indicates that the conservative force (a force of a field, a force of a spring etc.) is always directed towards decreasing of potential.

Lagrangian Mechanics was invented to simplify analysis of complex systems acted upon by conservative forces, like electrostatic, gravitational or spring forces.

We are going to prove that Lagrangian Mechanics of a closed (no external forces) mechanical system with its components acted among themselves with some conservative forces produces differential equations of motion that are equivalent to Newtonian equations, but easier to deal with.

Consider a system that consists of N point-masses with each ith component Ωi acted upon by conservative forces (three-dimensional vectors) from all components of this system with a combined force
Fi(r1,...rN)
that depends on positions of all components of a system.

The time-dependent Cartesian coordinates of each Ωi are {xi(t),yi(t),zi(t)}, which we will denote as a vector ri(t).

The Newton's Second Law of motion for each object in a system is, therefore,
Fi(r1(t),...rN(t)) = mi·r"i(t)
where each Fi is a vector of three components {Fix,Fiy,Fiz}, and each component is a function of 3N coordinates of all objects in a system,
mass mi is a mass of Ωi and
a symbol " means the second derivative of position vector ri(t) of object Ωi by time, that is, its vector of acceleration {x"i(t),y"i(t),z"i(t)}.

In coordinate form the above equation can be written as
Fix(r1(t),...rN(t)) = mi·x"i(t)
Fiy(r1(t),...rN(t)) = mi·y"i(t)
Fiz(r1(t),...rN(t)) = mi·z"i(t)

In summary, we have 3N differential equations of 2-nd order, three for each component of a system of N objects.

In case of multiple objects in three-dimensional space exerting forces on each other (like all the planets of our Solar system or a nucleus with all its electrons in an atom) the vectors of forces are directed in different directions and the system of differential equations based on Newton's Second law is extremely complex.

Let's approach it differently.
Since all forces Fi are conservative, each one can be represented as
Fi(r1(t),...rN(t)) =
= −
iU(r1(t),...rN(t))
where U(r1(t),...rN(t)) is a total potential of an entire system and
i is a vector of its partial derivatives by each coordinate of object Ωi.
i = {∂/∂xi,∂/∂yi,∂/∂zi}.

Let's shorten for convenience the results above as
Fi = −iU
and rewrite it in (x,y,z) components of Cartesian coordinates
Fix = −∂U/∂xi
Fiy = −∂U/∂yi
Fiz = −∂U/∂zi

As we see, knowing the potential of a system of objects at each point is sufficient to know all the conservative forces acted on individual objects in this system.

Let's address the mi·r"i(t) side of the Newton's Second Law and derive its value from the kinetic energy of an object Ωi.
We express a vector r"i(t) in (x,y,z) coordinates as
(x"i(t),y"i(t),z"i(t))

The Newton's Second Law equations for object Ωi in coordinate form would then be
Fix = mi·x"i(t)
Fiy = mi·y"i(t)
Fiz = mi·z"i(t)
Using the potential energy, the same equations for object Ωi would be
−∂U /∂x = mi·x"i(t)
−∂U /∂y = mi·y"i(t)
−∂U /∂z = mi·z"i(t)

Kinetic energy of Ωi equals to Ki(t)=½mi·vi(t)² where vi is a linear speed along a trajectory
vi(t)² = r'i(t)·r'i(t) =
= x'i(t)²+y'i(t)²+z'i(t)²


Now we can express the components of an acceleration vector r"i(t) of Ωi in terms of its kinetic energy
Ki(t)=½mi·[x'i(t)²+y'i(t)²+z'i(t)²]

Partial derivatives of kinetic energy by each coordinate of velocity vector produces coordinates of an object's momentum
∂Ki /∂x'i = m·x'i
∂Ki /∂y'i = m·y'i
∂Ki /∂z'i = m·z'i
Derivative by time of a momentum gives the right side of the Newton's Second Law d/dt ∂Ki /∂x'i=d/dt m·x'i=m·x"i
d/dt ∂Ki /∂y'i=d/dt m·y'i=m·y"i
d/dt ∂Ki /∂z'i=d/dt m·z'i=m·z"i

We are ready to express the Newton's Second Law in terms of kinetic and potential energy.
From
Fix = −∂U/∂xi
and
d/dt ∂Ki /∂x'i = m·x"i
follows
−∂U/∂xi = d/dt ∂Ki /∂x'i
Similarly,
−∂U /∂yi = d/dt ∂Ki /∂y'i
−∂U/∂zi = d/dt ∂Ki /∂z'i

The total kinetic energy of a system is a sum of kinetic energies of its components
K = K1+...+KN
Since each Ki depends only on a velocity of the ith object {x'i(t),y'i(t),z'i(t)}, partial derivative of Ki by x'i(t), y'i(t) or by z'i(t) is the same as partial derivatives of an entire kinetic energy of a system K by the same components x'i(t), y'i(t) or z'i(t) of the velocity of the ith object
∂Ki /∂x'i = ∂K/∂x'i
∂Ki /∂y'i = ∂K/∂y'i
∂Ki /∂z'i = ∂K/∂z'i

Using total kinetic energy of a system, the formulas describing the laws of motion of object Ωi would be
−∂U/∂xi = d/dt ∂K/∂x'i
−∂U/∂yi = d/dt ∂K/∂y'i
−∂U/∂zi = d/dt ∂K/∂z'i
Now the only participants in these equations are the total kinetic and potential energies of an entire system - just two numbers that depend on positions and velocities of system's components.

To make the theory more elegant, let's introduce a Lagrangian L=K−U that equals to a difference between kinetic and potential energy of this system.

Since kinetic energy of a system K is independent of positions of its components {xi(t),yi(t),zi(t)},
−∂U/∂xi=∂(K−U)/∂xi=∂L/∂xi
and similar with partial derivatives by yi and zi.

Since potential energy of a system U is independent on velocities of its components,
∂K/∂x'i=∂(K−U)/∂x'i=∂L/∂x'i
and similar with partial derivatives by yi and zi.

Therefore, our equations look even simpler
∂L/∂xi = d/dt ∂L/∂x'i
∂L/∂yi = d/dt ∂L/∂y'i
∂L/∂zi = d/dt ∂L/∂z'i

The equations above are also differential equations of the second order, like withNewton's Second Law.
There are also 3N of these equations (three coordinates for N objects in a system).
But there is only one number, Lagrangian, also called action, a function of all positions and velocities, to deal with for all objects instead of individual forces for each object.
Lagrangian Mechanics allows to deal with complex system in a simpler way.

As the cherry on top, consider the same equations in the form
d/dt ∂L/∂x'i − ∂L/∂xi = 0
d/dt ∂L/∂y'i − ∂L/∂yi = 0
d/dt ∂L/∂z'i − ∂L/∂zi = 0
In these equations Lagrangian L depends on 3N parameters, positions and velocities of N components of our system, which are, in turn, are time-dependent.
So, ultimately, Lagrangian L is a function of time.

On one hand, these are equations that define a motion of a system, that is they define a trajectory of a system changing positions and velocities of its components from one moment in time to another.

On another hand, as we discussed in the Variations chapter of this course, they produce a function of time L(t) that brings to extremum (usually, minimum) the action functional
S = [t1,t2] L(t)·dt

Therefore, we can say that a mechanical system with only conservative forces present changes its state along an N-dimensional trajectory that minimizes the action functional above.

Saturday, August 23, 2025

Physics+ Pendulum in Lagrangian Mechanics: UNIZOR.COM - Physics+ 4 All -...

Notes to a video lecture on UNIZOR.COM

Mathematical Pendulum

Plain Pendulum

We will illustrate the application of Lagrangian mechanics by analyzing the movement of a mathematical pendulum - a problem we have already discussed in the Physics 4 Teens - Mechanics - Pendulum, Spring - Pendulum using the Newtonian approach.

We recommend reviewing the lecture mentioned above and refresh the Newtonian method of deriving the main equation of motion of the pendulum:
α"(t) = −(g/l)·sin(α(t))
which was obtained from properly determining the force F that moves a pendulum as a vector sum of the gravity force directed vertically down and the tension of an unstretchable thread that keeps an object at the free end of a thread on a constant distance from the fixed end of a thread.

The two forces involved in formation of a resulting force F, gravity P=m·g and tension of a thread T, had to be combined using the rules for addition of vectors, which required some thinking.

Let's apply the Lagrangian mechanics to this problem using an angle of a thread with a vertical α as the one and only parameter that determines a position of an object.
This way of identification of a position is more convenient than Cartesian coordinates originated at the fixed end of a thread because both of them can be easily derived from α
x = l·sin(α)
y = −l·cos(α)

The Lagrangian is the difference between kinetic and potential energies.
L(α(t),α'(t)) =
= Ekin(α'(t)) − Epot(α(t))


Kinetic energy depends on mass M and linear speed of an object along its circular trajectory v=l·α'(t)
Ekin = ½M·v² =
= ½M·l²·
[α'(t)]²

Potential energy depends on a mass of an object M, its height over the ground h(t) and an acceleration of free fall g.
Epot(t) = M·g·h(t)
If the origin of our coordinates, the fixed end of a thread, is at height H over the ground,
h = H − l·cos(α)
and, therefore,
Epot(t) = M·g·[H−l·cos(α(t))]

Now we can construct the Euler-Lagrange equation
(∂/∂α)L(α(t),α'(t)) =
= (d/dt)(∂/∂α')L(α(t),α'(t))


Calculate left and right sides separately.
(∂/∂α)L(α(t),α'(t)) =
= (∂/∂α)
[Ekin(α'(t)) − Epot(α(t))] =
= (∂/∂α)
[−Epot(α(t))] =
= (∂/∂α)
[−M·g·[H−l·cos(α(t))]] =
= −M·g·l·sin(α(t))


(d/dt)(∂/∂α')L(α(t),α'(t)) =
=(d/dt)(∂/∂α')
[Ekin(α'(t))−Epot(α(t))]=
= (d/dt)(∂/∂α')Ekin(α'(t)) =
= (d/dt)(∂/∂α')½M·l²·
[α'(t)]² =
= (d/dt)M·l²·α'(t) =
= M·l²·α"(t)


The Euler-Lagrange equation is
−M·g·l·sin(α(t)) = M·l²·α"(t)
or
α"(t) = −(g/l)·sin(α(t))
which is exactly as applying Newtonian mechanics.
If you don't think the Lagrangian mechanics is simpler than Newtonian for those who are familiar with Calculus of partial derivatives, consider the next example.


Spring Pendulum

A weightless spring replaces an unstretchable thread of the previous problem.
The spring and an object on its end are in a weightless frictionless tube that maintains a straight form, so an object has two degrees of freedom - radial inside a tube stretching and squeezing a spring and pseudo-circular as it moves together with a tube in a pendulum like motion.
The problem of specifying the motion of an object is much more complex here because the spring tension is changing not only with an angle α(t) but also because of the movement of an object within a tube.

However, using the Langrangian mechanics, this problem can be analyzed with much less efforts and the corresponding differential equation can be constructed relatively easy.

As before, let's calculate the kinetic and potential energies of an object.

The object's kinetic energy can be calculated as a sum of its radial movement's kinetic energy inside the tube and kinetic energy of its pseudo-circular movement perpendicularly to the tube.
The reason is simple. The object's linear velocity vector can be represented as a sum of two perpendicular to each other vectors, one is inside the tube and another perpendicular to it.
v = v|| + v
Since kinetic energy depends on a square of the linear speed, according to Pythagorean Theorem
v² = v||² + v²
from which follows that
Ekin = ½M·v² =
= ½M·v||² + ½M·v
²

Distance of an object from the fixed point of oscillation l is variable and depends on time: l=l(t).
Therefore, v||(t)=l'(t).
Perpendicular to l component of an object speed is v(t)=l(t)·α'(t).
Therefore, kinetic energy of an object is
Ekin = ½M·[l'(t)²+l(t)²·α'(t)²]

The object's potential energy can be calculated as a sum of its potential energy due to gravity and potential energy of a stretched or a squeezed spring.
If the fixed point of oscillation is at the height H above the ground, an object is at height h(t)=H−l(t)·cos(α(t)) above the ground, and potential energy of an object related to its position in the gravitational field is
Egrav = M·g·[H−l(t)·cos(α(t))]

Potential energy of a spring depends on the degree of its stretching or squeezing.
Assume, the length of a spring in a neutral state is l0. Then the length of stretching or squeezing at time t is l(t)−l0.
Therefore, potential energy of an object related to a spring is
Espr = ½k·[l(t)−l0]²
where k is a coefficient of elasticity of a spring.

Total potential energy of an object is
Epot = Egrav + Espr =
= M·g·
[H−l(t)·cos(α(t))] +
+ ½k·
[l(t)−l0]²

Construct Lagrangian
L(l,l',α,α') = Ekin − Epot =
= ½M·
[l'(t)²+l(t)²·α'(t)²]
− M·g·
[H−l(t)·cos(α(t))]
− ½k·
[l(t)−l0]²

All which remains is to write the Euler-Lagrange equation for this Lagrangian.

The problem is, we are familiar only with the Euler-Lagrange equation for a system with one degree of freedom, like x(t). Now we have two degrees of freedom - l(t) and α(t).

Fortunately, the Euler-Lagrange equation can be specified for each degree of freedom independently, which will be proven in the next lecture.

Therefore, we can write two independent Euler-Lagrange equations (skipping (t) for brevity):
(∂/∂l)L(l,l',α,α') =
= (d/dt)(∂/∂l')L(l,l',α,α')

and
(∂/∂α)L(l,l',α,α') =
= (d/dt)(∂/∂α')L(l,l',α,α')


The first equation is
M·l·α'²+M·g·cos(α)−k·(l−l0) =
= M·l"


The second equation is
−M·g·l·sin(α) = M·l²·α"
or
−g·sin(α) = l·α"
or
−(g/l)·sin(α) = α"
which looks exactly the same as in the case above with unstretchable thread instead of a spring.

Wednesday, August 20, 2025

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

Notes to a video lecture on UNIZOR.COM

Lagrangian

First of all, let's stipulate that the Laws of Newton are based on experiment, they are not derived from some more fundamental theories.

Lagrangian mechanics presents a different approach to analyze the motion than Newtonian mechanics.
In many cases it presents a simpler, more universal way to describe the motion of a mechanical system than Newtonian one.

Let's start with an example where both methodologies lead to the same result.

Spring Oscillation

Consider an ideal spring with one end fixed and a point-mass attached to another end.
The oscillations will occur along the length of a spring that coincides with X-axis.
Position of a point-mass on the spring's end will be described by it X-coordinate x(t) as a function of time t with initial position at time t=0 being an origin of X-coordinate, that is x(0)=0.


According to the Hooke's Law, the force F of a spring applied to an object attached to its end is proportional to a length x by which this spring is stretched or squeezed from its neutral position and directed always towards a neutral point x=0 of no stretching or squeezing.
F = −k·x
where k is a coefficient of elasticity that characterizes physical properties of a spring.

According to the Newton's Second Law, the acceleration a of an object is proportional to a force F applied to it
F = m·a
where m is the object's mass being a coefficient of proportionality.

A linear acceleration a(t), as a function of time, is a derivative of a linear speed v(t) by time t
a(t) = dv(t)/dt = v'(t)
A linear speed v(t) is, in turn, a derivative of a position of an object x(t) by time
v(t) = dx(t)/dt = x'(t)
Therefore, an acceleration is a second derivative of a position by time
a(t) = d²x(t)/dt² = x"(t)

Equating the value of force by Hooke's Law to that of Newton's Second Law, we get a differential equation that defines a motion of the object
−k·x(t) = m·a(t)
or, equivalently,
−k·x(t) = m·x"(t)
Solution to this differential equation of the second order is a trajectory of our object.

Let's approach the same problem from another side.

An object attached to a spring's end that has mass m and linear speed v has kinetic energy that is equal to
Ekin = ½m·v²
Since speed v(t), as a function of time t is just a derivative of a position x(t) by time, we can express kinetic energy in terms of position, as in the case of potential energy above
Ekin = ½m·[x'(t)]²
NOTICE:
Ekin depends explicitly only on speed x'(t) and
d/dt[∂(Ekin)/∂x'] =
= d/dt
[m·x'] = mx"(t) = F

A stretched or a squeezed spring has potential energy equal to the amount of work needed to stretch or squeeze it against the force of its elasticity (you can refer to a lecture Physics 4 Teens - Energy - Potential Energy - Spring on UNIZOR.COM).
Thus, a potential energy of a spring squeezed or stretched by the length x(t), as a function of time t, equals to
Epot = ½k·[x(t)]²
where k is the same coefficient of elasticity as above that characterizes the physical properties of a spring.
NOTICE:
Epot depends explicitly only on position x(t) and
∂(−Epot)/∂x = −k·x(t) = F

Based on two NOTICEs above, it is IMPORTANT to see that
∂(−Epot)/∂x =
= d/dt
[∂(Ekin)/∂x'] = F

Since Epot depends explicitly only on position x(t), not on speed x'(t), and Ekin depends explicitly only on speed x'(t), not on position x(t),
∂(Ekin−Epot)/∂x =
= ∂(−Epot)/∂x =
= d/dt
[∂(Ekin)/∂x'] =
= d/dt
[∂(Ekin−Epot)/∂x']

At this point it's essential to recall the Euler-Lagrange equation (you can refer to a lecture Physics+ 4 All - Variations - Euler-Lagrange on UNIZOR.COM) - a differential equation of the second order that defines a function f0(x) that minimizes or maximizes a functional
Φ[f(x)] = [a,b] F[x,f(x),f '(x)]dx
where F[...] is some known smooth real function of three arguments - real variable x, real value of function f(x) and real value of derivative f '(x).
This Euler-Lagrange differential equation looks like this:
(∂/∂f)F [x,f0(x),f '0(x)] =
= (d/dx)(∂/∂f ')F
[x,f0(x),f '0(x)]

Let's change more abstract symbols x and f(x) to those applicable to our task.
The argument will be time t instead of abstract x. The function will be a position x(t) instead of abstract f0(x).
Now the Euler-Lagrange equation looks like
(∂/∂x)F [t,x(t),x'(t)] =
= (d/dt)(∂/∂x')F
[t,x(t),x'(t)]

Compare this to the equation above that equates partial derivative from Ekin−Epot by x with its partial derivative by x'.

Obviously, L=Ekin−Epot satisfies the Euler-Lagrange equation
(∂/∂x)L[t,x(t),x'(t)] =
= (d/dt)(∂/∂x')L
[t,x(t),x'(t)]
which in this case is exactly the same as the equation obtained from the Newton's Second Law
−k·x(t) = m·x"(t)
Expression
L[x(t),x'(t)]=Ekin(x')−Epot(x)
is called Lagrangian.

Consider an object moving along some trajectory x(t) from the moment of time t1 to the moment of time t2.
At any moment it has certain kinetic and potential energy, so we can constract a Lagrangian
L(t) = Ekin(x'(t)) − Epot(x(t))

Consider an integral of this Lagrangian by time
S = [t1,t2]L(t)·dt
This integral is call action.
The trajectory that minimizes or maximizes this action is a solution to an Euler-Lagrange equation
(∂/∂x)L[x(t),x'(t)] =
= (d/dt)(∂/∂x')L
[t,x(t),x'(t)]
which has the same solution as Newtonian F=m·a.

Therefore, the trajectory obtained using a Lagrangian approach is the same the one from Newtonian mechanics. BUT IN SOME CASES IT MIGHT BE MUCH MORE CONVENIENT.

The equivalence of a differential equation obtained from the Newton's Second Law and the Euler-Lagrange equation is not just a coincidence peculiar for springs.

In general, kinetic energy always depends on mass and speed
Ekin = ½m·v²
In general, derivative of Ekin by speed v is a momentum of motion p
p = m·v = ∂/∂v(Ekin) =
= ∂/∂v(½mv²)

In general, derivative of momentum p by time t is the force F
dp/dt = d(m·v)/dt = m·a = F
In general, potential energy is, actually, an amount of work W.
Since dW=F·dx, its derivative by x is the force, and a derivative of potential energy by coordinates gives the force as well.

So, the Newton's Second Law and Euler-Lagrange equation are equivalent. Why do we need both?
Practical mechanical problems are rarely as simple as we are taught at high school.
It appears that the more complicated problems with more than one object involved are easier to solve using Lagrangian L=Ekin−Epot than to deal with complicated forces and their interaction constructing the equations of F=m·a type.

The next lectures will be dedicated to a few important physical problems and their solutions using Euler-Lagrange equation.