Monday, August 31, 2026

Math 4 Teens - Path Integrals

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

Path/Line/Curvilinear Integral

Path Integral of Scalar Function

Recall the definition of a definite integral (Riemann integral) of real function F(x) defined on interval [a,b]:
I = abF(x) dx = lim Σi∈[1,N] F(xiΔxi
where {xi} is partitioning of segment [a,b] into N parts,
and we assume that N→∞, while the maximum width of intervals Δxi=xi−xi−1 converges to zero.

This definition pertains to a function F(x) defined on a straight segment [a,b] and traditionally interpreted as an area under a graph of a function on Cartesian XY plane restricted on the left and right by x=a and x=b correspondingly.

Consider a function that is defined not on a straight segment of real numbers [a,b], but on some path (curve) in space we call γ.
Let's assume for definitiveness that our path is in three-dimensional Cartesian space and is defined by a set of three smooth functions
γ={x(s),y(s),z(s)}
of some real parameter s∈[0,S].

Generally speaking, parameterization of a curve in N-dimensional space is just a set of N real functions xi(s) (i∈[1,N]) of real argument s such that
(a) all these functions have the same domain S - a finite or an infinite interval of real numbers;
(b) for each value of parameter sS a set of functions xi(s) used as a set of N coordinates correspond to some point on a curve;
(c) the parameterization covers the entire curve: for each point on a curve there is at least one value of parameter s within domain S such that a set of functions xi(s) represent the coordinates of this point.
The parameter s itself does not have any particular meaning. Depending on the problem, it can represent time, distance along the curve, arc length, or simply be an arbitrary convenient parameter.

For each position on this path a function F(x,y,z) is defined.

The path integral of this function F(x,y,z) along path γ is defined as
γF(x,y,z)·dγ = [0,S]F(x(s),y(s),z(s))·ds
The expression above defines a new concept of path integral by connecting it to a regular integral based on a parameterization of a curved path.
Thus defined path integral is alternatively named line integral or curvilinear integral.

Obviously, this definition can be expanded to any N-dimensional space by replacing three-dimensional path γ={x(s),y(s),z(s)} with N-dimensional γ={x1(s),x2(s),...,xN(s)}

Example
Consider a path γ in some mountainous area and a task of measuring the average barometric pressure along this path.
This is a typical problem with the path integral as a solution.
While path is three-dimensional, we can choose a length of a road from the beginning of the path s as a parameter and, for each value of this parameter (that is, for each point on a mountain path {x(s),y(s),z(s)}) we measure the barometric pressure H(s).
After integration of function H(s) by parameter s we can divide the result by the total length of a path to get the average barometric pressure.
So the most important issue in the path integral of a scalar function is to properly choose the parameter s to define the curved path as a function of a single parameter, thereby reducing the function defined for each point on a three-dimensional path to the function of a single parameter and reducing the path integral to a regular definite integral by a single variable.

Path Integral of Vector Function

Recall a concept of work in physics.
In a simple case of a straight road and a car moving along it from point A to point B, whose engine pulls the car with constant force F directed along the road, the work is a product of a force by a distance
W = F·d
where d is the length of segment AB.

In a more complicated case of a variable but still directed along the straight road force F=F(s) whose magnitude depends on position s on the road from A to B, the work can be approximated by dividing the segment AB into many small intervals, assuming that within each interval the force is practically the same, calculate the work on each interval as above, sum the work on all intervals and start increasing the number of intervals while decreasing their size.
In the limit, when the length of all intervals is infinitesimal, while their number increases to infinity, this calculation will result in an exact amount of work of an engine on a road AB expressed as an integral
W = [0,d]F(s)·ds

Consider now a case of a smooth but curved road from A to B with the force still directed along the road (that is, the direction of the force is always tangential to a road).
This case is no different than the above case where we introduced a path integral.
So, the work of an engine of a car moving along a curved road is just another example of application of path integral to physics.

The work evaluation in cases when the force is not directed along a path of a moving object, however, requires some other technique.
Simple algebraic product of the magnitude of force F(s) by ds and integrating by s would not produce the right result in these cases.

Let's generalize the definition of a path integral to accommodate the calculation of work performed by the force F(s) being a general vector-function not necessarily directed along the path of motion.

To come up with some meaningful formula, let's introduce a system of Cartesian X,Y,Z coordinates on a plane and define the curve by some vector-function r(s)={x(s),y(s),z(s)} parameterized by variable s∈[0,S] with r(0)=A and r(S)=B.

The force, as a vector, would be represented by a vector-function F(r) defined for each point on a curve by its three components
F(r) = {Fx(x,y,z),Fy(x,y,z),Fz(x,y,z)}

In physics the work performed by a constant vector of force F in case it's not colinear with a straight segment of movement s is defined as a product of a projection of the vector of force onto a direction of movement Fproj and the length |s| of the movement.

According to this rule for calculating the work, for the vector of force F and a segment s along which an object moves the work of this force is calculated as
W = |F|·|s|·cos(φ)
where φ is an angle between direction of the force and direction of the segment.

This formula can be written as a scalar (dot) product of two vectors:
W = F·s

Let's return to a task at hand - calculate the work performed by a generally directed force along a curved path.
Dividing, as before, curve AB into n small almost straight intervals, we see that on each interval the force is not directed along it, but makes some angle.
Therefore, for a small interval Δsi and force Fi acting within this small interval the work performed by the force is
ΔWi = Fi · Δsi
where dot between two vectors means scalar product.

The total work for all n intervals is
W = Σi∈[1,n]ΔWi
As the number of intervals increases to infinity and the size of each decreases to zero, this sum tens to some limit. This limit is called the path integral of vector F along path AB:
AB[F(r)·dr]
where dot between two vectors means scalar product.

This definition can be rephrased by using the coordinate representation of vectors.
F(r) = F(x,y,z) =
= {Fx(x,y,z),Fy(x,y,z),Fz(x,y,z)}
dr = {dx,dy,dz}
Hence, infinitesimal amount of work our force performs on infinitesimal interval of a curved path equals to
dW = F(r)·dr =
= Fx(x,y,z)·dx+Fy(x,y,z)·dy+Fz(x,y,z)·dz


Considering our curve is defined parametrically as
r = r(s) = {x(s),y(s),z(s)}
we can define the path integral of a vector function above as
AB[F(r)·dr] =
= [0,S]Fx(x(s),y(s),z(s))·dx(s) +
+ [0,S]Fy(x(s),y(s),z(s))·dy(s) +
+ [0,S]Fz(x(s),y(s),z(s))·dz(s) =
= [0,S]Fx(x(s),y(s),z(s))·(dx(s)/ds)·ds +
+ [0,S]Fy(x(s),y(s),z(s))·(dy(s)/ds)·ds +
+ [0,S]Fz(x(s),y(s),z(s))·(dz(s)/ds)·ds
thus reducing a path integral to a regular definite integral.

To bring our problem close to physics, we can use time t as a parameter instead of abstract s, having position of a moving object to be a function of time
x = x(t)
y = y(t)
z = z(t)
In this case dx(t)/dt is an X-component of the velocity of a moving object that we can denote as ẋ(t) and similar for other coordinates.

Using time as a parameter that defines the position of a moving object, the path integral that calculates the work would look like
AB[F(r)·dr] =
= [0,S]Fx(x(t),y(t),z(t))·ẋ(t)·dt +
+ [0,S]Fy(x(t),y(t),z(t))·ẏ(t)·dt +
+ [0,S]Fz(x(t),y(t),z(t))·ż(t)·dt

Either way, the calculation of a path integral of a vector-function have been reduced to regular integration.

Math 4 Teens - Path Integral Properties

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

Path Integral Properties

The properties of path integrals below follow from the definition of path integral in terms of regular integral using the parameterization of the path
γ = γ(s) = {x(s),y(s),z(s)} for s∈[0,S]
and corresponding properties of regular integrals.

Path Integrals Properties
of Scalar Functions


1. γ [F(x,y,z)+G(x,y,z)] =
= γ F(x,y,z) dγ + γ G(x,y,z) dγ

With parameterization of path γ functions F and G become functions of one argument s
F(x(s),y(s),z(s)) = f(s)
G(x(s),y(s),z(s)) = g(s)
Hence,
γ[F(x,y,z)+G(x,y,z)] =
= [0,S][f(s)+g(s)] ds
and we can refer to the additive property of the regular integrals.


2. γ c·F(x,y,z) dγ = c·γ F(x,y,z) dγ
for the same reasons as above.


3. Going along a path in an opposite direction changes the sign of an integral.
Indeed, assume that path γ is from A to B and is parameterized by s∈[0,S], which implies
γ(0)=A, γ(S)=B
Then
AB F(x,y,z) dγ = [0,S]F(x(s),y(s),z(s))ds
BA F(x,y,z) dγ = [S,0]F(x(s),y(s),z(s))ds
and, by properties of regular definite integrals, the latter is opposite in sign to the former.

4. Assume, path γ from A to B is divided by point M into two parts:
α from A to M and
β from M to B.
So, we can say γ=α+β.
Then we can state the following additive property of path integrals:
γ F(x,y,z) dγ =
=
α F(x,y,z) dα + β F(x,y,z) dβ
Here is the proof of this statement.
Consider the parameterization of path γ={x(s),y(s),z(s)}, where s∈[0,S].
Using this, point A corresponds to s=0, point B corresponds to s=S.
Assume, point M corresponds to s=sM.
This allows to parameterize both parts of an original path:
α={x(s),y(s),z(s)}, where s∈[0,sM]
β={x(s),y(s),z(s)}, where s∈[sM,S]
Then, by definition of a path integral,
γ F(x,y,z) dγ=[0,S]F(x(s),y(s),z(s))ds
α F(x,y,z) dα=[0,sM]F(x(s),y(s),z(s))ds
β F(x,y,z) dβ=[sM,S]F(x(s),y(s),z(s))ds
From these definitions and the corresponding additive property of regular integrals follow the additive property of path integrals.


Path Integrals Properties
of Vector Functions


5. In physics we sometimes deal with gravitational, electrostatic and some other types of forces that have an important property called conservative.
Conservative force F={Fx,Fy,Fz}, as a vector, can be represented as partial derivatives of some scalar function f(x,y,z) by corresponding coordinates, which means:
Fx(x,y,z) = ∂f(x,y,z)/∂x
Fy(x,y,z) = ∂f(x,y,z)/∂y
Fz(x,y,z) = ∂f(x,y,z)/∂z
In physics concepts of potential and potential energy are based on such function.
Let's prove that path integral of a vector-function that represents a conservative force depends only on the endpoints of a path and does not depend on path itself between these endpoints.
In other words, no matter which path we choose between two fixed endpoints, path integral along it will be the same.
Given two endpoints in space A and B and a parametrically defined path AB that depends on parameter s∈[0,S]
r = r(s) = {x(s),y(s),z(s)}
with A={x(0),y(0),z(0)}
and B={x(S),y(S),z(S)}.
Our task is to integrate a vector-function that represents a conservative force F={Fx,Fy,Fz} along path AB.
This integral equals to
AB[F(r)·dr] =
under integral we have a scalar (dot) product of two vectors
F={Fx,Fy,Fz} and dr={dx,dy,dz}
= [0,S][Fx(x(s),y(s),z(s))·dx(s) +
+ Fy(x(s),y(s),z(s))·dy(s) +
+ Fz(x(s),y(s),z(s))·dz(s)]
Assuming our vector-function represents a conservative force, that is
Fx = ∂f/∂x
Fy = ∂f/∂y
Fz = ∂f/∂z
we can rewrite this path integral as
AB[F(r)·dr] =
= [0,S]{[∂f(x(s),y(s),z(s))/∂x]·dx(s) +
+
[∂f(x(s),y(s),z(s))/∂y]·dy(s) +
+
[∂f(x(s),y(s),z(s))/∂z·dz(s)]}
Notice that the expression in {...} is a full differential of function f(x,y,z).
Therefore,
AB[F(r)·dr] = [0,S]df(x(s),y(s),z(s))
According to the rules of integration, this equals to
f(x(S),y(S),z(S))−f(x(0),y(0),z(0))
As we see, the path integral of a conservative vector-function depends only on the values of this scalar function f(x) at endpoints of a path.


6. If a vector-function F represents a conservative force, then the path integral along any closed loop path is zero.
Assume, path γ is a closed loop and is parameterized by s∈[0,S], which implied that A=s(0)=s(S)=B.
According to property #5 above, the values of a path integral along this path is
f(x(S),y(S),z(S))−f(x(0),y(0),z(0))
But points A=s(0)={x(0),y(0),z(0)} and B=s(S)={x(S),y(S),z(S)} coincide, which makes the expression above to be zero.
Alternative proof might be as follows. Let's choose any two points on a closed loop of this path, M and N.
Consider two different ways of moving from M to N along two different routes within path γ that we conditionally call "left" and "right".
Since path integral from M to N for conservative vector-function F is independent of path chosen, but only on the endpoints,
[MleftN]F(γ)dγ = [MrightN]F(γ)dγ
Full loop along path γ can be represented as a sum of MleftN+NrightM.
But changing the direction of integration from MrightN to NrightM changes the sign of a path integral. [NrightM]F(γ)dγ = −[MrightN]F(γ)dγ
Full path integral is equal to
[MleftN]F(γ)dγ + [NrightM]F(γ)dγ =
= [MleftN]F(γ)dγ[MrightN]F(γ)dγ
As we see, we are subtracting a value from an equal value.
Therefore, integration along a full loop MleftNrightM results in zero.

Saturday, August 1, 2026

Physics+ 4 All - Lagrangian for Non-Conservative Systems

Notes to a video lecture on UNIZOR.COM

Lagrangian for
Nonconservative System


All the advantages of Lagrangian Mechanics are best visible in its approach to the analysis of conservative mechanical system, where the forces acting on system's components are conservative and, as such, can be represented as gradients of a potential - a scalar field with values at each point in space depending only on the location.

Attempts to extend this approach to nonconservative systems encounter technical difficulties but are nevertheless worthwhile.
This lecture exemplifies this case.

Assume a simple system with forces depending not only on position but on velocity of an object as well.
Let a stone of mass m fall vertically into the water with no initial velocity.
The force of gravity will pull it down, but the water exerts a resistive force opposite to the direction of motion.
Assume the resistive force is proportional to the stone's speed v. Then the drag force has magnitude k·v, where k is the coefficient of resistance, and it always acts opposite to the direction of motion.


Our first task is to analyze the movement using Newtonian Second law.
Newton's Second Law produces the following differential equation of motion (t) = m·g − k·(t)
that can be simplified to a standard linear form
(t) + (k/m)·(t) − g = 0

The solution to this equation with initial conditions
x(0)=0 and x'(0)=0
is
x(t) =
= (mg/k)·t+(m²g/k²)·(e−kt/m−1)

Condition x(0)=0 is satisfied.
The speed (time-derivative) is
x'(t) = (mg/k)·(1−e−kt/m)
Condition x'(0)=0 is satisfied.
The acceleration is
x"(t) = g·e−kt/m
Newton's differential equation of motion above is satisfied.

Two important conclusions:
1. Since the positive direction is downward, the acceleration remains positive but decreases exponentially toward zero.
2. Therefore, the speed is always increasing but asymptotically approaches its maximum mg/k.

Now we will try to approach this task from the Lagrangian viewpoint.
A simple Lagrangian in terms of a difference between kinetic and potential energy is not a good choice since the force of resistance to a movement is dependent on velocity and, therefore, is not conservative.

However, one possible Lagrangian, first proposed by Bateman and later developed by Caldirola and Kanai, is obtained as follows.
Consider again Newton's Second law equation for our system
(t) + (k/m)·(t) − g = 0
Suppose there exists a Lagrangian L(x(t),ẋ(t),t) suitable for this nonconservative system.
Then its Euler Lagrange equation
d/dt [∂L/∂ẋ] = ∂L/∂x
must be equivalent to Newton's Second equation above.
In other words, both equations must be transformable into each other.

1. Multiply Newton's Second law equation by ekt/m.
ekt/m[(t)+(k/m)·(t)−g] = 0
or
ekt/m[(t)+(k/m)·(t)] = g·ekt/m
2. Notice that
ekt/m[(t)+(k/m)·(t)] =
= d/dt
[ekt/m·(t)]
3. Notice that an expression in [...] on the right side of the equation above can be written as a derivative by
ekt/m· = ∂/∂[ekt/m·½²]
4. Therefore, we have an equation
d/dt ∂/∂[ekt/m·½²] = g·ekt/m
5. The right side of the equation in item 4 equals to
∂/∂x [x·ekt/m]
6. Our transformed Newton's Second law equation looks now as
d/dt ∂/∂[ekt/m·½²] =
=∂/∂x
[x·ekt/m]
7. Adding to the expression in [...] on the left side of the equation any function of x won't change the partial derivative by . Adding to the expression in [...] on the right side of the equation any function of won't change the partial derivative by x.
Hence, we may replace both bracketed expressions by the single function
ekt/m·½² + g·x·ekt/m
8. Multiplying the function by the constant m and writing it in a more compact form does not change the Euler-Lagrange equation.
Hence, both expressions in [...] can be replaced by a function
L = ekt/m·(½m·² + mg·x)
and we have the Euler-Lagrange equation
d/dt ∂L/∂ = ∂L/∂x

Surprisingly or not, the Lagrangian in this case differs from the Lagrangian for a conservative system only by a multiplier ekt/m since
½m·² is kinetic energy T of a falling stone,
−mg·x is its potential energy U and
½m·² + mg·x = T − U
and the Lagrangian for this nonconservative system is
L = ekt/m·(T−U)

Unlike the Lagrangian of a conservative system, this Lagrangian depends explicitly on time through the exponential factor ekt/m.
This explicit dependence reflects the continuous loss of mechanical energy caused by the resistive force. Therefore, although the motion can still be described by Euler-Lagrange equations, many of the elegant conservation properties of conservative systems no longer hold.