4.10.12Advanced Topics (Elite Level)

Calculus of variations — functionals, functional derivative

1,692 words8 min readdifficulty · medium5 backlinks

1. WHAT is a functional?

WHY this matters: Tons of physics & geometry are "find the best curve" problems:

  • Shortest path between two points (geodesic): L=1+y2L=\sqrt{1+y'^2}.
  • Brachistochrone (fastest slide): L=1+y22gyL=\sqrt{\tfrac{1+y'^2}{2gy}}.
  • Classical mechanics: L=TVL=T-V, action S=LdtS=\int L\,dt is minimised (Hamilton's principle).

2. The functional derivative — derived from scratch

WHAT we want: the analogue of "dfdx=0\frac{df}{dx}=0" for functionals.

HOW — the variation trick. Suppose y(x)y(x) is the minimiser, with fixed endpoints y(a),y(b)y(a),y(b). Perturb it slightly: y~(x)=y(x)+εη(x),η(a)=η(b)=0.\tilde y(x)=y(x)+\varepsilon\,\eta(x),\qquad \eta(a)=\eta(b)=0. Here η\eta is any smooth "test function" vanishing at the ends (so endpoints stay fixed). Define Φ(ε)=J[y+εη].\Phi(\varepsilon)=J[y+\varepsilon\eta]. Since yy minimises JJ, the ordinary function Φ\Phi has a minimum at ε=0\varepsilon=0, so Φ(0)=0(this is the WHY of everything below).\boxed{\Phi'(0)=0}\quad\text{(this is the WHY of everything below).}

Compute Φ(0)\Phi'(0). Differentiate under the integral: Φ(ε)=ab ⁣(Lyη+Lyη)dx.\Phi'(\varepsilon)=\int_a^b\!\Big(\frac{\partial L}{\partial y}\,\eta+\frac{\partial L}{\partial y'}\,\eta'\Big)dx. Why this step? We used the chain rule on L(x,y+εη,y+εη)L(x,\,y+\varepsilon\eta,\,y'+\varepsilon\eta'); /ε\partial/\partial\varepsilon brings down η\eta for the yy-slot and η\eta' for the yy'-slot.

Set ε=0\varepsilon=0 and integrate the second term by parts to free η\eta from its derivative: abLyηdx=[Lyη]ab=0 (η(a)=η(b)=0)abddx ⁣(Ly)ηdx.\int_a^b \frac{\partial L}{\partial y'}\eta'\,dx=\underbrace{\Big[\frac{\partial L}{\partial y'}\eta\Big]_a^b}_{=0\ (\eta(a)=\eta(b)=0)}-\int_a^b\frac{d}{dx}\!\Big(\frac{\partial L}{\partial y'}\Big)\eta\,dx. Why this step? Integration by parts swaps the derivative off η\eta onto LyL_{y'}. The boundary term dies because η\eta vanishes at the endpoints — that is exactly why we required fixed endpoints.

So: Φ(0)=ab[LyddxLy]call it   δJδyη(x)dx=0η.\Phi'(0)=\int_a^b\underbrace{\Big[\frac{\partial L}{\partial y}-\frac{d}{dx}\frac{\partial L}{\partial y'}\Big]}_{\text{call it }\;\frac{\delta J}{\delta y}}\,\eta(x)\,dx=0\quad\forall\,\eta.

The Fundamental Lemma. If abf(x)η(x)dx=0\int_a^b f(x)\eta(x)\,dx=0 for every smooth η\eta vanishing at the ends, then f(x)0f(x)\equiv 0. Why true: if f>0f>0 somewhere, choose a bump η\eta concentrated there to make the integral positive — contradiction.

Figure — Calculus of variations — functionals, functional derivative

3. A useful shortcut: the Beltrami identity

If L=L(y,y)L=L(y,y') does not depend on xx explicitly, then a first integral exists: ddx(LyLy)=Lyy+LyyyLyyddxLy=y(LyddxLy)=0.\frac{d}{dx}\Big(L-y'\frac{\partial L}{\partial y'}\Big)=L_y y'+L_{y'}y''-y''L_{y'}-y'\frac{d}{dx}L_{y'}=y'\Big(L_y-\frac{d}{dx}L_{y'}\Big)=0. Why this step? Expand the total xx-derivative; the yy'' terms cancel, and the bracket is exactly the Euler–Lagrange expression =0=0. Hence:


4. Worked examples


5. Common mistakes


6. Active recall

What is a functional?
A map J[y]J[y] from an entire function y(x)y(x) to a single real number, typically abL(x,y,y)dx\int_a^b L(x,y,y')dx.
What is the functional derivative δJ/δy\delta J/\delta y?
LyddxLy\frac{\partial L}{\partial y}-\frac{d}{dx}\frac{\partial L}{\partial y'}, the continuous gradient defined by δJ=δJδyδydx\delta J=\int \frac{\delta J}{\delta y}\,\delta y\,dx.
State the Euler–Lagrange equation.
Lyddx(Ly)=0\frac{\partial L}{\partial y}-\frac{d}{dx}\big(\frac{\partial L}{\partial y'}\big)=0.
Why does integration by parts produce the ddxLy-\frac{d}{dx}L_{y'} term?
To move the derivative off the test function η\eta' onto LyL_{y'}, so a single common factor η\eta can be extracted.
Why can we conclude the bracket is zero?
Fundamental Lemma of CoV: if fη=0\int f\eta=0 for all smooth η\eta vanishing at ends, then f0f\equiv0.
When does the Beltrami identity apply, and what is it?
When LL has no explicit xx; then LyLy=constL-y'L_{y'}=\text{const}.
What replaces "set derivative to zero" in CoV?
Set the first variation to zero: δJ=0\delta J=0, equivalently δJ/δy=0\delta J/\delta y=0.
What are natural boundary conditions?
With free endpoints, the surviving boundary term forces L/y=0\partial L/\partial y'=0 at those ends.
E–L for L=1+y2L=\sqrt{1+y'^2} gives?
y=mx+by=mx+b (straight line, shortest path).
Recall Feynman: explain it to a 12-year-old

Normal "find the lowest point" problems give you a number, like the bottom of a valley. Here the unknown is a whole shape of a wire, and you want the shape that makes some total cost (length, time, energy) as small as possible. To check you've got the best wire, wiggle it a tiny bit anywhere along its length and see if the cost goes up. If every tiny wiggle makes it worse, you've found the best shape. The "Euler–Lagrange equation" is just the bookkeeping that says "no wiggle anywhere helps."


Connections

  • Lagrangian mechanics — action S=LdtS=\int L\,dt, E–L gives Newton's laws.
  • Geodesics and differential geometry — shortest paths via variational problems.
  • Functional analysis — Gâteaux/Fréchet derivatives generalise δJ/δy\delta J/\delta y.
  • Constrained optimization & Lagrange multipliers — isoperimetric problems use multipliers on functionals.
  • Ordinary differential equations — E–L is the ODE you actually solve.
  • Brachistochrone problem — historic origin (Bernoulli, 1696).

Concept Map

analogue for functions

defined via integral of

minimised by

fixed endpoints eta zero

defines

minimum gives

expand first variation

frees eta

yields

forces bracket to vanish

set to zero

models

Function f x

Functional J y

Lagrangian L

Perturb y plus eps eta

Phi eps equals J of perturbed

Phi prime 0 equals 0

Integration by parts

Boundary term dies

Fundamental Lemma

Functional derivative

Euler-Lagrange equation

Geodesics, Brachistochrone, Action

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, normal calculus mein hum ek number xx dhoondte hain jo function f(x)f(x) ko minimum kare — jaise valley ka sabse neeche wala point. Calculus of variations mein game thoda upar level ka hai: yahan unknown ek poora function y(x)y(x) hai, aur hum ek functional J[y]=L(x,y,y)dxJ[y]=\int L(x,y,y')dx ko minimise karte hain. Functional ka matlab — ek aisa machine jisme tum poori curve daalte ho aur woh ek single number nikaalta hai (jaise length, time, ya energy).

Best curve check karne ka trick simple hai: curve ko thoda sa hilaao, yy+εηy\to y+\varepsilon\eta, jahan η\eta endpoints par zero hai (kyunki endpoints fixed hain). Agar yy sach mein minimum hai, to is choti si hilane se cost badhni chahiye — yaani Φ(ε)=J[y+εη]\Phi(\varepsilon)=J[y+\varepsilon\eta] ka ε=0\varepsilon=0 par derivative zero hona chahiye. Yahi δJ=0\delta J=0 hai.

Jab tum yeh condition expand karte ho aur integration by parts lagaate ho, to boundary term mar jaata hai (η\eta ends par zero hai), aur bachta hai woh famous formula: LyddxLy=0\frac{\partial L}{\partial y}-\frac{d}{dx}\frac{\partial L}{\partial y'}=0Euler–Lagrange equation. Yeh hi functional world ka "gradient = 0" hai. Sabse common galti: log sirf L/y=0\partial L/\partial y=0 likh dete hain aur ddxLy\frac{d}{dx}L_{y'} wala term bhool jaate hain — woh term hi to asli physics hai!

Importance? Pura classical mechanics (S=(TV)dtS=\int(T-V)dt minimise hota hai), shortest path/geodesics, brachistochrone, optics ka Fermat principle — sab isi ek idea se nikalte hain. Ek baar yeh samajh gaye, to physics ke half equations "automatically" derive ho jaati hain.

Go deeper — visual, from zero

Test yourself — Advanced Topics (Elite Level)

Connections