Calculus of Variations: Coupled Systems and Matrix Euler–Lagrange Equations
CV07 extended the scalar Euler–Lagrange equation to a vector-valued unknown
. This
companion article develops the computational side of that extension. The main objective is to
become comfortable moving among three equivalent descriptions of the same stationary
system:
The examples are chosen to make coupling visible. Some systems are coupled through coordinates,
some through derivatives, and some become uncoupled only after a change to modal
coordinates. The two-mass oscillator provides the central mechanical example because a
single scalar action generates the full matrix equation of motion and its normal modes
[3, 4, 5].
Figure. The matrix Euler–Lagrange workflow for a quadratic vector functional. The
matrix notation is compact, but every step represents the same componentwise variational
derivatives derived in CV07.
1 How to use this set
Attempt the exercises before reading the worked solutions. For each problem, use the following
checklist.
- Identify the vector of dependent variables
.
- Write the scalar integrand
or Lagrangian
.
- Compute
and
component by component if there is any doubt about
the matrix derivative.
- Apply
- Only after the component equations are correct, collect them into matrix form.
- Check the symmetry and dimensions of the matrices.
- For oscillator problems, test the matrix equation with
or an equivalent sinusoidal
ansatz.
- Distinguish deriving the stationary equations from proving that a stationary solution is a
minimum.
Part I: Exercises
Exercise 1: the constant-matrix Euler–Lagrange equation
Let
and consider
where
and
are constant symmetric matrices and
is a constant vector.
- Show that
- Show that
- Derive the matrix Euler–Lagrange equation.
- State the result when
.
Exercise 2: a variable matrix coefficient
Now let
with
.
- Derive the Euler–Lagrange equation in divergence form.
- Expand the total derivative explicitly.
- Explain why replacing
by
is generally incorrect.
Exercise 3: derivative coupling and an off-diagonal mass matrix
Consider two dependent variables with
- Derive the two Euler–Lagrange equations directly.
- Write them as
- Identify
.
- Find its eigenvalues and explain why
makes the derivative quadratic form positive
definite.
Exercise 4: two masses and three springs
Two masses
and
move horizontally. Mass 1 is attached to the left wall by spring
,
mass 2 is attached to the right wall by spring
, and the masses are connected by spring
.
Let
and
be displacements from equilibrium.
- Write the kinetic energy
.
- Write the potential energy
.
- Form
.
- Derive both Lagrange equations.
- Write the result as
and identify
and
.
Figure. The two-degree-of-freedom oscillator used in Exercises 4–7. The middle spring
stores energy according to the relative displacement
, which is the source of
coordinate coupling.
Exercise 5: normal modes of the symmetric two-mass system
Specialize Exercise 4 to
Seek a normal-mode solution
- Derive the generalized eigenvalue problem
- Compute the characteristic equation.
- Show that the two modal frequencies are
- Find one eigenvector for each mode.
- Explain physically why the coupling spring does not affect the symmetric-mode
frequency.
Figure. The two normal-mode shapes of the symmetric oscillator. In the in-phase mode
the coupling spring does not change length; in the out-of-phase mode it is stretched or
compressed strongly and raises the modal frequency.
Exercise 6: diagonalization with modal coordinates
For the same symmetric oscillator, define
- Invert these relations to express
in terms of
.
- Rewrite the kinetic energy in the new coordinates.
- Rewrite the potential energy.
- Show that the Lagrangian separates into two uncoupled harmonic oscillators.
- Recover
and
directly from the separated Lagrangian.
Exercise 7: harmonic forcing in matrix form
Add an applied force to the symmetric two-mass system:
Assume an undamped steady harmonic response
- Show that the response amplitude satisfies
- Solve for
and
away from resonance.
- Identify the values of
at which the undamped algebraic response becomes
singular.
- Relate those singular frequencies to Exercise 5.
Exercise 8: a coupled boundary-value problem
Consider the static variational problem
with fixed endpoint data
- Derive the coupled Euler–Lagrange equations.
- Introduce
Show that the equations decouple.
- Solve for
and
.
- Hence obtain
and
.
- Interpret what increasing
does to the two profiles.
Figure. A representative stationary solution of the coupled boundary-value problem. The
average coordinate remains linear, while the difference coordinate is suppressed in the
interior by the coupling penalty.
Part II: Complete worked solutions
Solution 1: the constant-matrix Euler–Lagrange equation
Write
Because
is symmetric, differentiating the quadratic form with respect to
gives
One way to verify this without memorizing a matrix-calculus rule is to write
Differentiating with respect to
produces
Symmetry
makes the two sums equal, giving the
-th component of
.
Similarly,
The vector Euler–Lagrange equation is
Since
is constant,
For
,
This is the matrix version of the scalar linear Euler–Lagrange equation. The matrix form is
compact, but no new variational principle was introduced; it is just the collection of all component
equations.
Solution 2: a variable matrix coefficient
Now
and
Therefore the Euler–Lagrange equation is naturally written as
This divergence form is often the safest form because it preserves the exact result of integration by
parts.
Expanding with the matrix product rule,
Thus
The term
disappears only when
is constant. This is the matrix analogue of the scalar
warning
when
.
Solution 3: derivative coupling and an off-diagonal mass matrix
The integrand is
For
,
Therefore
Likewise,
Define
Then
The eigenvalues of
are
A real symmetric matrix is positive definite exactly when all its eigenvalues are positive.
Therefore
which combine to give
Thus derivative coupling appears as an off-diagonal entry in the matrix multiplying the highest
derivative. In mechanics that matrix is often the mass matrix.
Solution 4: two masses and three springs
The kinetic energy is
The three spring energies are
Hence
For
,
and
 | = −k1q1 − ![[ ]
1 2
2kc(q2 − q1)](https://images.physicslibrary.org/cache/objects/1470/make4ht/CalculusOfVariationsCoupledSystemsAndMatrixEulerLagrangeEquations105x.png) | (48)
|
| = −k1q1 + kc(q2 − q1). | (49) |
Thus
For
,
Define
and
Then
The off-diagonal terms
encode the fact that the middle spring depends on relative
displacement. The matrix is symmetric because the spring stores a scalar potential energy and the
mixed second derivatives agree.
Solution 5: normal modes of the symmetric two-mass system
For
and
,
and
Insert
Since
the equation of motion becomes
A nonzero mode shape exists only if
Therefore
The determinant gives
Factoring,
Thus
For
, the matrix equation gives
so one mode vector is
For
,
so
The physical interpretation is especially useful. In the symmetric mode,
so the coupling spring is neither stretched nor compressed. It contributes no restoring force and
therefore does not change the frequency. In the antisymmetric mode,
so the coupling spring deforms strongly, increasing the restoring stiffness and raising the frequency
[5, 6].
Solution 6: diagonalization with modal coordinates
The coordinate transformation is
Solving for the original coordinates,
The same relations hold for the velocities. Therefore
Hence
For the wall springs,
The coupling displacement is
so
Therefore
The Lagrangian becomes
The two coordinates are now uncoupled. Their equations are
and
which immediately reproduce
This is the simplest example of modal diagonalization: a coupled coordinate system becomes two
independent oscillators after changing basis to eigenvector coordinates.
Solution 7: harmonic forcing in matrix form
The forced equation is
Assume
Then
so cancellation of the common cosine factor yields
For the symmetric system, define
Then
The determinant is
Away from
, the inverse matrix gives
The undamped response becomes singular when
which factors exactly as in Exercise 5:
Thus resonance occurs at
This is not a new variational condition. The variational principle generated the matrix differential
equation; ordinary linear-system analysis then reveals its resonant response.
Solution 8: a coupled boundary-value problem
The integrand is
For
,
Therefore
For
,
so
Introduce
Adding the two differential equations gives
hence
Subtracting them gives
so
The boundary data imply
so
For the difference,
Let
The antisymmetry of the boundary data about
suggests the centered form
Using
,
so
Finally,
which gives
and
Increasing
increases
. The functional penalizes differences between
and
more strongly, so the two stationary profiles are pulled closer to their common
mean
through most of the interior while still satisfying their opposing endpoint
values.
2 What these problems should teach
The most useful habit is to separate three layers of the calculation.
- The variational layer starts from one scalar functional and produces one
Euler–Lagrange equation for each dependent variable.
- The matrix layer packages those equations into a compact form such as
- The linear-systems layer then uses eigenvalues, modal coordinates, or matrix inversion to
analyze the resulting differential equations.
Confusing these layers can make the matrix notation look more mysterious than it is. The matrices
do not replace the variational derivation; they organize its result.
3 Common mistakes
- Differentiating a matrix quadratic form without checking symmetry. For
a general matrix
, the derivative of
involves the symmetric part
.
- Forgetting the total derivative of a variable matrix. If
, then
.
- Changing the sign of the stiffness matrix. In mechanics the Lagrangian is
, while the final equation is normally
.
- Treating off-diagonal terms as errors. Off-diagonal entries are the algebraic
signature of coupling in the chosen coordinates.
- Assuming coupled coordinates imply coupled normal modes. An eigenvector
change of basis can diagonalize many linear conservative systems.
- Setting the determinant to zero when solving a forced response. The
determinant condition belongs to the homogeneous normal-mode problem; away from
resonance the forced problem uses the matrix inverse.
- Assuming stationarity proves minimality. The Euler–Lagrange system is a
necessary stationarity condition. Second variation and sufficiency questions are
developed later in the series.
Summary
For a quadratic vector functional with constant symmetric matrices,
the vector Euler–Lagrange equations reduce to
In mechanics,
becomes time and the same structure gives
For the symmetric two-mass oscillator, the coupled coordinate equations have normal
modes
with
The modal coordinates diagonalize the same scalar action that originally produced the coupled
equations. CV07E2 next applies vector variational methods to trajectory and geometry problems,
while CV08 extends the theory to functionals involving higher derivatives.
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] Cornelius Lanczos, The Variational Principles of Mechanics, 4th ed., Dover
Publications, 1986.
[4] Herbert Goldstein, Charles Poole, and John Safko, Classical Mechanics, 3rd ed.,
Addison Wesley, 2002.
[5] Leonard Meirovitch, Elements of Vibration Analysis, 2nd ed., McGraw-Hill, 1986.
[6] S. S. Rao, Mechanical Vibrations, 5th ed., Prentice Hall, 2011.