Chapter 6 · Calculus of Variations

6.2 Sufficient Conditions and Variational Methods

When is an extremal really a minimum? The second variation, Legendre's and Jacobi's conditions and conjugate points, weak versus strong minima and the Weierstrass excess function; then the variational view of boundary value problems — energy minimisation, the Rayleigh–Ritz and Galerkin methods, and the Dirichlet principle for Poisson's equation.

The Euler–Lagrange equation of §6.1 is only a necessary condition: it finds the curves at which the first variation vanishes, just as $f'(x)=0$ finds the critical points of a function. In one variable we then look at $f''$. The same idea works for functionals, but with a twist that has no finite-dimensional analogue: the second variation can be positive in every "short" direction and still negative in a long one. Legendre (1786) found the pointwise condition $F_{y'y'}\ge0$; Jacobi (1837) discovered that one must also watch for conjugate points, where neighbouring extremals from the starting point cross the extremal again — the reason a great circle on a sphere stops being the shortest path once it passes the antipodal point. Weierstrass (1879) added a condition that distinguishes minima among nearby curves from minima among nearby curves with nearby slopes.

The second half of the section turns the logic around. Instead of solving a differential equation to minimise a functional, we minimise a functional to solve a differential equation. The boundary value problem $-(pu')'+qu=f$ is equivalent to minimising an energy; approximating the minimiser in a finite-dimensional space gives the Rayleigh–Ritz method (Ritz, 1908), its generalisation by Galerkin (1915), and ultimately the finite element method used in every engineering design office. The same idea for Laplace's and Poisson's equations is the Dirichlet principle, whose rescue by Hilbert around 1900 shaped modern analysis. CSIR NET asks for conjugate points, Legendre's condition and Ritz coefficients in Part B, and for the logical relations between the conditions (necessary, sufficient, weak, strong) in Part C. We build on the Rayleigh quotient of §2.3 and use the notation of §6.1.

The Second Variation and Legendre's Condition

Throughout, $J[y]=\int_a^bF(x,y,y')\,dx$ on the fixed end-point class $\mathcal{A}$ of §6.1, $F\in C^3$, and $y\in C^2[a,b]$ is an extremal in $\mathcal{A}$. Variations $\eta\in C^1[a,b]$ vanish at $a$ and $b$; the norms $\|\cdot\|_0$, $\|\cdot\|_1$ and weak/strong extrema are as in Definition 6.2.

📘 Definition 6.6 — Second variation
The second variation of $J$ at $y$ in the direction $\eta$ is $$\delta^2J[y;\eta]=\frac{d^2}{d\varepsilon^2}J[y+\varepsilon\eta]\Big|_{\varepsilon=0}=\int_a^b\Big(F_{yy}\eta^2+2F_{yy'}\eta\eta'+F_{y'y'}\eta'^2\Big)dx,$$ the second partial derivatives being evaluated along $(x,y(x),y'(x))$. It is a quadratic form in $\eta$. We write $$P(x)=F_{y'y'},\qquad Q(x)=F_{yy}-\frac{d}{dx}F_{yy'}\qquad\text{(along }y).$$
📐 Theorem 6.12 — Second variation: Taylor expansion, sign, reduced form
  1. $$J[y+\eta]=J[y]+\delta J[y;\eta]+\tfrac12\delta^2J[y;\eta]+R[\eta]$$, where $|R[\eta]|\le\rho\big(\|\eta\|_1\big)\int_a^b(\eta^2+\eta'^2)\,dx$ for a function $\rho(r)\to0$ as $r\to0$.
  2. If $y$ is a weak local minimum, then $\delta^2J[y;\eta]\ge0$ for every variation $\eta$.
  3. For every variation, $\delta^2J[y;\eta]=\displaystyle\int_a^b\big(P\eta'^2+Q\eta^2\big)\,dx$.

Proof. (1) Taylor's formula with integral remainder for $F$ in the variables $(y,p)$ gives $$F(x,y+\eta,y'+\eta')=F+F_y\eta+F_{y'}\eta'+\tfrac12\Phi+r(x),$$ $$\Phi=F_{yy}\eta^2+2F_{yy'}\eta\eta'+F_{y'y'}\eta'^2,$$ where $r$ is the same quadratic expression with the second derivatives replaced by their differences between an intermediate point and $(x,y,y')$. The second derivatives of $F$ are uniformly continuous on a compact neighbourhood of the graph, so these differences are at most $\rho(\|\eta\|_1)\to0$, and $2|\eta\eta'|\le\eta^2+\eta'^2$. Integrate. (2) $\varphi(\varepsilon)=J[y+\varepsilon\eta]$ is $C^2$ with a local minimum at $0$, so $\varphi''(0)\ge0$. (3) Since $\eta^2$ vanishes at both ends, $\int2F_{yy'}\eta\eta'=\int F_{yy'}(\eta^2)'=-\int\big(\tfrac{d}{dx}F_{yy'}\big)\eta^2$. ∎

The reduced form shows the competition between $P\eta'^2$ and $Q\eta^2$. A variation can have small values and large slopes — a short, steep bump — and then $P\eta'^2$ dominates. This observation gives Legendre's condition.

📐 Theorem 6.13 — Legendre's necessary condition
If the extremal $y$ is a weak local minimum of $J$, then $P(x)=F_{y'y'}\big(x,y(x),y'(x)\big)\ge0$ for every $x\in[a,b]$. (For a maximum, $P\le0$.)

Proof. Suppose $P(x_0)\lt0$. By continuity there are $m\gt0$ and an interval $I_0$ of positive length with end point $x_0$, contained in $[a,b]$, on which $P\le-m$; say $I_0=[x_0,x_0+h_0]$ (otherwise reflect). For $0\lt h\le h_0$ let $$\eta_h(x)=\sin^2\frac{\pi(x-x_0)}{h}\ \ \text{on }[x_0,x_0+h],\qquad\eta_h=0\ \text{elsewhere}.$$ It is $C^1$, $0\le\eta_h\le1$, $|\eta_h'|\le\pi/h$ and $\int\eta_h'^2\,dx=\frac{\pi^2}{2h}$. With $M_1=\max|F_{yy}|$ and $M_2=\max|F_{yy'}|$ along $y$, using the form of Definition 6.6, $$\delta^2J[y;\eta_h]\le M_1h+2M_2\cdot\frac{\pi}{h}\cdot h-\frac{m\pi^2}{2h}=M_1h+2\pi M_2-\frac{m\pi^2}{2h},$$ which is negative for small $h$. This contradicts Theorem 6.12(2). ∎

Legendre's condition alone is far from sufficient (Example 2 below). One case where everything is easy is convexity.

📐 Theorem 6.14 — Convex integrands: extremals are global minima
Suppose that for every $x\in[a,b]$ the function $(y,p)\mapsto F(x,y,p)$ is convex on $\mathbb{R}^2$ (equivalently, for $F\in C^2$: $F_{pp}\ge0$, $F_{yy}\ge0$ and $F_{yy}F_{pp}-F_{yp}^2\ge0$). Then every extremal $y_0\in\mathcal{A}$ is a global minimum of $J$ on $\mathcal{A}$. If the convexity is strict, $y_0$ is the unique minimiser.

Proof. A $C^1$ convex function lies above its tangent plane: $$F(x,y_0+\eta,y_0'+\eta')\ge F(x,y_0,y_0')+F_y\eta+F_{y'}\eta'$$. Integrating, $J[y_0+\eta]\ge J[y_0]+\delta J[y_0;\eta]=J[y_0]$, since the first variation vanishes at an extremal (integrate by parts, using Theorem 6.4). If the convexity is strict, equality forces $(\eta,\eta')=(0,0)$ at every point. ∎

✏️ Example 1 — Legendre's test and convexity
(a) Show that $J[y]=\int_0^1(y'^2+y^2-2xy)\,dx$ with $y(0)=0$, $y(1)=2$ has a unique global minimiser and find it. (b) Show that the extremal $y=x$ of $J[y]=\int_0^1(y'^2-y'^4)\,dx$, $y(0)=0$, $y(1)=1$, is not a weak minimum. (c) Check Legendre's condition for the brachistochrone and the catenoid.
(a) Convexity $F=p^2+y^2-2xy$ has Hessian $\begin{pmatrix}2&0\\0&2\end{pmatrix}$ in $(y,p)$: strictly convex. By Theorem 6.14 the extremal is the unique global minimiser. Euler–Lagrange: $2y-2x-2y''=0$, i.e. $y''-y=-x$, so $y=x+A\cosh x+B\sinh x$; $A=0$ and $1+B\sinh1=2$: $$y=x+\frac{\sinh x}{\sinh1}.$$
(b) Legendre fails $F=p^2-p^4$ depends on $p$ only and $F''(1)=2-12=-10\ne0$, so the extremals are lines and $y=x$ is the extremal. Along it $P=F_{y'y'}=2-12y'^2=-10\lt0$: by Theorem 6.13 it is not a weak minimum. (It satisfies Legendre's condition for a maximum, and Exercise I.3 shows it is in fact a maximum.)
(c) Brachistochrone: $F=\sqrt{1+p^2}/\sqrt y$, $F_{pp}=\dfrac{1}{\sqrt y\,(1+p^2)^{3/2}}\gt0$. Catenoid: $F=y\sqrt{1+p^2}$, $F_{pp}=\dfrac{y}{(1+p^2)^{3/2}}\gt0$ for $y\gt0$. Both satisfy the strengthened Legendre condition — so Legendre cannot explain why the deep catenary of §6.1 is not a minimum. Jacobi can.

Jacobi's Condition and Conjugate Points

By Theorem 6.12(3), the extremal $y$ can be a weak minimum only if the quadratic functional $\eta\mapsto\int(P\eta'^2+Q\eta^2)$ is nonnegative on variations. Its own Euler–Lagrange equation decides this.

📘 Definition 6.7 — Jacobi equation; conjugate point
Assume $P\gt0$ on $[a,b]$. The Jacobi (accessory) equation of $J$ along $y$ is the Euler–Lagrange equation of the second variation, $$-\big(P\,u'\big)'+Q\,u=0.$$ Let $u_a$ be its solution with $u_a(a)=0$, $u_a'(a)=1$. A point $a^*\gt a$ with $u_a(a^*)=0$ is called conjugate to $a$. (By Sturm's theory of §2.1, the zeros of $u_a$ are isolated, so there is a first conjugate point if there is any.)
📐 Theorem 6.15 — Jacobi fields come from families of extremals
If $y(x,c)$ is a $C^2$ one-parameter family of extremals with $y(x,c_0)=y(x)$, then $u=\partial y/\partial c\,\big|_{c=c_0}$ solves the Jacobi equation along $y$. In particular, if $y(x,c)$ is the pencil of extremals through the point $(a,y(a))$ parametrised by the slope $c=y'(a,c)$, then $u=u_a$, and the conjugate points are where infinitely near extremals of the pencil cross $y$ again (the pencil has an envelope touching $y$, or refocuses on it).

Proof. Differentiate the identity $$F_y\big(x,y(x,c),y_x(x,c)\big)-\frac{d}{dx}F_{y'}\big(x,y(x,c),y_x(x,c)\big)=0$$ with respect to $c$ at $c_0$: $$F_{yy}u+F_{yy'}u'-\frac{d}{dx}\big(F_{yy'}u+F_{y'y'}u'\big)=0.$$ Since $F_{yy'}u'-\frac{d}{dx}(F_{yy'}u)=-\big(\frac{d}{dx}F_{yy'}\big)u$, this is $Qu-(Pu')'=0$. For the pencil, $y(a,c)=y(a)$ for all $c$ and $y_x(a,c)=c$, so $u(a)=0$ and $u'(a)=1$. ∎

📐 Theorem 6.16 — Jacobi's necessary condition
If the extremal $y$ is a weak local minimum and $P\gt0$ on $[a,b]$, then there is no point conjugate to $a$ in the open interval $(a,b)$.

Proof (sketch). Suppose $a^*\in(a,b)$ is conjugate to $a$, and let $\eta=u_a$ on $[a,a^*]$, $\eta=0$ on $[a^*,b]$. Integrating by parts and using the Jacobi equation, $\delta^2J[y;\eta]=\big[Pu_au_a'\big]_a^{a^*}=0$. Since $\delta^2J\ge0$ for all variations (Theorem 6.12), $\eta$ minimises the quadratic functional $\delta^2J$; it is piecewise $C^1$ and $\delta^2J$ is approximated by $C^1$ variations, so the Weierstrass–Erdmann corner condition (Theorem 6.18 below, applied to $\delta^2J$) requires $P\eta'$ to be continuous at $a^*$. But $P(a^*)u_a'(a^*)\ne0$ (a nontrivial solution cannot have a double zero), while $\eta'=0$ to the right of $a^*$ — a contradiction. ∎

The decisive point is that the strengthened conditions are sufficient.

📐 Theorem 6.17 — Sufficient conditions for a weak minimum (Legendre–Jacobi)
Let $y\in C^2[a,b]$ be an extremal of $J$ in $\mathcal{A}$, $F\in C^3$, and suppose
  • (L⁺) $P(x)=F_{y'y'}\big(x,y,y'\big)\gt0$ for all $x\in[a,b]$ (strengthened Legendre condition);
  • (J⁺) there is no point conjugate to $a$ in the half-open interval $(a,b]$ (strengthened Jacobi condition).
Then $y$ is a strict weak local minimum of $J$. (For a maximum, replace $P\gt0$ by $P\lt0$.)

Proof. Step 1: a positive solution. The solution $u_a$ is positive on $(a,b]$. By continuous dependence of solutions of linear ODEs on initial data and parameters (§1.1), for small $\alpha\gt0$ and $\delta\gt0$ the solution $v$ of $-\big((P-\alpha)v'\big)'+Qv=0$ with $v(a)=\delta$, $v'(a)=1$ is still positive on $[a,b]$: near $a$ because $v(a)\gt0$ and $v'\approx1$, and on the rest of $[a,b]$ because $v$ is uniformly close to $u_a$, which has a positive minimum there. Choose $\alpha$ also so small that $\tilde P=P-\alpha\gt0$.

Step 2: Picone's identity. For a variation $\eta$, a direct differentiation using $(\tilde Pv')'=Qv$ gives $$\frac{d}{dx}\Big(\frac{\tilde Pv'}{v}\eta^2\Big)=Q\eta^2+\frac{2\tilde Pv'\eta\eta'}{v}-\frac{\tilde Pv'^2\eta^2}{v^2},$$ hence $$\tilde P\eta'^2+Q\eta^2=\tilde P\Big(\eta'-\frac{v'}{v}\eta\Big)^2+\frac{d}{dx}\Big(\frac{\tilde Pv'}{v}\eta^2\Big).$$ Integrating, the boundary term vanishes and $\int(\tilde P\eta'^2+Q\eta^2)\ge0$, that is $$\delta^2J[y;\eta]\ \ge\ \alpha\int_a^b\eta'^2\,dx.$$

Step 3: from the second variation to $J$. Since $\eta(x)=\int_a^x\eta'$, the Cauchy–Schwarz inequality gives $\int_a^b\eta^2\le(b-a)^2\int_a^b\eta'^2$. By Theorem 6.12(1), with $\delta J=0$, $$J[y+\eta]-J[y]\ge\Big(\frac\alpha2-\rho(\|\eta\|_1)\big(1+(b-a)^2\big)\Big)\int_a^b\eta'^2\,dx,$$ which is positive whenever $\|\eta\|_1$ is so small that the bracket is positive and $\eta\not\equiv0$. ∎

✏️ Example 2 — Conjugate points decide
Let $J[y]=\int_0^b\big(y'^2+2yy'-16y^2\big)\,dx$ with $y(0)=0$, $y(b)=0$. Find the point conjugate to $0$, and decide for which $b\gt0$ the extremal $y\equiv0$ is a minimum.
Coefficients $F_{y'y'}=2$, $F_{yy'}=2$, $F_{yy}=-32$, so $P=2\gt0$ and $Q=-32-\frac{d}{dx}(2)=-32$. Jacobi: $-2u''-32u=0$, $u''+16u=0$, $u_0=\tfrac14\sin4x$. The first conjugate point is $a^*=\pi/4$.
$b\lt\pi/4$ (L⁺) and (J⁺) hold, so $y\equiv0$ is a strict weak minimum (Theorem 6.17). Since $J$ is quadratic, more is true: $J[\eta]=\tfrac12\delta^2J[\eta]=\int_0^b(\eta'^2-16\eta^2)$ (the term $2\eta\eta'=(\eta^2)'$ integrates to $0$), and by the Rayleigh-quotient bound $\int\eta'^2\ge(\pi/b)^2\int\eta^2$ of §2.3, $J[\eta]\ge\big((\pi/b)^2-16\big)\int\eta^2\gt0$: a strict global minimum.
$b\gt\pi/4$ The conjugate point lies in $(0,b)$: not a minimum (Theorem 6.16). Explicitly, $\eta=\sin(\pi x/b)$ gives $J[t\eta]=t^2\cdot\tfrac b2\big((\pi/b)^2-16\big)\lt0$, and $t\to\infty$ shows $\inf J=-\infty$.
$b=\pi/4$ $J\ge0$ still, but $J[c\sin4x]=0$: $y\equiv0$ is a minimum, not strict. (J⁺) fails, and the sufficient condition is silent — it is not necessary.
Geometry All extremals through the origin are $y=c\sin4x$; they refocus at $(\pi/4,0)$, exactly as Theorem 6.15 predicts. Interactive 1 shows the same picture for $y'^2-y^2$ and $y'^2-4y^2$.
Interactive 1 — Conjugate Points: When an Extremal Stops Being a Minimum

Left: the extremals of $J=\int_0^b F\,dx$ through the origin (grey), the Jacobi field $u_0$ with its zeros (the conjugate points), the end point $x=b$, and a trial variation $\eta$ on $[0,b]$. Right: $J[\varepsilon\eta]$ as a function of $\varepsilon$ for the extremal $y\equiv0$. Move $b$ past the first conjugate point and the parabola turns over: $y\equiv0$ is no longer a minimum. With $F=y'^2+y^2$ there is no conjugate point at all.

2.50
end point b—
first conjugate point—
∫(η′² ∓ ω²η²) dx—
y ≡ 0 is—

Weak and Strong Extrema: the Weierstrass Excess Function

Theorem 6.17 compares $y$ only with curves whose slopes are also close to $y'$. A strong neighbourhood also contains curves with small, steep zigzags, and these can lower $J$ even when every smooth nearby curve raises it. Weierstrass measured the effect of replacing the slope $p=y'$ by an arbitrary slope $q$ on a short stretch.

📘 Definition 6.8 — Weierstrass excess function
$$E(x,y,p,q)=F(x,y,q)-F(x,y,p)-(q-p)\,F_{y'}(x,y,p).$$ It is the amount by which $F(x,y,\cdot)$ at slope $q$ exceeds its tangent line at slope $p$. By Taylor's theorem, $E=\tfrac12(q-p)^2F_{y'y'}(x,y,\xi)$ for some $\xi$ between $p$ and $q$; so $E\ge0$ for all $p,q$ whenever $F$ is convex in $y'$.
📐 Theorem 6.18 — Weierstrass's condition; corner conditions
  1. (Necessary.) If the extremal $y$ is a strong local minimum, then $E\big(x,y(x),y'(x),q\big)\ge0$ for all $x\in[a,b]$ and all $q\in\mathbb{R}$.
  2. (Sufficient, statement.) If $y$ satisfies (L⁺) and (J⁺) — so that it can be embedded in a field of extremals with slope function $\psi(x,Y)$ covering a neighbourhood of its graph — and $E\big(x,Y,\psi(x,Y),q\big)\ge0$ for all $(x,Y)$ in that neighbourhood and all $q$, then $y$ is a strong local minimum. In particular this holds if $F_{y'y'}(x,Y,q)\ge0$ for all $(x,Y)$ near the graph and all $q$.
  3. (Weierstrass–Erdmann corner conditions.) If a piecewise $C^1$ curve minimises $J$ among piecewise $C^1$ curves, then at every corner both $F_{y'}$ and $F-y'F_{y'}$ are continuous.

Proof (ideas). (1) Fix $x_0$ and $q$. For small $h\gt0$ replace $y$ on $[x_0,x_0+h]$ by a segment of slope $q$ starting at $(x_0,y(x_0))$ followed by a segment rejoining $y$ at $x_0+\sqrt h$ (a "needle"). The new curve is within $O(h)$ of $y$ in $\|\cdot\|_0$, though its slope differs by $q-y'$. A direct expansion gives $$J[\text{new}]-J[y]=h\,E\big(x_0,y(x_0),y'(x_0),q\big)+o(h)$$, which must be $\ge0$. (2) In a field, Hilbert's invariant integral yields the Weierstrass formula $J[Y]-J[y]=\int_a^bE\big(x,Y,\psi(x,Y),Y'\big)\,dx$ for every curve $Y$ in the neighbourhood with the same end points. (3) The integrated Euler–Lagrange equation of Theorem 6.4(1) holds for piecewise $C^1$ minimisers, and its right-hand side is continuous; the second condition comes from moving the corner horizontally. ∎

✏️ Example 3 — A weak minimum that is not a strong minimum
Let $J[y]=\int_0^1y'^3\,dx$ with $y(0)=0$, $y(1)=1$. Show that $y=x$ is a strict weak minimum but not a strong minimum; in fact $\inf J=-\infty$ over curves uniformly close to $y=x$.
Weak minimum $F=p^3$: the Euler–Lagrange equation $\frac{d}{dx}(3y'^2)=0$ gives lines, so $y=x$. Along it $P=6y'=6\gt0$ and $Q=0$; Jacobi: $(6u')'=0$, $u_0=x$, which has no zero in $(0,1]$. By Theorem 6.17, $y=x$ is a strict weak minimum, with $J=1$.
Weierstrass fails $E(x,y,1,q)=q^3-1-3(q-1)$, that is $(q-1)^2(q+2)$, which is negative for $q\lt-2$. By Theorem 6.18(1), $y=x$ is not a strong minimum.
Explicit competitors For $n\ge2$ let $y_n$ have slope $-n^2$ on $[0,n^{-3}]$ and then go straight to $(1,1)$, with slope $m_n=\dfrac{1+1/n}{1-n^{-3}}$. Then $\|y_n-x\|_0=\tfrac1n+\tfrac1{n^3}\to0$, while $$J[y_n]=-n^6\cdot n^{-3}+m_n^3\,(1-n^{-3})=-n^3+O(1)\to-\infty.$$ (Rounding the corner changes $J$ by an arbitrarily small amount, so smooth competitors do the same.)
Moral Weak and strong minima are genuinely different. Legendre and Jacobi control slopes near $y'$; only Weierstrass's condition (or convexity of $F$ in $y'$) controls arbitrary slopes.
Necessary for a weak minEuler–Lagrange; Legendre $P\ge0$; Jacobi: no conjugate point in $(a,b)$ (when $P\gt0$).
Sufficient for a weak minEuler–Lagrange + (L⁺) $P\gt0$ + (J⁺) no conjugate point in $(a,b]$.
Necessary for a strong minAll of the above + Weierstrass $E(x,y,y',q)\ge0$ for all $q$.
Global min$F$ jointly convex in $(y,y')$: every extremal is a global minimum (Theorem 6.14).

Variational Formulation of Boundary Value Problems

We now reverse the direction of §6.1. Consider the self-adjoint boundary value problem $$-\big(p(x)u'\big)'+q(x)u=f(x),\qquad u(a)=u(b)=0,$$ with $p\in C^1[a,b]$, $p\gt0$, $q,f\in C[a,b]$, $q\ge0$. (In the notation $(py')'+qy+\lambda ry=0$ of §2.3 the coefficient $q$ there is $-q$ here; $q\ge0$ here corresponds to $q\le0$ there.) Physically $u$ is the deflection of a string or the temperature in a rod; $p$ is the tension or conductivity, $q$ an elastic foundation or heat loss, $f$ the load or heat source. Let $\mathcal{A}_0$ be the set of continuous, piecewise $C^1$ functions on $[a,b]$ vanishing at $a$ and $b$, and define the energy functional and the energy inner product $$I[v]=\int_a^b\big(pv'^2+qv^2-2fv\big)\,dx,$$ $$a(u,v)=\int_a^b\big(pu'v'+quv\big)\,dx,\qquad\|v\|_E^2=a(v,v).$$

📐 Theorem 6.19 — Energy principle for $-(pu')'+qu=f$
  1. If $u\in C^2[a,b]\cap\mathcal{A}_0$ solves the boundary value problem, then for every $\eta\in\mathcal{A}_0$ $$I[u+\eta]=I[u]+\int_a^b\big(p\eta'^2+q\eta^2\big)\,dx,$$ so $u$ is the unique minimiser of $I$ on $\mathcal{A}_0$, and $I[u]=-\int_a^bfu\,dx$.
  2. Conversely, if $u\in C^2[a,b]\cap\mathcal{A}_0$ minimises $I$ on $\mathcal{A}_0$, then $u$ solves the boundary value problem.
  3. The boundary value problem has exactly one solution, and it satisfies the weak form $a(u,v)=\int_a^bfv\,dx$ for all $v\in\mathcal{A}_0$.

Proof. (1) Expanding the squares, $$I[u+\eta]-I[u]=2\int_a^b\big(pu'\eta'+qu\eta-f\eta\big)\,dx+\int_a^b\big(p\eta'^2+q\eta^2\big)\,dx.$$ Integrating $pu'\eta'$ by parts on each interval where $\eta$ is $C^1$ (the boundary contributions telescope because $\eta$ and $pu'$ are continuous, and vanish at $a,b$), the first integral becomes $2\int_a^b\big(-(pu')'+qu-f\big)\eta\,dx=0$. The second is $\ge0$, and it is $0$ only if $\eta'\equiv0$ (since $p\gt0$), i.e. $\eta\equiv0$. Finally $I[u]=a(u,u)-2\int fu$ and $a(u,u)=\int fu$ (multiply the equation by $u$ and integrate by parts). (2) The Euler–Lagrange equation of $pv'^2+qv^2-2fv$ is $2qu-2f-(2pu')'=0$ (Theorem 6.4). (3) If $u_0$ solves the homogeneous problem, multiplying by $u_0$ and integrating by parts gives $\int(pu_0'^2+qu_0^2)=0$, so $u_0'\equiv0$ and $u_0\equiv0$. By the solvability theorem for two-point problems (§2.3; equivalently, the Green's function of §2.4 exists), the problem has exactly one solution. The weak form is the computation in (1) with $\eta=v$. ∎

Natural boundary conditions appear exactly as in Theorem 6.9: minimising $I$ over functions with only $v(a)=0$ prescribed produces $p(b)u'(b)=0$; adding $\sigma v(b)^2$ ($\sigma\ge0$) to $I$ produces the Robin condition $p(b)u'(b)+\sigma u(b)=0$. Similarly, by §2.3 and Theorem 6.11, the eigenvalues of $-(pu')'+qu=\lambda ru$ with Dirichlet conditions are the stationary values of the Rayleigh quotient $R[v]=a(v,v)\big/\int rv^2$, the smallest being $\lambda_1=\min R$.

📘 Definition 6.9 — Ritz and Galerkin approximations

Let $\varphi_1,\dots,\varphi_n\in\mathcal{A}_0$ be linearly independent and $V_n=\operatorname{span}\{\varphi_1,\dots,\varphi_n\}$ (the trial space; its functions must satisfy the essential boundary conditions). The Ritz approximation $u_n$ is the minimiser of $I$ on $V_n$. Writing $u_n=\sum_jc_j\varphi_j$, it is given by the linear system $$Kc=F,\qquad K_{ij}=a(\varphi_i,\varphi_j),\qquad F_i=\int_a^bf\varphi_i\,dx.$$ For a general (not necessarily symmetric) linear problem $Lu=f$, the Galerkin approximation is the $u_n\in V_n$ whose residual is orthogonal to the trial space: $\int_a^b\big(Lu_n-f\big)\varphi_i\,dx=0$, $i=1,\dots,n$ (after an integration by parts, $a(u_n,\varphi_i)=\int f\varphi_i$). For the symmetric problem above Galerkin and Ritz coincide.

📐 Theorem 6.20 — Properties of the Ritz approximation
Under the hypotheses of Theorem 6.19, let $u$ be the solution and $u_n$ the Ritz approximation from $V_n$.
  1. $K$ is symmetric and positive definite, so $u_n$ exists and is unique.
  2. Galerkin orthogonality: $a(u-u_n,v)=0$ for all $v\in V_n$.
  3. Energy identity: $I[v]=I[u]+\|v-u\|_E^2$ for every $v\in\mathcal{A}_0$. Hence $u_n$ is the best approximation of $u$ from $V_n$ in the energy norm, $I[u_n]\ge I[u]$, and for nested spaces $V_1\subset V_2\subset\cdots$ the energies $I[u_n]$ decrease.
  4. Convergence: if every $w\in\mathcal{A}_0$ can be approximated in the energy norm by elements of $\bigcup_nV_n$ (for example $V_n=\operatorname{span}\{\sin\frac{k\pi(x-a)}{b-a}:k\le n\}$), then $\|u-u_n\|_E\to0$ and $\max|u-u_n|\to0$.

Proof. (1) $K_{ij}=K_{ji}$, and for $c\ne0$, $c^{\mathsf T}Kc=a(v,v)=\int(pv'^2+qv^2)\gt0$ with $v=\sum c_i\varphi_i\ne0$ (as in Theorem 6.19, $a(v,v)=0$ forces $v\equiv0$). On $V_n$, $I\big[\sum c_j\varphi_j\big]=c^{\mathsf T}Kc-2c^{\mathsf T}F$, a strictly convex quadratic whose unique critical point solves $Kc=F$. (2) $Kc=F$ says $a(u_n,\varphi_i)=\int f\varphi_i$, and the weak form says $a(u,\varphi_i)=\int f\varphi_i$. (3) Using $\int fv=a(u,v)$: $$I[v]=a(v,v)-2a(u,v)=a(v-u,v-u)-a(u,u)$$, and $I[u]=-a(u,u)$. Minimising $I$ over $V_n$ is therefore minimising $\|v-u\|_E$. Larger spaces give smaller minima. (4) By (3), $\|u-u_n\|_E\le\|u-v\|_E$ for every $v\in V_n$, which tends to $0$ by hypothesis. For $w\in\mathcal{A}_0$, $$|w(x)|=\Big|\int_a^xw'\Big|\le\sqrt{b-a}\,\Big(\int_a^b w'^2\Big)^{1/2},$$ which is at most $\sqrt{(b-a)/\min p}\ \|w\|_E$, so energy convergence implies uniform convergence. Density of the sine system in the energy norm follows from Fourier series of $w'$ (§4.2). ∎

📐 Theorem 6.21 — Rayleigh–Ritz bounds for eigenvalues
Let $\lambda_1\lt\lambda_2\lt\cdots$ be the eigenvalues of $-(pu')'+qu=\lambda ru$, $u(a)=u(b)=0$ ($p\gt0$, $r\gt0$; $q$ continuous). With $K$ as above and $M_{ij}=\int_a^br\varphi_i\varphi_j$, let $\Lambda_1^{(n)}\le\dots\le\Lambda_n^{(n)}$ be the roots of $\det(K-\Lambda M)=0$. Then $$\lambda_k\le\Lambda_k^{(n)}\qquad(k=1,\dots,n),$$ and for nested trial spaces each $\Lambda_k^{(n)}$ decreases as $n$ grows. In particular every trial function gives an upper bound $\lambda_1\le R[v]$.

Proof. For $k=1$: $$\Lambda_1^{(n)}=\min_{c\ne0}\frac{c^{\mathsf T}Kc}{c^{\mathsf T}Mc}=\min_{v\in V_n\setminus\{0\}}R[v]\ge\min_{v\in\mathcal{A}_0\setminus\{0\}}R[v]=\lambda_1$$ by the minimum principle of §2.3. For general $k$ we use (statement) the Courant–Fischer min–max principle $\lambda_k=\min_{S}\max_{v\in S\setminus\{0\}}R[v]$, the minimum over $k$-dimensional subspaces $S\subset\mathcal{A}_0$; the same formula with $S\subset V_n$ gives $\Lambda_k^{(n)}$ (the min–max characterisation of the generalised eigenvalues of the symmetric pencil $(K,M)$), and minimising over fewer subspaces gives a larger value. Nested spaces: $V_n\subset V_{n+1}$ means more subspaces to minimise over. ∎

🧭 Problem-solving strategy — the Rayleigh–Ritz method by hand
  1. Energy. Put the equation in self-adjoint form $-(pu')'+qu=f$ (§2.3) and write $I[v]=\int(pv'^2+qv^2-2fv)$ — or, for an eigenvalue problem, $R[v]=\int(pv'^2+qv^2)/\int rv^2$.
  2. Trial functions. Choose $\varphi_i$ satisfying the essential (Dirichlet) conditions: $x(1-x),\,x^2(1-x),\dots$ or $\sin k\pi x$ on $[0,1]$. Natural conditions need not be imposed. Exploit symmetry.
  3. Assemble and solve. $K_{ij}=\int(p\varphi_i'\varphi_j'+q\varphi_i\varphi_j)$, $F_i=\int f\varphi_i$ (and $M_{ij}=\int r\varphi_i\varphi_j$); solve $Kc=F$ or $\det(K-\Lambda M)=0$.
  4. Interpret. $I[u_n]=-c^{\mathsf T}F\ge I[u]$; $\Lambda_k\ge\lambda_k$. Pointwise values carry no one-sided guarantee.
✏️ Example 4 — Ritz approximations for $-u''+u=x$
Solve $-u''+u=x$, $u(0)=u(1)=0$, exactly; then find the one-term Ritz approximation with $\varphi_1=x(1-x)$ and the two-term one with $\varphi_2=x^2(1-x)$ added. Compare values and energies.
Exact $u=x+A\cosh x+B\sinh x$; $A=0$, $B=-1/\sinh1$: $u=x-\dfrac{\sinh x}{\sinh1}$, $u(\tfrac12)\approx0.056591$, and $I[u]=-\int_0^1xu\,dx\approx-0.0202980$.
One term $p=q=1$, $f=x$. $$K_{11}=\int_0^1\big((1-2x)^2+x^2(1-x)^2\big)dx=\tfrac13+\tfrac1{30}=\tfrac{11}{30}$$ and $F_1=\int_0^1x^2(1-x)\,dx=\tfrac1{12}$, so $c_1=\tfrac{5}{22}$: $$u_1=\tfrac{5}{22}x(1-x),\qquad u_1(\tfrac12)=\tfrac5{88}\approx0.056818.$$ Energy $I[u_1]=-c_1F_1=-\tfrac5{264}\approx-0.018939\ \gt I[u]$.
Two terms $K=\begin{pmatrix}11/30&11/60\\11/60&1/7\end{pmatrix}$, $F=\begin{pmatrix}1/12\\1/20\end{pmatrix}$, giving $c=\big(\tfrac{69}{473},\tfrac{7}{43}\big)$ and $$u_2=\frac{x(1-x)(69+77x)}{473}.$$ The error is at most about $2.3\times10^{-4}$ (at $x=\tfrac14,\tfrac12,\tfrac34$ it is $-6.5\times10^{-5}$, $2.3\times10^{-4}$, $-3.1\times10^{-5}$ — it changes sign), and $I[u_2]=-\tfrac{48}{2365}\approx-0.0202960$.
Check $I[u_1]\gt I[u_2]\gt I[u]$, as Theorem 6.20(3) demands; the energy error drops from $1.4\times10^{-3}$ to $2\times10^{-6}$. The pointwise errors have no fixed sign. Interactive 2 continues the sequence.
✏️ Example 5 — Two-term Rayleigh–Ritz for the first eigenvalue
For $-y''=\lambda y$, $y(0)=y(1)=0$ ($\lambda_1=\pi^2$), use the trial functions $\varphi_1=x(1-x)$, $\varphi_2=x^2(1-x)^2$. What does the second root approximate?
Matrices With $p=r=1$, $q=0$: $$K=\begin{pmatrix}1/3&1/15\\1/15&2/105\end{pmatrix},\quad M=\begin{pmatrix}1/30&1/140\\1/140&1/630\end{pmatrix}.$$
Characteristic equation $\det(K-\Lambda M)=\dfrac{\Lambda^2-112\Lambda+1008}{529200}=0$, so $\Lambda=56\mp4\sqrt{133}$: $\Lambda_1\approx9.869750$ and $\Lambda_2\approx102.13$.
Accuracy $\Lambda_1-\pi^2\approx1.5\times10^{-4}$, a relative error of $1.5\times10^{-5}$ — far better than the one-term value $10$ of §2.3. The eigenvalue error is quadratic in the error of the eigenfunction, which is why Rayleigh–Ritz eigenvalues are so good.
Second root Both trial functions are symmetric about $x=\tfrac12$, so $V_2$ contains only approximations of symmetric eigenfunctions $\sin\pi x,\sin3\pi x,\dots$. $\Lambda_2\approx102.1$ approximates $\lambda_3=9\pi^2\approx88.8$, not $\lambda_2=4\pi^2\approx39.5$. Theorem 6.21 is not violated ($\Lambda_2\ge\lambda_2$), but the bound is poor: a trial space must be rich enough to see the mode you want.

Galerkin for a non-symmetric problem. For $-u''+u'=1$, $u(0)=u(1)=0$ there is no energy to minimise (the operator is not self-adjoint), but Galerkin's condition still makes sense. With $\varphi_1=x(1-x)$ and $u_1=c\varphi_1$ the residual is $R=2c+c(1-2x)-1$, and $\int_0^1R\varphi_1\,dx=\tfrac c3-\tfrac16=0$ gives $c=\tfrac12$, $u_1(\tfrac12)=0.125$; the exact solution $u=x-\frac{e^x-1}{e-1}$ has $u(\tfrac12)\approx0.1225$. Galerkin's method is the basis of the finite element method for convection–diffusion, elasticity and fluid flow, where the operator is often non-symmetric; the price is that the monotonicity of Theorem 6.20(3) is lost.

Interactive 2 — The Rayleigh–Ritz Method in Action

Left: the exact solution (dashed) of a boundary value problem on $[0,1]$ with $u(0)=u(1)=0$, and the Ritz approximation $u_n$ from $n$ trial functions — sines $\sin k\pi x$ or polynomials $x^k(1-x)$. Right: the energy error $I[u_k]-I[u]=\|u_k-u\|_E^2$ for $k=1,\dots,6$ on a logarithmic scale. It never increases (Theorem 6.20). Compare a smooth load with the step load, where both bases converge slowly.

1
n—
I[uₙ]—
I[u] (exact)—
max |u − uₙ|—

Poisson's Equation and the Dirichlet Principle

Everything above extends to several variables. Let $\Omega\subset\mathbb{R}^2$ be a bounded domain with piecewise smooth boundary, $f\in C(\overline\Omega)$ and $g$ continuous on $\partial\Omega$, and let $\mathcal{A}_g=\{v\in C^1(\overline\Omega):v=g\text{ on }\partial\Omega\}$, assumed nonempty. The Dirichlet energy with a source is $$D[v]=\iint_\Omega\Big(\tfrac12|\nabla v|^2-fv\Big)\,dx\,dy.$$

📐 Theorem 6.22 — Dirichlet principle for Poisson's equation
  1. If $u\in C^2(\overline\Omega)$ solves $-\Delta u=f$ in $\Omega$, $u=g$ on $\partial\Omega$, then $D[u+\eta]=D[u]+\tfrac12\iint_\Omega|\nabla\eta|^2$ for every $\eta\in C^1(\overline\Omega)$ vanishing on $\partial\Omega$; hence $u$ is the unique minimiser of $D$ on $\mathcal{A}_g$.
  2. Conversely, a minimiser $u\in C^2(\overline\Omega)\cap\mathcal{A}_g$ of $D$ solves $-\Delta u=f$, $u=g$ on $\partial\Omega$.
  3. (Neumann problem.) For $h\in C(\partial\Omega)$, a minimiser $u\in C^2(\overline\Omega)$ of $D_h[v]=D[v]-\oint_{\partial\Omega}hv\,ds$ over all $v\in C^1(\overline\Omega)$ solves $-\Delta u=f$, $\partial u/\partial n=h$ (a natural condition). $D_h$ is bounded below only if $\iint_\Omega f+\oint_{\partial\Omega}h=0$.

Proof. (1) $$D[u+\eta]-D[u]=\iint(\nabla u\cdot\nabla\eta-f\eta)+\tfrac12\iint|\nabla\eta|^2$$. By Green's first identity, $\iint\nabla u\cdot\nabla\eta=\oint\eta\,\partial_nu\,ds-\iint\eta\,\Delta u$, and the boundary term vanishes; so the first integral is $\iint(-\Delta u-f)\eta=0$. The remaining term is $\ge0$ and vanishes only for $\nabla\eta\equiv0$, i.e. $\eta\equiv0$ (as $\eta=0$ on $\partial\Omega$ and $\Omega$ is connected). (2) Ostrogradsky's equation (Theorem 6.8) for $F=\tfrac12(u_x^2+u_y^2)-fu$ is $-f-u_{xx}-u_{yy}=0$. (3) Now $\eta$ is arbitrary on $\partial\Omega$: the first variation is $\iint(-\Delta u-f)\eta+\oint(\partial_nu-h)\eta$; interior variations give the equation, and then arbitrary boundary values give $\partial_nu=h$. Finally $D_h[v+c]=D_h[v]-c\big(\iint f+\oint h\big)$ for constants $c$, which is unbounded below unless the bracket is $0$. ∎

A cautionary history. Riemann (1851, 1857) built his theory of complex functions on the "Dirichlet principle": since $D[v]\ge0$ when $f=0$, there must be a minimiser, and it is harmonic. In 1870 Weierstrass pointed out that a functional bounded below need not attain its infimum — his counterexample is Example 5 of §6.1. Worse, Hadamard observed (1906) that $u=\sum_{n\ge1}\frac{r^{n!}\cos(n!\,\theta)}{n^2}$ is harmonic in the unit disc and continuous on the closed disc (the series converges uniformly), yet its Dirichlet integral $\pi\sum_n\frac{n!}{n^4}$ is infinite: for its boundary values no admissible function has finite energy, and the principle is empty. Hilbert (1900–1904) showed that the principle is correct under reasonable hypotheses on $\Omega$ and $g$, and the modern formulation in the Sobolev space $H^1_0(\Omega)$ — completed with respect to the energy norm, where the Riesz representation (Lax–Milgram) theorem gives a unique weak solution for every square-integrable $f$ — is the foundation of the finite element method. Hilbert's 19th and 20th problems (1900) are about exactly these questions.

✏️ Example 6 — Torsion of a square bar by one Ritz term
The stress function of a twisted bar with unit square cross-section satisfies (after scaling) $-\Delta u=1$ in $\Omega=(0,1)^2$, $u=0$ on $\partial\Omega$; the torsional rigidity is proportional to $\iint_\Omega u$. Use the single trial function $\varphi=x(1-x)y(1-y)$, and compare with the exact series solution.
Assemble Minimise $D[c\varphi]=\tfrac{c^2}{2}K-cF$ with $K=\iint|\nabla\varphi|^2$, $F=\iint\varphi$. Since $\varphi_x=(1-2x)y(1-y)$, $\iint\varphi_x^2$ is the product of $\int_0^1(1-2x)^2dx=\tfrac13$ and $\int_0^1y^2(1-y)^2dy=\tfrac1{30}$; with the same for $\varphi_y$, $K=\tfrac{1}{45}$. And $F=\big(\int_0^1x(1-x)\,dx\big)^2=\tfrac1{36}$.
Solve $c=F/K=\tfrac{45}{36}=\tfrac54$: $u_1=\tfrac54x(1-x)y(1-y)$. Centre value $u_1(\tfrac12,\tfrac12)=\tfrac5{64}=0.078125$; integral $\iint u_1=cF=\tfrac5{144}\approx0.034722$.
Exact By separation of variables (§4.2), $$u=\sum_{m,n\text{ odd}}\frac{16\,\sin m\pi x\,\sin n\pi y}{\pi^4mn(m^2+n^2)},$$ giving $u(\tfrac12,\tfrac12)\approx0.073671$ and $\iint u\approx0.035144$.
Interpret The centre value is $6\%$ too high, while the rigidity is $1.2\%$ too low. The second is guaranteed: $\iint u=a(u,u)$ and $\iint u_1=a(u_1,u_1)$ (from $Kc=F$), and Galerkin orthogonality gives $$a(u,u)=a(u_1,u_1)+a(u-u_1,u-u_1)\ge a(u_1,u_1)$$. Ritz always underestimates the stiffness — an important safety fact for engineers — but gives no one-sided bound on pointwise values.
⚠️ Counterexamples and pitfalls
  1. Legendre's condition is not sufficient. For $\int_0^{2\pi}(y'^2-y^2)$, $P=2\gt0$ everywhere, yet $y\equiv0$ is not a minimum: the conjugate point $\pi$ lies inside.
  2. Legendre's necessary condition is $P\ge0$, not $P\gt0$. $\int_0^1y'^4\,dx$ with $y(0)=y(1)=0$: along $y\equiv0$, $P=12y'^2=0$, yet $y\equiv0$ is the global minimum.
  3. The sufficient conditions are not necessary. On $[0,\pi]$, $y\equiv0$ minimises $\int(y'^2-y^2)$ (Wirtinger), although $\pi$ is conjugate to $0$ and (J⁺) fails.
  4. Weak minimum does not imply strong minimum. $\int_0^1y'^3$: $y=x$ satisfies (L⁺), (J⁺), but $E\lt0$ for slopes $q\lt-2$ and $\inf J=-\infty$ in every strong neighbourhood.
  5. Convexity in $y'$ alone is not enough for a global minimum. $y'^2-y^2$ is convex in $y'$, not jointly in $(y,y')$; joint convexity is what Theorem 6.14 needs.
  6. A conjugate point is a property of the extremal and the starting point, not of the integrand alone. For $\int(y'^2+y^2)$ there are none; for $\int(y'^2-\omega^2y^2)$ they are at multiples of $\pi/\omega$ from $a$.
  7. Rayleigh–Ritz bounds are one-sided for energies and eigenvalues only. $\Lambda_k\ge\lambda_k$ and $I[u_n]\ge I[u]$; pointwise values can be too high (torsion centre value) or oscillate around the truth (Example 4).
  8. Trial functions must satisfy the essential conditions. For the Dirichlet problem, $u\equiv1$ gives $R=0\lt\pi^2$; it is not admissible. Natural conditions need not be satisfied.
  9. Without positivity there is no minimum principle. $-u''-10u=f$, $u(0)=u(1)=0$ is uniquely solvable ($10$ is not an eigenvalue $n^2\pi^2$), but $I[v]=\int(v'^2-10v^2-2fv)$ is unbounded below ($v=t\sin\pi x$, since $\pi^2\lt10$): the solution is a saddle point, and Ritz approximations lose their meaning as minimisers.
  10. Galerkin is not Ritz for non-symmetric operators. For $-u''+u'=f$ there is no energy, approximations need not improve monotonically, and the stiffness matrix is not symmetric.
  11. The Dirichlet principle can fail. The infimum may not be attained (Weierstrass), and for some continuous boundary data no admissible function has finite energy (Hadamard's series).

Exercises

I
Second variation, Legendre's condition and convexity.
  • 1 For the length functional at the line $y=mx+k$, show that $\delta^2J[\eta]=\displaystyle\int\frac{\eta'^2}{(1+m^2)^{3/2}}\,dx$.
  • 2 Compute $F_{y'y'}$ for $F=\sqrt{1+y'^2}/x$ ($x\gt0$) and $F=e^x\sqrt{1+y'^2}$, and state what Legendre's test says about their extremals.
  • 3 Show that $y=x$ is a strict weak maximum of $\int_0^1(y'^2-y'^4)\,dx$, $y(0)=0$, $y(1)=1$.
  • 4 Which integrands are jointly convex in $(y,p)$? (a) $p^2+y^2$; (b) $p^2-y^2$; (c) $\sqrt{1+p^2}$; (d) $y^2p^2$; (e) $e^p+y^2$; (f) $y\sqrt{1+p^2}$ on $y\gt0$.
  • 5 Use convexity to prove that $y=x^4-1$ is the unique global minimiser of $\int_1^2y'^2x^{-3}\,dx$ with $y(1)=0$, $y(2)=15$.
  • 6 Show that $y\equiv0$ is the global minimum of $\int_0^1y'^4\,dx$ ($y(0)=y(1)=0$) although $P=0$ along it.
  • 7 Prove the reduced form $\delta^2J=\int(P\eta'^2+Q\eta^2)$ in detail, stating the regularity you need.
1 $F=\sqrt{1+p^2}$: $F_{yy}=F_{yp}=0$, $F_{pp}=(1+p^2)^{-3/2}$, evaluated at $p=m$. So $P=(1+m^2)^{-3/2}$, $Q=0$, and the formula follows; it is positive for $\eta\ne0$.
2 $F=\sqrt{1+p^2}/x$: $F_{pp}=\dfrac{1}{x(1+p^2)^{3/2}}\gt0$. $F=e^x\sqrt{1+p^2}$: $F_{pp}=\dfrac{e^x}{(1+p^2)^{3/2}}\gt0$. Both satisfy (L⁺) along every extremal, so their extremals are candidates for minima (never maxima); a weak minimum then needs (J⁺).
3 Along $y=x$: $P=2-12=-10\lt0$, $Q=0$; the Jacobi equation $(-10u')'=0$ gives $u_0=x$, no zero in $(0,1]$. Theorem 6.17 for maxima (apply it to $-J$) gives a strict weak maximum. In fact more is true: $$E(x,y,1,q)=q^2-q^4+2(q-1)=-(q-1)^2(q^2+2q+2)\le0$$ for every $q$, i.e. $F(q)\le F(1)-2(q-1)$; integrating along any admissible $Y$ gives $J[Y]\le\int_0^1\big(-2(Y'-1)\big)dx=0=J[x]$, a global maximum.
4 Hessians in $(y,p)$: (a) $\mathrm{diag}(2,2)$: yes. (b) $\mathrm{diag}(-2,2)$: no. (c) $\begin{pmatrix}0&0\\0&(1+p^2)^{-3/2}\end{pmatrix}$: yes. (d) $\begin{pmatrix}2p^2&4yp\\4yp&2y^2\end{pmatrix}$, determinant $-12y^2p^2\lt0$: no. (e) $\mathrm{diag}(2,e^p)$: yes (strictly). (f) $F_{yy}=0$, $F_{yp}=p/w$, $F_{pp}=y/w^3$: determinant $-p^2/w^2\lt0$ for $p\ne0$: no — the catenoid problem is not convex, which is why it can have a non-minimal extremal.
5 $F=p^2/x^3$ has Hessian $\mathrm{diag}(0,2/x^3)$: convex in $(y,p)$, strictly in $p$. By Theorem 6.14 the extremal $x^4-1$ (Exercise I.5 of §6.1) is a global minimum. Uniqueness: equality in $F(y_0'+\eta')\ge F(y_0')+F_p\eta'$ forces $\eta'\equiv0$ (strict convexity in $p$), so $\eta\equiv0$.
6 $J\ge0=J[0]$ trivially, and $J[y]=0$ only if $y'\equiv0$. Legendre's necessary condition $P\ge0$ holds (with equality); this shows that (L⁺) is not necessary.
7 Assume $F\in C^3$, $y\in C^2$, so that $x\mapsto F_{yy'}(x,y(x),y'(x))$ is $C^1$. Then $2F_{yy'}\eta\eta'=F_{yy'}(\eta^2)'$, and integrating by parts, $$\int_a^b2F_{yy'}\eta\eta'=\big[F_{yy'}\eta^2\big]_a^b-\int_a^b\big(\tfrac{d}{dx}F_{yy'}\big)\eta^2,$$ and the bracket is $0$. Substituting into Definition 6.6 gives $\int(P\eta'^2+Q\eta^2)$.
II
Jacobi's condition and conjugate points.
  • 1 Find the point conjugate to $0$ for $\int(y'^2-9y^2)\,dx$. For which $b$ is $y\equiv0$ a strict weak minimum with $y(0)=y(b)=0$?
  • 2 Show that $\int_0^b(y'^2+9y^2)\,dx$ has no conjugate points and that $y\equiv0$ is the global minimum for every $b$.
  • 3 Find the point conjugate to $1$ for $\int_1^b\big(x^2y'^2-\tfrac{17}{4}y^2\big)\,dx$.
  • 4 For the pencil $y=c\sin x$ of extremals of $\int(y'^2-y^2)$ through the origin, verify that $\partial y/\partial c$ solves the Jacobi equation, and find where the pencil refocuses.
  • 5 On $[0,\tfrac{3\pi}{2}]$, $y=\sin x$ is the extremal of $\int(y'^2-y^2)$ with $y(0)=0$, $y(\tfrac{3\pi}2)=-1$. Show directly that it is not a minimum using $\eta=\sin\tfrac{2x}{3}$.
  • 6 Use Picone's identity with $v=\cos\big(\sqrt2(x-\tfrac12)\big)$ to prove $\int_0^1\eta'^2\,dx\ge2\int_0^1\eta^2\,dx$ for $\eta(0)=\eta(1)=0$. What is the best constant?
  • 7 For $0\lt b\lt\pi$, find the minimiser and the minimum value of $\int_0^b(y'^2-y^2)\,dx$ with $y(0)=0$, $y(b)=1$. What happens as $b\to\pi^-$?
1 $P=2$, $Q=-18$: $u''+9u=0$, $u_0=\tfrac13\sin3x$, conjugate point $\pi/3$. Strict weak (indeed global) minimum iff $b\lt\pi/3$.
2 $P=2$, $Q=18$: $u''=9u$, $u_0=\tfrac13\sinh3x\gt0$ for $x\gt0$: no conjugate point. The integrand is jointly convex, so $y\equiv0$ is the global minimum (directly: $J\ge0=J[0]$).
3 $P=2x^2$, $Q=-\tfrac{17}{2}$: $-(2x^2u')'-\tfrac{17}2u=0$, i.e. $x^2u''+2xu'+\tfrac{17}4u=0$. With $u=x^m$: $m^2+m+\tfrac{17}4=0$, $m=-\tfrac12\pm2i$. So $u_1=\tfrac12x^{-1/2}\sin(2\log x)$, which vanishes again when $2\log x=\pi$: the conjugate point is $e^{\pi/2}\approx4.810$.
4 $\partial y/\partial c=\sin x$, and $P=2$, $Q=-2$: $-(2u')'-2u=-2(u''+u)=0$ for $u=\sin x$. All members vanish at $x=\pi$: the pencil refocuses at $(\pi,0)$, the conjugate point.
5 $J$ is quadratic, so $J[y+\varepsilon\eta]=J[y]+\varepsilon\,\delta J+\tfrac{\varepsilon^2}2\delta^2J$ with $\delta J=0$ and $\delta^2J=2\int_0^{3\pi/2}(\eta'^2-\eta^2)$. With $\int_0^{3\pi/2}\cos^2\tfrac{2x}3=\int_0^{3\pi/2}\sin^2\tfrac{2x}3=\tfrac{3\pi}{4}$: $\delta^2J=2\big(\tfrac49-1\big)\tfrac{3\pi}4=-\tfrac{5\pi}{6}$. So $J[y+\varepsilon\eta]=J[y]-\tfrac{5\pi}{12}\varepsilon^2\lt J[y]$ (here $J[y]=\int\cos2x=0$). The conjugate point $\pi$ lies in $(0,\tfrac{3\pi}2)$.
6 $v\gt0$ on $[0,1]$ since $\sqrt2\cdot\tfrac12\approx0.707\lt\tfrac\pi2$, and $v''=-2v$, i.e. $v$ solves the Jacobi equation $-v''-2v=0$ of $\int(\eta'^2-2\eta^2)$ ($P=1$, $Q=-2$). Picone (Step 2 of Theorem 6.17 with $\alpha=0$): $\int(\eta'^2-2\eta^2)=\int(\eta'-\eta v'/v)^2\ge0$. The best constant is $\pi^2$ (the first Dirichlet eigenvalue, §2.3), obtained the same way with $v=\cos\big(k(x-\tfrac12)\big)$ for any $k\lt\pi$.
7 Since $b\lt\pi$ there is no conjugate point in $(0,b]$, and $J$ is quadratic with $\delta^2J\gt0$ (Wirtinger on $[0,b]$), so the extremal $y=\dfrac{\sin x}{\sin b}$ is the global minimum. Integrating by parts with $y''+y=0$: $J=\big[yy'\big]_0^b=y(b)y'(b)=\cot b$. As $b\to\pi^-$, $\cot b\to-\infty$: the minimum value collapses as the conjugate point is approached.
III
Weierstrass's condition and strong extrema.
  • 1 Compute $E$ for $F=\sqrt{1+p^2}$, show $E\ge0$, and conclude that straight lines are strong minima of the length.
  • 2 Compute $E$ for $F=p^3$ and for $F=p^4$. Which has $E\ge0$ for all $p,q$?
  • 3 For $\int_0^1y'^3\,dx$, compute $J$ for the polygon through $(0,0)$, $(0.01,-0.1)$, $(1,1)$ and its maximal distance from $y=x$.
  • 4 Prove that $E(x,y,p,q)=\tfrac12(q-p)^2F_{y'y'}(x,y,\xi)$ for some $\xi$ between $p$ and $q$.
  • 5 Show that broken extremals of $\int(y'^2-1)^2\,dx$ with slopes $\pm1$ satisfy both Weierstrass–Erdmann corner conditions.
1 $$E=\sqrt{1+q^2}-\sqrt{1+p^2}-\frac{(q-p)p}{\sqrt{1+p^2}}$$ $$=\frac{\sqrt{1+q^2}\sqrt{1+p^2}-(1+pq)}{\sqrt{1+p^2}}\ge0$$ by Cauchy–Schwarz ($1+pq\le\sqrt{1+p^2}\sqrt{1+q^2}$). Since $F_{pp}\gt0$ for all slopes and lines have no conjugate points, Theorem 6.18(2) gives strong minima (Example 2 of §6.1 even gives a global minimum).
2 $p^3$: $E=q^3-p^3-3p^2(q-p)$, which factors as $(q-p)^2(q+2p)$ and takes both signs. $p^4$: $$E=q^4-p^4-4p^3(q-p)=(q-p)^2(q^2+2pq+3p^2)\ge0$$, since $q^2+2pq+3p^2=(q+p)^2+2p^2$. Only $p^4$ (convex) has $E\ge0$ everywhere.
3 Slopes $-10$ on $[0,0.01]$ and $\tfrac{1.1}{0.99}\approx1.1111$ on $[0.01,1]$: $$J=(-10)^3(0.01)+(1.1111)^3(0.99)\approx-10+1.358=-8.642$$, while $J[x]=1$. The largest distance from $y=x$ is $0.11$ (at $x=0.01$). A curve within $0.11$ of the weak minimum has a far smaller value.
4 Taylor's theorem with Lagrange remainder for $g(t)=F(x,y,t)$ about $t=p$: $$g(q)=g(p)+(q-p)g'(p)+\tfrac12(q-p)^2g''(\xi)$$. Rearranging gives the formula. Hence $F_{y'y'}\ge0$ for all slopes implies $E\ge0$.
5 $F_{y'}=4p(p^2-1)$ and $$F-pF_{y'}=(p^2-1)^2-4p^2(p^2-1)=-(p^2-1)(1+3p^2)$$. Both vanish at $p=\pm1$, so both are continuous (equal to $0$) across a corner where the slope jumps between $1$ and $-1$.
IV
Variational methods.
  • 1 Write the energy functional whose minimiser solves $-\big((1+x^2)u'\big)'+2u=e^x$, $u(0)=u(1)=0$.
  • 2 Find the boundary value problem solved by the minimiser of $\int_1^2(x^2u'^2+2u^2-2xu)\,dx$, $u(1)=u(2)=0$.
  • 3 One-term Ritz for $-u''=x$, $u(0)=u(1)=0$, with $\varphi=x(1-x)$; compare with the exact solution at $x=\tfrac12$ and in energy.
  • 4 Show that the two-term Ritz approximation with $x(1-x)$, $x^2(1-x)$ for the problem of 3 is exact. Why?
  • 5 For $-y''=\lambda y$, $y(0)=0$, $y'(1)=0$, compute $R[v]$ for $v=x$ and $v=2x-x^2$ and compare with $\lambda_1$. Is $v=x$ admissible?
  • 6 Estimate $\lambda_1$ for $-\big((1+x)y'\big)'=\lambda y$, $y(0)=y(1)=0$, with the trial function $\sin\pi x$.
  • 7 One-term Galerkin for $-u''+u'=1$, $u(0)=u(1)=0$, with $\varphi=x(1-x)$ (verify the value in the text).
  • 8 Show that $u=\tfrac14(1-x^2-y^2)$ minimises $\iint_{x^2+y^2\lt1}\big(\tfrac12|\nabla v|^2-v\big)$ among $v$ vanishing on the unit circle, and find the minimum value.
  • 9 Show that $\int_0^1(u'^2-2fu)\,dx$ (no boundary conditions) is bounded below only if $\int_0^1f=0$, and that a minimiser then solves $-u''=f$, $u'(0)=u'(1)=0$. Is it unique?
  • 10 Prove that the Ritz matrix $K$ is positive definite when $p\gt0$, $q\ge0$ and the $\varphi_i\in\mathcal{A}_0$ are independent. Does the proof survive if $q$ takes negative values?
1 $p=1+x^2$, $q=2$, $f=e^x$: $I[v]=\int_0^1\big((1+x^2)v'^2+2v^2-2e^xv\big)\,dx$ over $v(0)=v(1)=0$.
2 Euler–Lagrange: $4u-2x-(2x^2u')'=0$, i.e. $-(x^2u')'+2u=x$, $u(1)=u(2)=0$ (self-adjoint with $p=x^2\gt0$, $q=2\ge0$).
3 $K=\int(1-2x)^2=\tfrac13$, $F=\int x\cdot x(1-x)=\tfrac1{12}$, $c=\tfrac14$: $u_1=\tfrac14x(1-x)$. Exact: $u=\tfrac{x-x^3}{6}$. At $\tfrac12$: $u_1=\tfrac1{16}=u$ (a coincidence). Energies: $I[u_1]=-cF=-\tfrac1{48}\approx-0.02083$, $I[u]=-\int_0^1x\,\tfrac{x-x^3}6=-\tfrac1{45}\approx-0.02222$: $I[u_1]\gt I[u]$ as it must be.
4 $u=\tfrac{x(1-x)(1+x)}{6}=\tfrac16x(1-x)+\tfrac16x^2(1-x)$ lies in $V_2$. By Theorem 6.20(3), $u_2$ is the best approximation from $V_2$ in the energy norm; since $u\in V_2$, $u_2=u$.
5 $\lambda_1=(\pi/2)^2\approx2.4674$. $v=x$: $R=\int_0^11\big/\int_0^1x^2=3$. $v=2x-x^2$: $\int v'^2=\int(2-2x)^2=\tfrac43$, $\int v^2=\tfrac8{15}$, $R=\tfrac52$. Both exceed $\lambda_1$. $v=x$ is admissible: only the essential condition $v(0)=0$ is required; $y'(1)=0$ is natural.
6 $$R=\dfrac{\int_0^1(1+x)\pi^2\cos^2\pi x}{\int_0^1\sin^2\pi x}=\dfrac{\pi^2(\frac12+\frac14)}{\frac12}=\tfrac32\pi^2\approx14.80$$ (using $\int_0^1x\cos^2\pi x=\tfrac14$). It is an upper bound; shooting gives $\lambda_1\approx14.34$.
7 $u_1=c\,x(1-x)$: $-u_1''=2c$, $u_1'=c(1-2x)$, residual $R=2c+c(1-2x)-1$. $\int_0^1R\,x(1-x)=\tfrac{2c}{6}+c\cdot0-\tfrac16$, because $\int_0^1(1-2x)x(1-x)\,dx=0$ by symmetry. So $c=\tfrac12$, $u_1(\tfrac12)=\tfrac18$, against $u(\tfrac12)=\tfrac12-\tfrac{\sqrt e-1}{e-1}\approx0.12246$.
8 $-\Delta u=\tfrac14\cdot4=1$ and $u=0$ on $r=1$, so by Theorem 6.22 $u$ is the unique minimiser. By Green, $\iint|\nabla u|^2=\iint u$, so $$D[u]=-\tfrac12\iint u=-\tfrac12\cdot2\pi\int_0^1\tfrac{1-r^2}{4}r\,dr=-\tfrac12\cdot\tfrac\pi8=-\tfrac{\pi}{16}$$.
9 $I[u+c]=I[u]-2c\int f$ for constants $c$, unbounded below unless $\int f=0$. A minimiser satisfies the Euler–Lagrange equation $-u''=f$ and the natural conditions $F_{u'}=2u'=0$ at both ends. It is unique only up to an additive constant, since $I[u+c]=I[u]$ when $\int f=0$.
10 $c^{\mathsf T}Kc=\int(pv'^2+qv^2)$ with $v=\sum c_i\varphi_i$. If it is $0$, then $\int pv'^2=0$, so $v'\equiv0$ and $v\equiv0$ ($v(a)=0$), so $c=0$ by independence. If $q$ is negative somewhere the argument fails; $K$ remains positive definite as long as $a(v,v)\gt0$ for all $v\ne0$, i.e. as long as the first Dirichlet eigenvalue of $-(pu')'+qu=\lambda u$ is positive (Rayleigh quotient, §2.3).
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B GATE MA For $J[y]=\int_0^b\big(y'^2-4y^2+2xy\big)\,dx$, the first point conjugate to $x=0$ along any extremal is (A) $\pi/4$; (B) $\pi/2$; (C) $\pi$; (D) there is none.

Idea The Jacobi equation uses only second derivatives of $F$: the linear term $2xy$ is irrelevant.
Computation $P=2$, $Q=F_{yy}=-8$: $-2u''-8u=0$, $u''+4u=0$, $u_0=\tfrac12\sin2x$, first zero at $\pi/2$.
Answer (B). ((A) confuses $\omega^2=4$ with $\omega=4$.)

E2. CSIR Part B The one-term Ritz approximation $u_1=c\,x(1-x)$ for $-u''+u=1$, $u(0)=u(1)=0$ has $c$ equal to (A) $\tfrac5{11}$; (B) $\tfrac5{22}$; (C) $\tfrac12$; (D) $\tfrac6{11}$.

Assemble $$K=\int_0^1\big((1-2x)^2+x^2(1-x)^2\big)=\tfrac13+\tfrac1{30}=\tfrac{11}{30}$$; $F=\int_0^1x(1-x)=\tfrac16$.
Solve $c=F/K=\tfrac{30}{66}=\tfrac5{11}$. Check: $u_1(\tfrac12)=\tfrac5{44}\approx0.1136$ against the exact $1-\dfrac{1}{\cosh(1/2)}\approx0.1132$.
Answer (A). ((C) is the answer if the term $u$ is ignored.)

E3. CSIR Part B For $J[y]=\int_0^1y'^3\,dx$, $y(0)=0$, $y(1)=1$, the extremal $y=x$ is (A) a strong minimum; (B) a weak minimum but not a strong minimum; (C) neither a weak nor a strong minimum; (D) a weak maximum.

Weak $P=6\gt0$, Jacobi field $u=x$ with no zero in $(0,1]$: strict weak minimum (Theorem 6.17). So (C) and (D) are false.
Strong $E(x,y,1,q)=(q-1)^2(q+2)\lt0$ for $q\lt-2$: not a strong minimum (Theorem 6.18), and Example 3 gives competitors with $J\to-\infty$.
Answer (B).

E4. CSIR Part C Consider $J[y]=\int_0^b(y'^2-y^2)\,dx$ with $y(0)=y(b)=0$. Which are true? (One or more options may be correct.) (A) If $b=3$, then $y\equiv0$ is a strict minimum. (B) If $b=4$, there is an admissible $y$ with $J[y]\lt0$. (C) If $b=\pi$, then $J\ge0$ on admissible functions, and $J=0$ for some $y\not\equiv0$. (D) Legendre's condition fails when $b\gt\pi$.

(A) True $3\lt\pi$: no conjugate point in $(0,3]$; indeed $J\ge\big((\pi/3)^2-1\big)\int y^2\gt0$ for $y\ne0$.
(B) True $y=\sin(\pi x/4)$: $J=2\big(\tfrac{\pi^2}{16}-1\big)\lt0$.
(C) True Wirtinger's inequality on $[0,\pi]$ gives $J\ge0$, and $J[\sin x]=0$.
(D) False $P=F_{y'y'}=2\gt0$ for every $b$; it is Jacobi's condition that fails.
Answer (A), (B) and (C).

E5. CSIR Part C Let $q,f\in C[0,1]$ and $I[v]=\int_0^1\big(v'^2+qv^2-2fv\big)\,dx$. Which are true? (A) If $q\ge0$, the minimiser of $I$ over $v\in C^2$ with $v(0)=v(1)=0$ solves $-u''+qu=f$. (B) If $q\ge0$, the minimiser over $v$ with only $v(0)=0$ prescribed satisfies $u'(1)=0$. (C) If $q\equiv-10$ and $f\equiv0$, then $I$ is bounded below on $\{v:v(0)=v(1)=0\}$. (D) Ritz approximations from nested trial spaces have non-increasing energies $I[u_n]$.

(A) True Theorem 6.19(2): the Euler–Lagrange equation is $-u''+qu=f$.
(B) True Natural boundary condition $F_{v'}(1)=2u'(1)=0$ (Theorem 6.9).
(C) False $v=t\sin\pi x$: $I=t^2\cdot\tfrac12(\pi^2-10)\to-\infty$, because $\pi^2\lt10$.
(D) True Minimising over a larger set cannot increase the minimum (Theorem 6.20(3)).
Answer (A), (B) and (D).

E6. CSIR Part C For $-y''=\lambda y$, $y(0)=y(1)=0$ (eigenvalues $n^2\pi^2$), which are true? (A) Every $C^1$ trial function $v\ne0$ with $v(0)=v(1)=0$ has $\int v'^2/\int v^2\ge\pi^2$. (B) The trial function $x(1-x)$ gives the value $10$. (C) Rayleigh–Ritz with the basis $\{x(1-x),\,x^2(1-x)^2\}$ gives an approximation of $\lambda_1$ below $\pi^2$. (D) With the basis $\{x(1-x),\,x^2(1-x)\}$ the two Ritz values are $10$ and $42$, and $42\ge\lambda_2$.

(A) True Minimum principle (§2.3): $\lambda_1=\pi^2=\min R$.
(B) True $\int(1-2x)^2=\tfrac13$, $\int x^2(1-x)^2=\tfrac1{30}$, ratio $10$.
(C) False Ritz values are upper bounds: Example 5 gives $9.86975\gt\pi^2$.
(D) True $K=\begin{pmatrix}1/3&1/6\\1/6&2/15\end{pmatrix}$, $M=\begin{pmatrix}1/30&1/60\\1/60&1/105\end{pmatrix}$; $\det(K-\Lambda M)=0$ has roots $10$ and $42$, and $42\ge4\pi^2\approx39.48$ (Theorem 6.21).
Answer (A), (B) and (D).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Second variation, Legendre, convexity. Recall $f''$ in calculus; Definition 6.6 and Theorem 6.12. Draw the thin bump of the Legendre proof and compute $\int\eta_h'^2$ with the class. Theorem 6.14 and Example 1. Close with the question: $\int_0^{2\pi}(y'^2-y^2)$ satisfies Legendre — is $y\equiv0$ a minimum?
  2. Jacobi and Weierstrass. Answer the question with Interactive 1 (sweep $b$ through $\pi$). Theorems 6.15–6.17 (prove Picone's identity on the board), Example 2. Then the excess function, Theorem 6.18 and Example 3 (draw the steep "needle"); the summary rule-cards.
  3. Variational methods. Theorem 6.19 (the energy identity is a two-line computation), Definition 6.9 and Theorem 6.20 (stress Galerkin orthogonality as a projection), Example 4 by hand and then Interactive 2 (smooth load vs step load). Theorem 6.21 with Example 5; Theorem 6.22, the history of the Dirichlet principle and Example 6. Do E4–E6 live.

Discussion questions. (1) Why can a second variation be positive for every short bump and still negative for a long one? Relate this to conjugate points and to the size of the interval. (2) Galerkin orthogonality says $u_n$ is the energy-orthogonal projection of $u$ onto $V_n$. What does this mean geometrically, and why does it make the energy (not the pointwise error) the natural measure of accuracy? (3) An engineer uses Rayleigh–Ritz to estimate the lowest vibration frequency of a bridge and the stiffness of a beam. Which estimates are on the safe side?

Misconceptions to watch for. Treating Legendre's condition as sufficient; forgetting that (L⁺), (J⁺) give only a weak minimum; computing $Q$ as $F_{yy}$ when $F_{yy'}$ is not constant; using trial functions that violate essential conditions or imposing natural ones unnecessarily; believing Ritz values bound pointwise values; applying the energy principle when $q$ is very negative.

Suggested homework. I(2, 3, 4, 5), II(1, 3, 5, 6, 7), III(1, 2, 3), IV(1, 3, 5, 6, 7, 8, 9); Exam corner E1, E2, E5, E6.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. How much load can a tapered column carry before it buckles, and how quickly do Rayleigh–Ritz estimates of that load converge?

Why it matters. Euler's buckling load $P=\pi^2EI/L^2$ (1744) — derived in the same treatise that founded the calculus of variations — governs the design of columns, aircraft struts, wind-turbine towers and bicycle frames. Real members are often tapered to save material, and then no closed formula exists. Design codes in Europe, India and the USA rely on energy (Rayleigh–Ritz) estimates, and finite element software is a refined version of the same idea.

What to do.

  1. A pin-ended column of length $1$ with bending stiffness $EI(x)=1+x$ buckles under the load $P$ when $y''+\dfrac{P}{1+x}y=0$, $y(0)=y(1)=0$ has a nonzero solution. Recognise this as a Sturm–Liouville problem $-y''=P\,r(x)\,y$ with weight $r=1/(1+x)$, and write its Rayleigh quotient.
  2. Compute the one-term Rayleigh–Ritz estimate with $\sin\pi x$ (numerical integration is fine), then the two-term estimate with $\sin\pi x,\sin2\pi x$ by solving $\det(K-PM)=0$.
  3. Find the critical load accurately by shooting: solve the ODE with $y(0)=0$, $y'(0)=1$ and adjust $P$ until $y(1)=0$. Tabulate the errors of the two estimates.
  4. Compare with the uniform columns $EI\equiv1$ and $EI\equiv2$. Is the tapered column closer to the weaker or the stronger one? Explain with the Rayleigh quotient where the stiffness "matters most".

Tools: Python with numpy and scipy (quad, solve_ivp, brentq, scipy.linalg.eigh), or any spreadsheet with a Simpson-rule column.

Hand in: A table of the estimates and errors, a plot of the buckled shape (the Ritz eigenvector next to the shooting solution), and a short paragraph on why every estimate is on the unsafe side of the true load and what an engineer must do about it.

Going further. Repeat with the energy form $P\le\int EI\,y''^2/\int y'^2$ (valid for other end conditions too) and compare; read about how the finite element method uses piecewise linear "hat" trial functions and why its energy error is $O(h^2)$.

Instructor note: the one-term estimate is $P\approx14.585$, the two-term estimate $P\approx14.5124$, and shooting gives $P_{\rm cr}\approx14.5112$ (in units of $EI_0/L^2$), between $\pi^2\approx9.87$ and $2\pi^2\approx19.74$. With $\sin\pi x$ the energy form gives $\tfrac32\pi^2\approx14.80$, a cruder (still upper) bound. Students should notice that the error of the eigenvalue estimate is much smaller than the visible error of the trial shape, and that all estimates overestimate the critical load — a Rayleigh–Ritz load must be divided by a safety factor.

🧪 Self-check quiz

0/5 correct

Q1. Legendre's necessary condition for an extremal $y$ to be a weak minimum of $\int F(x,y,y')\,dx$ is

Q2. For $J=\int_0^b(y'^2-25y^2)\,dx$, the first point conjugate to $0$ is

Q3. The Weierstrass excess function is

Q4. The solution of $-u''=f$, $u(0)=u(1)=0$ is the minimiser over $v(0)=v(1)=0$ of

Q5. Rayleigh–Ritz approximations of the first eigenvalue of a regular Sturm–Liouville problem are