## 1. Geodesics on a cone

For a parameterization of the curve $[u(t), v(t)]$ for which we wish to minimize the travel time or distance, $T(t, u, u', v, v') = \frac{1}{2} (2u'^2 + u^2 v'^2).$

The Euler-Bernoulli equation for the perturbation of $v$ gives $\pd{T}{v} - \dd{}{s}\pd{T}{v'} = \dd{}{s} (u^2 v') = 0,$

which implies that $u^2 v' = h,$

as desired. For the perturbation of $u$, we will use the Beltrami equation: $T - u' \pd{T}{u'} = -(u')^2 + \frac{1}{2} u^2 (v')^2 = \text{constant},$

and therefore $(u')^2 + \frac{1}{2} u^2 (v')^2 = E.$

We can easily combine these two equations together to obtain $\left( \dd{u}{t}\right)^2 + \frac{1}{2} \frac{h^2}{u^2} = E.$

There are several ways to solve this equation, but perhaps the most slick is to look at the solution and to see that you'd like $u = u(v)$. If we change derivatives so that $\dd{u}{t} = \frac{h}{u^2} \dd{u}{v},$

then the equation becomes $2\left( \dd{u}{v}\right)^2 + u^2 = \frac{E}{h^2} u^4.$

Now if we make the transformation $w = 1/u$, then this equation becomes $$\label{wv} 2\left( \dd{w}{v}\right)^2 + w^2 = \frac{E}{h^2}.$$

Taking a derivative of this equation gives $\dd{^2 w}{^2 v} + \frac{1}{2} w = 0,$

and so $w = A\cos(\frac{1}{\sqrt{2}}(v - v_0)$. Instead of writing the solution as a sum of a sine and cosine, we have written it here as a cosine with a phase shift (why is this allowed?). Re-substituting this form into \ref{wv}, we get the solution $w(v) = \frac{\sqrt{2E}}{h} \cos\left[\frac{1}{\sqrt{2}}(v - v_0)\right],$

or in terms of $u$, $u \cos\left[\frac{1}{\sqrt{2}}(v - v_0)\right] = \frac{h}{\sqrt{2E}}.$

If we make the substitution $X = u\cos (v/\sqrt{2})$ and $Y = u\sin (v/\sqrt{2})$, we see that this implies that the geodesics are given by $X\cos(v_0/\sqrt{2}) + Y\sin(v_0/\sqrt{2}) = h/\sqrt{2E}$, which are straight lines in $(X,Y)$-space.

## 2. Euler-Lagrange for higher-order problems

The derivation of the Euler-Lagrange equation is straightforward using the Taylor expansion for \begin{multline*} F(x, y + \alpha \eta, y' + \alpha \eta', y'' + \alpha \eta'') = F(x,y,y',y'') \\ + \alpha \left[ \pd{F}{y} \eta + \pd{F}{y'}\eta' + \pd{F}{y''}\eta''\right] + O(\alpha^2). \end{multline*}

The integral of the $O(\alpha)$ terms is then treated in the usual way by integration by parts, and this yields the necessary result of $\pd{F}{y} - \dd{}{x}\pd{F}{y'} + \dd{^2}{x^2}\pd{F}{y''} = 0.$

When assuming $\pd{F}{y} = 0$, the reduced equation leads immediately to the result. For the second result when $F_x \equiv 0$, examine $\dd{F}{x} = \pd{F}{x} + y'\pd{F}{y} + y''\pd{F}{y'} + y'''\pd{F}{y''},$

and use the Euler-Lagrange equations (and the chain rule) to show that $\dd{}{x} \left[ F - y'F_{y'} + y' \dd{}{x}F_{y''} - y'' F_{y''}\right] = 0,$

which is then integrated for the desired result.

## 3. A constrained problem in three dimensions

We wish to minimize $I[u]$ subject to the constraing for $J[u]$ given by \begin{gather*} I[u] = \iiint_V (u_x^2 + u_y^2 + u_z^2) \, \de{V}, J[u] = \iiint_V u \, \de{V} = 4\pi. \end{gather*}

This problem can be shown to be equivalent to the search for the extremum of $I[u] - \lambda J[u]$ where $\lambda$ is a Lagrange multiplier. That is, if we set $\overline{F} = (u_x^2 + u_y^2 + u_z^2) - \lambda u$, we simply need to solve the Euler-Lagrange equation $\dd{}{x_i} \pd{\overline{F}}{u_{x_i}} - \pd{\overline{F}}{y} = 0.$

Computation then gives $\nabla^2 u = - \frac{\lambda}{2}.$

We argue based on the symmetry of the problem that $u$ must be axi-symmetric, so that in spherical coordinates, $u = u(r)$. Solving the Poisson equation above then involves $\frac{1}{r^2} \dd{}{r} \left(r^2 \dd{u}{r}\right) = -\frac{\lambda}{2}$

which is easily integrated. Along with the boundary condition $u = 1$ on $r = 1$, we also require that $u$ is bounded as $r \to 0$. This gives $u = Cr^2 + (1 - C),$

for some constant $C$ (replacing the Lagrange multipler). We now integrate the constraint, $\int_0^{2\pi} \int_0^\pi \int_0^1 u \, r^2 \sin\phi \, \de{r} \, \de{\phi} \, \de{\theta} = -\frac{4\pi}{15}(-5 + 2C) = 4\pi,$

giving $C = -5$ and the final solution of $u = 6 - 5(x^2 + y^2 + z^2)$.

## 2. Elasticity and bending beams

First, let us vary the argument of the energy and seek an extrema. We set $y = y + \alpha \eta$, and expand $E[y + \alpha \eta] = \int_0^L \left[ \frac{1}{2} K (y'' + \alpha \eta'')^2 + \rho g(y + \alpha \eta) \right] \, \de{x}.$

Expansion then gives $E[y + \alpha \eta] = E[y] + \alpha \int_0^L \left[ K y'' \eta''+ \rho g \eta \right] \, \de{x} + \mathcal{O}(\alpha^2).$

Integration by parts and then equating the $O(\alpha)$ terms to zero then gives the necessary condition $$\label{allcond} K (y'' \eta' - y'''\eta)\biggr\rvert_0^{L/2} + \int_0^{L/2} \left[ Ky'''' + \rho g\right]\eta \, \de{x}.$$

Let the two portions of the beam be $y_1$ and $y_2$. We then require the following conditions: \begin{gather} y_1(0) = 0 = y_2(L) \\ y_1''(0) = 0 = y_2''(L) \\ y_1(L/2) = y_2(L/2) \\ y_1'(L/2) = y'(L/2) \\ y_1''(L/2) = y_2''(L/2) \end{gather}

The first and second conditions guarantee that the boundary terms in \eqref{allcond} at the points $x = 0, L$ disappear. The third and forth conditions are obvious' from the requirements of having a continuous and smooth beam. The fifth line follows from forcing $\eta' = 0$ at $x = L/2$. We now seek to solve $y'''' = -\frac{\rho g}{K},$

on either side of the beam. We can then show that $y_1(x) = \frac{1}{6} x^3 \left(-\frac{3 A L}{16}-\frac{24 h}{L^3}\right)+x \left(\frac{A L^3}{384}+\frac{3 h}{L}\right)+\frac{A x^4}{24},$

with $A = -\rho g/K$ and $y_2(x) = y_1(L-x)$.

To compute the force, we note that there are effectively four forces at play: normal forces generated at the ends and also at the peg, and also the gravitational force downwards. Since the centroid is $x = L/2$, we can examine the work done by the forces at the peg, $E[h] = \int^h F \, \de{s}$, now a function of the peg height so that $F(h) = \dd{E}{h}$. We must now compute $F = \dd{}{h} \int_0^L \left[ \frac{1}{2} K (y'')^2 + \rho gy \right] \, \de{x},$

with the solution above. This gives $F(h) = \frac{48 h K}{L^3} + \frac{5 \rho g L}{8}.$

We now equate this force to the weight of the board, $\rho g L$ and this gives $h = \rho g L^4/128K$. Indeed, we can verify that at this height, $y''' = 0$ at the ends of the board, so the boundary condition in \eqref{allcond} does not require us to apply a condition on the heights of the board.

We can also set $F = 0$ and solve for $\rho$ to find $\rho = -384 h K/ 5gL^4 < 0$. At this density, there is no force from the peg, so we could have removed the peg entirely and guaranteed that the height is at $y(L/2) = h$.

## 3. Sturm-Liouville eigenfunctions

The ODE is placed into Sturm-Liouville form by multiplying by an integrating factor: $y'' + \frac{P_1}{P_2} e^{\int^x \frac{P_2}{P_1} \, \de{x}} y' + \frac{P_0}{P_2} e^{\int^x \frac{P_2}{P_1} \, \de{x}} y = -\lambda \frac{R}{P_2} e^{\int^x \frac{P_2}{P_1} \, \de{x}} y,$

so that it becomes $\left( y' e^{\int^x \frac{P_2}{P_1} \, \de{x}}\right)' + \left[\frac{P_0}{P_2} e^{\int^x \frac{P_2}{P_1} \, \de{x}}\right] y = -\lambda \left[\frac{R}{P_2} e^{\int^x \frac{P_2}{P_1} \, \de{x}}\right] y,$

which is now in Sturm-Liouville form. The key is that we can show (by taking the inner product' of both sides of the ODE that the eigenvalues, $\lambda_n$, corresponding to eigenfunctions, $y_n$, are given by $\lambda_n = \frac{\frac{1}{2}\int_0^1 y'^2 \, \de{x}}{\frac{1}{2} \int_0^1 y^2 \, \de{x}} \equiv \frac{I[y_n]}{J[y_n]}.$

It is known throught the theory of Sturm-Liouville problems1) the eigenvalues must be real and form an increasing sequence, $\lambda_1 < \lambda_2 < \ldots \to \infty$. This implies that the eigenfunctions we seek must be a minimum of $I[y]-\lambda J[y]$, that is, a minimum of $I[y]$ subject to $J[y] =$ constant. The trick of the Rayleigh-Ritz test is to use a sequence of functions $w_j$ such that $I[w_j] > I[w_{j+1}]$. If we can do this, then the limit of $w_j$ as $j \to \infty$ should be the minimum we are looking for.

For example, with the trial function $w_1^{(1)} = x(1-x)$ (which satisfies the boundary conditions $w_1^{(1)}(0) = 0 = w_1^{(1)}(1)$, we obtain an approximation $\lambda_1 \approx \frac{\frac{1}{2}\int_0^1 [w_1^{(1)}]'^2 \, \de{x}}{\frac{1}{2} \int_0^1 [w_1^{(1)}]^2 \, \de{x}} = 10.$

We could continue and find another $w_1^{(2)}$, $w_1^{(3)}$, and so on to find a better approximation. But let us move on to approximate the next eigenvalue $\lambda_2$. We know that the next eigenfunction, $y_2$ muyst be orthogonal to $y_1$. Therefore, we can create a class a functions, $(w_j^{(2)})$ that are all orthogonal to $w_1^{(1)}$. Let us search for a single one. We assume that $w_2^{(1)} = A(1-x)^3 + B(1-x) + C(1-x) + D.$

Applying the boundary conditions gives $D = 0$ and $C = -A - B$. We force it to be orthogonal, $\int_0^1 [x(1-x)][A(1-x)^3 + B(1-x)^2 + (-A - B)(1-x)] \, \de{x} = 0,$

giving $B = -3A/2$. The value of $A$ can be chose arbitrarily. Computing now $\lambda_2 \approx \frac{\frac{1}{2}\int_0^1 [w_2^{(1)}]'^2 \, \de{x}}{\frac{1}{2} \int_0^1 [w_2^{(1)}]^2 \, \de{x}} = 42,$

and we note that the exact value is $\lambda_2 = 4\pi^2 = 39.4784\ldots$.

## 4. Minimization in the Dido problem

We seek to minimize $\overline{F} = 2\sqrt{y}\dot{x} - \lambda \sqrt{\dot{x}^2 + \dot{y}^2}.$

The Euler-Lagrange equations in $x$ and $Y$ give \begin{gather} 2\sqrt{y} - \lambda \biggl[\frac{\dot{x}}{\sqrt{\dot{x}^2 +\dot{y}^2}}\biggr] = \text{const.} \label{el1} \\ \frac{\dot{x}}{\sqrt{y}} + \lambda \dd{}{t} \biggl[\frac{\dot{y}}{\sqrt{\dot{x}^2 + \dot{y}^2}}\biggr] = 0, \label{el2} \end{gather}

along with the two boundary conditions $$\label{bc} \eta \pd{\overline{F}}{\dot{y}} \biggr\rvert_{t_0}^{t_1} = 0 \qquad \text{and} \qquad \eta \pd{\overline{F}}{\dot{x}} \biggr\rvert_{t_0}^{t_1} = 0.$$

The boundary condition $y = 0$ at either end guarantees that the first of \eqref{bc} is satisfied. The reamining boundary condition can be checked to be satisfied if $y = 0$ and $\dot{x} = 0$ at either ends. In fact, we can verify that these latter conditions will force the constant in \eqref{el1} to be zero. Temporarily assuming that $y = y(x)$, we can then put \eqref{el1} into the form $\sqrt{y} \sqrt{1 + (y')^2} = \frac{\lambda}{2},$

which we may recognize as the same equation that determines the shape of the brachistochrone problem! It is not entirely trivial to derive the solution directly (the hint is to substitute $y(t) = C\sin^2(t/2)$), so we will assume that the solution form is $$\label{solform} x = \frac{L}{8}(t - \sin t), \quad y = \frac{L}{8}(1 - \cos t), \quad t\in [0, 2\pi].$$

The pre-factor $L/8$ in \eqref{solform} was chosen so that $\int_0^{2\pi} \sqrt{\dot{x}^2 + \dot{y}^2} \, \de{t} = L.$

Substitution of \eqref{solform} into \eqref{el1} gives $\sqrt{L} \sin(t/2) = \lambda\sin(t/2),$

so that we require the Lagrange multipler to be given by $\lambda = \sqrt{L}$. Similarly substitution of \eqref{solform} into \eqref{el2} confirms that the solution form works. The total value of the land is $F = \int_0^{2\pi} 2\sqrt{y} \dot{x} \, \de{t} = \frac{2}{3} L^{3/2}.$

Thus, the value per distance $L$ of the boundary is $2/3 L^{1/2}$ and each extra unit of size $L$ added to the boundary increases the value by $L^{1/2}$—which is indeed the value of the Lagrange multipler.

1) this only works for regular SL problems