## Calculus of Variations Part 2: Lines, Bubbles, and Lagrange

In the first part, we discussed the idea of a functional, what it means, and how to find its extrema using the calculus of variations. However, those equations don’t really capture how amazing and applicable calculus of variations really is so the following will be some examples of this. In fact, the drawn out results from the posts The Shape of a String and The Lagrangian are just two cases of the one equation.

1. Line

This is probably the simplest example. What function $y$ takes the shortest path between two points $(a,A)$ and $(b,B)$? Well, the length of the function can be calculated by the following integral which is also the functional we wish to minimize. $\displaystyle \int_a^b \sqrt{1+y'^2}\textup{d}x=\int_a^b S(x,y,y')\textup{d}x$

Where $S=\sqrt{1+y'^2}$. We know use the $x$-independent Euler equation. $\displaystyle S-y'\frac{\partial S}{\partial y'}=c$ $\displaystyle \sqrt{1+y'^2}-y'\frac{y'}{\sqrt{1+y'^2}}=c$ $\displaystyle 1+y'^2-y'^2=c\sqrt{1+y'^2}$ $\displaystyle y'=\sqrt{\left(\frac{1}{c}\right)^2-1}$ $C=\sqrt{\left(\frac{1}{c}\right)^2-1}$ is simply a large constant. $\displaystyle y=Cx+D$

We have essentially just proved the shortest distance between two points is a line. As trivial as this may sound, it is not true in other matric spaces and it is important to know exactly how to calculate this minimal distance points in any metric.

2. Brachistochrone

If we were to roll a ball down a track, what should the track’s shape be such that it minimizes the travel time between two points A and B. The Brachistochrone problem is the famous problem of finding the optimal track to roll a particle down such that it minimizes the time taken to do so. It is simply one case of Euler’s equation. First let us determine the integral to be solved. Consider the time $\textup{d}t$ it takes to roll down a segment $\textup{d}s$. From conservation of energy, we know the speed of the particle is $\sqrt{mgy}$. This means $\textup{d}t=\frac{\textup{d}s}{\sqrt{mgy}}$. We know $\textup{d}s=\sqrt{1+y'^2}\textup{d}x$ so $\textup{d}t=\sqrt{\frac{1+y'^2}{mgy}}\textup{d}x$. This means the integral we wish to minimize is the following. $\displaystyle \int_{t_1}^{t_2} \textup{d}t=\int_{x_1}^{x_2} \sqrt{\frac{1+y'^2}{mgy}}\textup{d}x = \int_{x_1}^{x_2} B(x,y,y')\textup{d}x$

Where $B=\sqrt{\frac{1+y'^2}{mgy}}$. Once again, the $x$-independent Euler equation is applied. $\displaystyle B-y'\frac{\partial B}{\partial y'}=c$ $\displaystyle \sqrt{\frac{1+y'^2}{mgy}}-y'\frac{y'}{\sqrt{mgy(1+y'^2)}}=c$ $\displaystyle 1+y'^2-y'^2=c\sqrt{mgy(1+y'^2)}$ $\displaystyle \frac{1}{(mgc^2)}\frac{1}{y}-1=y'^2$ $C=\frac{1}{(mgc^2)}$ is a constant. $\displaystyle \frac{C}{y}-1=y'^2$

This is the equation for a cycloid, the solution to the Brachistochrone problem.

3. The Shape of a String

As previously mentioned, I have approached this problem in a previous post: The Shape of a String. However, the method I used required the consideration of many variables unlike calculus of variations. The problem is determining the function $y$ that describes the shape of a string at rest when hung. Once again, we must determine the integral being minimized. A law of nature is that systems tend toward low potential energy and similarly a string would as well. If we consider a small part $\textup{d}s$ of the string, we know it has length $\sqrt{1+y'^2}\textup{d}x$. Assuming uniform mass density $\rho$, we know this element has a mass $\textup{d}m=\rho\sqrt{1+y'^2} \textup{d}x$ so it has a potential energy $\textup{d} U=\textup{d} m\cdot gy=\rho gy\sqrt{1+y'^2}\textup{d}x$. The integral we then wish to minimize is the following. $\displaystyle \int \textup{d}U=\int_{x_1}^{x_2} \rho gy\sqrt{1+y'^2}\textup{d}x$ = $\int_{x_1}^{x_2} V(x,y,y')\textup{d}x$

As usual … $\displaystyle V-y'\frac{\partial V}{\partial y'}=c$ $\displaystyle \rho gy\sqrt{1+y'^2}-y'\frac{\rho gyy'}{\sqrt{1+y'^2}}=c$ $\displaystyle \rho gy(1+y'^2-y'^2)=c\sqrt{1+y'^2}$ $\displaystyle \left(\frac{\rho g}{c}\right)^2y^2=1+y'^2$ $C=\frac{\rho g}{c}$ is just a constant. $\displaystyle C^2y^2=1+y'^2$ $\displaystyle y=\frac{\cosh{Cx}}{C}$

Against intuition, it seems the string forms the shape of a hyperbolic cosine.

4. Shape of Bubbles

Imagine having a soap bubble connected by two rings. What shape would it form? Well, intuitively it would be symmetric around the axis from one ring center to the other. This hints at a surface of revolution. Because it is a bubble, it would also try to minimize surface area. To calculate the surface area of any surface of revolution, we use the following integral. $\displaystyle \int_{x_1}^{x_2} 2\pi y\sqrt{1+y'^2}\textup{d}x = \int_{x_1}^{x_2} R(x,y,y')\textup{d}x$

Where $R(x,y,y')=2\pi y\sqrt{1+y'^2}$. Before getting into the integration, we simple make note of the fact that this is of the exact same form of the last integral so we know it has the same solution. As a result, it seems that the bubbles would end up minimizing surface area by forming a revolved hyperbolic cosine or catenoid as shown below. 5. Lagrangian Mechanics

Notice any similarities between Euler’s equation and the Euler-Lagrange equation from The Lagrangian? Let me give you a hint. $\displaystyle \frac{\partial F}{\partial y}-\frac{\textup{d}}{\textup{d}x}\frac{\partial F}{\partial y'}=0$ <—Euler Equation $\displaystyle \frac{\partial L}{\partial y}-\frac{\textup{d}}{\textup{d}x}\frac{\partial L}{\partial y'}=0$ <—Euler-Lagrange Equation

Lagrangian mechanics is simply an application of calculus of variations and this alone should show why calculus of variations is so important.

I haven’t even begun to talk about more variables, higher order derivatives, or more functions but this is definitely a good introduction into this wonderful field of mathematics.

### One response to “Calculus of Variations Part 2: Lines, Bubbles, and Lagrange”

1. Anonymous says:

good content

Like