Calculus of Variations: Endpoints, Natural Boundary Conditions, and Transversality
The fixed-endpoint Euler–Lagrange theorem in CV04 used the condition
at one decisive moment: it removed the boundary term produced by integration by parts. If an
endpoint is free, that term does not disappear. Instead, it becomes an additional necessary
condition.
That observation is the source of natural boundary conditions and transversality conditions;
standard treatments derive both from the boundary part of the first variation [1, 2, 3]. The
interior of a stationary curve is still governed by the Euler–Lagrange equation,
but the endpoint geometry determines what must happen at the boundary.
This distinction is essential in physics. A prescribed position is an essential or Dirichlet-type
condition. A free position may instead force a conjugate momentum, slope, traction, or flux to
vanish. If the endpoint is allowed to slide along a curve, the variational boundary term must vanish
for every motion tangent to that curve. In geometrical optics and shortest-path problems this
becomes an orthogonality condition. In mechanics it becomes a statement about canonical
momentum and Hamiltonian. In optimal control the same structure reappears as terminal
transversality conditions.
1 Learning objectives
After this entry, the reader should be able to
- retain and interpret the boundary term in the first variation;
- distinguish essential boundary data from natural boundary conditions;
- derive the natural condition Fy′ = 0 at a fixed-x, free-y endpoint;
- handle mixed endpoint conditions and endpoints free at one or both ends;
- derive the full endpoint variation for a moving point (x,y);
- explain the relation between the field variation η and the actual endpoint displacement;
- derive the transversality condition for an endpoint constrained to a curve y = ψ(x) or,
more generally, G(x,y) = 0;
- prove that a shortest path to a smooth target curve meets that curve orthogonally;
- include an endpoint cost Φ(xb,yb) and derive the resulting terminal conditions;
- rewrite the endpoint term as pδy − H δx;
- interpret the variational boundary conditions in classical mechanics; and
- recognize why natural boundary conditions do not replace the Euler–Lagrange equation
but supplement it.
2 The boundary term CV04 set to zero
For
CV02 gave
Integration by parts gives
For a stationary curve, the interior Euler–Lagrange equation makes the integral term vanish. What
remains is
when the independent-variable endpoints a and b themselves are fixed.
The endpoint assumptions now determine what follows.
Figure. The same integration-by-parts boundary term leads to different necessary
conditions depending on what is prescribed at the endpoint. Fixed endpoint values force
η = 0; free endpoint values leave η arbitrary and therefore force Fy′ = 0.
3 Essential and natural boundary conditions
Suppose the endpoint abscissas a and b are fixed.
3.1 Fixed endpoint value: an essential condition
If
is prescribed, then every admissible variation must satisfy
The boundary term vanishes because admissibility removes that degree of freedom.
The condition y(b) = B is therefore imposed directly on the admissible class. In the
language of boundary-value problems, this is an essential or Dirichlet-type boundary
condition.
3.2 Free endpoint value: a natural condition
Now suppose x = b is fixed but the value y(b) is not prescribed. Then η(b) is arbitrary. If the left
endpoint is fixed, η(a) = 0, and the boundary contribution reduces to
Stationarity requires this to vanish for every allowed value of η(b). Therefore
This is the classical natural boundary condition at a free terminal value.
Exactly the same argument at the left endpoint gives
when y(a) is free and a is fixed.
If both endpoint values are free while a and b remain fixed, then
4 The natural-boundary theorem
Theorem: fixed-x, free-y endpoint. Let
with F ∈ C2 on a region containing the relevant curve. Suppose y
∗ ∈ C2([a,b]) is a weak local
extremum, y(a) = A is fixed, and y(b) is free. Then y∗ satisfies
and the natural terminal condition
Proof. Choose first variations with compact support in (a,b). The Fundamental Lemma gives the
Euler–Lagrange equation in the interior exactly as in CV04. After imposing that equation, the full
first variation is
Because y(a) is fixed, η(a) = 0. Since y(b) is free, η(b) may be chosen arbitrarily. Hence
for every real value of η(b), which implies Fy′(b) = 0. □
The proof is short because all the conceptual work was already done in CV02, CV03, and
CV04. The new point is simply that endpoint freedom creates an additional admissible
variation.
5 Example: a free endpoint selects the slope
Consider
subject to
while y(1) is free.
Here
The Euler–Lagrange equation is
or
The natural boundary condition at x = 1 is
The solution of y′′ = y satisfying y(0) = A and y′(1) = 0 is
Thus a free terminal value does not mean that “nothing is specified” at the right boundary. The
variational principle itself supplies the missing condition.
6 Mixed boundary conditions
The endpoint conditions can be mixed independently.
For example,
gives
Conversely,
leads to
This is the simplest manifestation of a general principle:
A prescribed endpoint coordinate removes a variation; a free endpoint coordinate
produces a variational boundary equation.
7 Moving endpoints require a new calculation
So far the endpoint abscissas a and b have been fixed. Transversality arises when an endpoint may
move in the (x,y) plane.
Consider the terminal point
Let its actual infinitesimal displacement be
There is an important distinction between δyb and the field variation η(b). When the endpoint
moves horizontally, part of its vertical change comes simply from moving along the unperturbed
curve.
To first order,
Therefore
Figure. Geometry of a moving terminal endpoint. The total vertical displacement δyb
contains both the fixed-x field variation η(b) and the vertical change y′(b)δxb caused by
shifting the endpoint horizontally along the original curve.
8 Derivation of the moving-endpoint boundary term
For clarity, let the left endpoint remain fixed and allow only the upper endpoint to move. The
first-order change in the integral receives two boundary contributions.
First, integration by parts gives
Second, changing the upper limit contributes
Hence, after the Euler–Lagrange equation has removed the interior term,
Insert
Then
| δJb | = Fy′ + Fδxb | (37)
|
| = Fy′δyb + δxb. | (38) |
Thus the universal terminal boundary form is
If both endpoints move, the complete boundary contribution can be written compactly
as
Here the bracket means terminal contribution minus initial contribution.
9 Special cases of the moving-endpoint formula
The general boundary form immediately contains several important cases.
9.1 Fixed x, free y
Set
while δy is arbitrary. Then
which recovers the natural boundary condition.
9.2 Free x, fixed endpoint value y
If the endpoint may slide horizontally while its vertical coordinate is fixed, then
and stationarity requires
9.3 Endpoint completely free in the plane
If δx and δy are independently arbitrary, then both coefficients must vanish:
Consequently
at the endpoint as well. This strong condition is one reason fully free endpoints are often
supplemented by terminal costs or geometric constraints.
10 Endpoint constrained to a curve: transversality
Suppose the terminal endpoint must lie on a smooth target curve
An allowed endpoint displacement must be tangent to this curve, so
Substitute this relation into the terminal boundary form:
| δJb | = Fy′ψ′δxb + δxb | (49)
|
| = δxb. | (50) |
Because motion along the target curve is arbitrary,
at the terminal point.
This is a classical transversality condition.
11 Coordinate-free geometric form
A target curve can also be written implicitly as
An allowed tangent displacement satisfies
Define the boundary covector
Stationarity requires
for every tangent displacement to the target curve. Therefore b must be normal to the target
curve:
This is the geometric content of transversality. The variational boundary covector must annihilate
every allowed endpoint motion.
12 Example: shortest path to a target curve
For planar arc length,
so
Let the terminal endpoint lie on
The transversality condition is
Multiply through by
:
Therefore
If both slopes are finite,
This is exactly the condition for perpendicular tangent lines. Thus:
The shortest curve from a fixed point to a smooth target curve meets the target
curve orthogonally.
Figure. For the arc-length functional, the transversality condition says that the stationary
path reaches the target curve at right angles. The familiar Euclidean orthogonality rule is
therefore a variational boundary condition.
12.1 Straight target line
If the target is
then ψ′ = m and
Because the Euler–Lagrange equation for arc length makes the stationary path a straight line, the
entire problem reduces to the elementary geometric result: the shortest line segment to a line is the
perpendicular segment.
13 Endpoint costs
Many physics and control problems include a terminal contribution in addition to the integral.
Consider
where the terminal point may move.
The variation of the endpoint cost is
Adding this to the moving-endpoint boundary form gives
If the terminal point is completely free, the two independent terminal conditions are
and
If the terminal point is constrained to a curve, only the component along the allowed tangent
displacement must vanish.
14 Example: an endpoint spring gives a Robin condition
Consider
with y(0) fixed and y(1) free.
The integral gives
The terminal cost has
Therefore the natural terminal condition becomes
This is a Robin-type boundary condition: the boundary value and its derivative are
coupled. Physically, the terminal spring converts endpoint displacement into a boundary
force.
15 Momentum and Hamiltonian form of the boundary term
Define the momentum-like quantity
and define
Then
The moving-endpoint boundary term becomes
With an endpoint cost,
This form is not merely elegant notation. It is the direct ancestor of terminal conditions in
Hamiltonian mechanics and optimal control [4, 5, 6].
Figure. The endpoint one-form can be written in momentum-Hamiltonian variables. A
free terminal configuration tests the coefficient of δy; a free terminal independent variable
tests the coefficient of δx.
16 Mechanical interpretation
Let the independent variable be time and set
Then
is the canonical momentum and
is the Hamiltonian when the Legendre transformation is regular.
The terminal contribution to Hamilton’s principle is therefore
Several familiar terminal conditions follow immediately.
16.1 Fixed final time, free final coordinate
If
while δqf is arbitrary, then
A free terminal coordinate forces the conjugate momentum to vanish unless some terminal
interaction supplies an additional boundary contribution.
16.2 Free final time, fixed final coordinate
If the actual terminal coordinate is fixed,
while δtf is arbitrary, then
for an action with no terminal cost.
16.3 Terminal cost in mechanics
For
fully free terminal data give
and
The sign of the Hamiltonian terminal equation depends on the convention used to define the
Hamiltonian and the objective functional. With the mechanical Hamiltonian convention used above
and the additive terminal cost written here, the formula is exactly as shown.
17 Why these are called natural boundary conditions
The adjective “natural” is used because these conditions are not imposed externally as part of the
admissible class. They emerge from stationarity of the functional itself.
For a first-order scalar functional:
- prescribing y is essential data;
- leaving y free produces the natural quantity Fy′;
- allowing x to move introduces the companion quantity F − y′Fy′;
- constraining the endpoint geometrically requires the boundary covector to annihilate
allowed tangent motions.
In elasticity and field theory, the same pattern produces tractions and fluxes. In mechanics it
produces momenta. In weak formulations, natural boundary data appear automatically in the
boundary terms generated by integration by parts [2, 3].
18 Natural conditions do not replace Euler–Lagrange
A frequent conceptual mistake is to treat the boundary condition as an alternative to the
Euler–Lagrange equation. It is not.
A stationary free-endpoint problem generally requires both
and one or more endpoint conditions.
The interior equation determines the family of candidate extremals. The boundary conditions
select which member of that family is compatible with the endpoint freedom and geometry.
19 Necessary still does not mean sufficient
Everything derived in this entry is a necessary condition for a sufficiently smooth local extremum
under the stated hypotheses. A function can satisfy
and all natural or transversality conditions and still fail to minimize the functional.
Classification requires the second variation and the stronger conditions studied later in the course.
Endpoint freedom changes the admissible perturbations, so second-variation theory must also
respect the relevant boundary geometry.
20 Common misconceptions
20.1 Misconception 1: free endpoint means no boundary condition
The opposite is usually true. Freedom makes the endpoint variation arbitrary, which forces a
natural boundary equation.
20.2 Misconception 2: η(b) = δyb for a moving endpoint
Only when δxb = 0. In general,
This distinction is essential for deriving the correct transversality formula.
20.3 Misconception 3: the transversality condition is always orthogonality
Orthogonality occurs for special functionals such as Euclidean arc length. The general condition
is
for every allowed endpoint displacement.
20.4 Misconception 4: F − y′Fy′ is always the physical energy
Not in an arbitrary variational problem. It equals −H after one defines H = y′Fy′− F. In
mechanics that quantity becomes the Hamiltonian under the usual regularity assumptions.
20.5 Misconception 5: natural boundary conditions prove a minimum
They are necessary stationarity conditions, not sufficient classification criteria.
21 A compact endpoint-condition table
|
|
| Endpoint freedom | Necessary boundary statement |
|
|
| x fixed, y prescribed | η = 0; no new natural condition |
|
|
| x fixed, y free | Fy′ = 0 |
|
|
| y fixed, x free | F − y′Fy′ = 0 |
|
|
| (x,y) completely free | Fy′ = 0 and F − y′Fy′ = 0 |
|
|
| y = ψ(x) | F + (ψ′− y′)Fy′ = 0 |
|
|
| G(x,y) = 0 | (F − y′Fy′,Fy′) ∥∇G |
|
|
| free terminal point with Φ | Fy′ + Φy = 0, F − y′Fy′ + Φx = 0 |
|
|
22 Connection to the next entries
CV05 completes the endpoint layer of the basic Euler–Lagrange theory. The next main
lesson, CV06, studies special forms of the integrand that produce first integrals and
conservation-like quantities without solving the full second-order Euler–Lagrange equation
directly.
In particular, when F has no explicit dependence on x, the quantity
that appeared here as a boundary coefficient also becomes constant along an extremal. That result
is the Beltrami identity. The recurrence of the same quantity in both endpoint variation and
first-integral theory is an early sign of the deeper Hamiltonian structure developed later in the
course.
23 Summary
The first variation naturally separates into an interior term and a boundary term. Fixed endpoint
values eliminate boundary variations by admissibility; free endpoint values turn those boundary
variations into additional equations.
For fixed independent-variable endpoints,
so a free endpoint value gives the natural condition
When the endpoint itself moves in the (x,y) plane,
An endpoint constrained to a curve must satisfy the corresponding transversality condition. For
Euclidean arc length, this reduces to orthogonality between the stationary path and the target
curve.
Finally, with
the boundary form becomes
providing a direct bridge from classical calculus of variations to Hamiltonian mechanics and
terminal conditions in optimal control.
References
[1] I. M. Gelfand and S. V. Fomin, Calculus of Variations, Dover Publications, 2000.
[2] Bruce van Brunt, The Calculus of Variations, Springer, 2004.
[3] Charles Fox, An Introduction to the Calculus of Variations, Dover Publications, 1987.
[4] Herbert Goldstein, Charles Poole, and John Safko, Classical Mechanics, 3rd ed.,
Addison Wesley, 2002.
[5] L. D. Landau and E. M. Lifshitz, Mechanics, 3rd ed., Course of Theoretical Physics,
Vol. 1, Pergamon Press, 1976.
[6] Donald E. Kirk, Optimal Control Theory: An Introduction, Prentice-Hall, 1970.