Modelling Question
Further readings
Bukowski, 2008 on Christian Huygens study of the hanging chain.
Clifford Truesdell, The Rational Mechanics of Flexible or Elastic Bodies, 16381788, 1960, also on the hanging chain.
A First Course in the Calculus of Variations by Mark Kot, 2014,has a beautiful collection of case studies.
Variational Principles of Mechanics (free) by Cornelius Lanczos, 1949 is a very readable classic text.
Introduction to the Mathematical Theory of Control by Bressan and Piccoli, 2007, is a concise modern formal treatment.
Lecture Notes on the Calculus of Variations (free) by Oskar Bolza,1904
One of the greatest mathematical puzzles of the 1600's was to find the equation for the shape of a chain hanging between two fixed points. Like many puzzles, nobody really recognized at first that it was a puzzle. We can trace the roots back to one of Leonardo da Vinci's notebooks. Leonardo sketched the shape of a hanging chain, and erroneously asserted that if the supports are not of equal height, then the lowest point of the chain "...will touch the earth nearer to the lower support than to the higher, and in the proportion that the height of the lesser goes into the greater." From there, a succession of natural philosophers, including Isaac Beeckman, Mersenne, Galileo, Huygens, Pardies, and Hooke ruminated on the shape of the hanging chain and the related problem of the suspension bridge.
Fix high up on a wall two nails equally distant from the horizontal ... and from them hang a little thin chain ...; this little chain will bend itself into a parabolic figure.  Galileo, Discorsi, 1638
And now let this problem be proposed: To find the curve assumed by a loose string hung freely from two fixed points. I assume also that the string is a line which is easily flexible in all its parts  James Bernoulli, Acta Eruditorum, May, 1690
There appears to have been some confusion about the distinction between the bridge and chain problems, as Galileo repeated the common belief of his time that the shape of a hanging curve was a parabola. This is approximately true in some cases, but not in general. The nowclassic solution arises from a problem proposed by Jakob Bernoulli from 1691. Robert Hooke figured out that if you flip a hanging chain over, it will be the "perfect" shape for an archway, as the forces from the weight of the stone itself flow along the curve of the arch. Clifford Truesdell wrote a very interesting history of the subject.
Suppose we need to hang a rope between two telephone poles and we want to make sure the rope won't come down too close to garage roof. The more slack is in the rope, the farther down it will hang, but we cannot tell howfar down because the rope hangs with a curve. But we can use dimensional analysis to find a relation between the lowest point of a rope hanging between two anchor points of equal height. Call the depth \(d\) the height from the top of the anchor points to the lowest point on the rope. Well, \(d\) might depend on the length of the rope \(s\), the width \(w\) between the anchors, the density of the rope \(\rho\), and the acceleration of gravity \(g\) through a general function relationship \[ f( d, w, s, \rho, g) = 0.\] The dimensions of a variables will be denoted square brackets [], and the fundamental units will be represented by letters (L)ength, (M)ass, and (T)ime. So,
Now, let's try to analyze this equation. It is a very general formula – it isn't even solved for one of the variables – but the variables do have units, and that helps. Maybe we can convert the units of these variables to something convenient. We can use conversion factors \(\lambda _ M\) for units of mass, \(\lambda _ L\) for units of length, and \(\lambda _ T\) for units of time. Then, whatever conversion factors we pick, \[ f( d \lambda _ L, w \lambda _ L, s \lambda _ L, \rho \lambda _ M \lambda _ L^{1}, g \lambda _ L \lambda _ T^{2}) = 0 \] Close inspection shows that time and mass each only appear once in this equation. With some thought, taking \(\lambda _ L = 1/s\) , \(\lambda _ M = {1}/{\rho s}\) , \(\lambda _ T = \sqrt{g/s}\), will lead to \[f\left( \frac{d}{s}, \frac{w}{s}, 1, 1, 1 \right) = 0.\] So, the rope's depth \(d\) will only depend on the rope's length \(s\) and the distance between the anchors \(w\). The density \(\rho\) of the rope and the strength of gravity \(g\) have no effect. And this makes some sense  heavy chains and pieces of thread all seem to hang the same way in common experience. The other feature here is that the aspect ratios \(d/s\) and \(w/s\) are dimensionless numbers  for a given physical problem, these same aspect ratios will give the same number, no matter what units we choose for our measurements!
Solving for \(d\), and using a new function \(\phi()\) to express the unknown dependence, \[ d = s \phi\left(\frac{w}{s} \right).\]
If the rope's length equal the width between the anchors (\(s=w\)), the rope has to be perfectly straight, so we should have \(d=0\). On the other hand, when the anchors are right next to each other (\(w=0\)), we expect the depth to be half the length (\(d = s/2\)). These imply \(\phi(0) = 1/2\), \(\phi(1) = 0\), and \(\phi()\) is a monotone decreasing function in between. So, we have determined quite allot about the shape of a hanging rope without doing very much math.
But as a headsup, you should be warned that we got rather lucky in choosing to normalize our variables by the rope's length rather than the width between anchors. If we had normalized by the width \(w\), we would arrive at the alternative dimensionless relationship \(d = w \psi\left(\frac{s}{w} \right)\). While algebraically equivalent to our first dimensionless relationship for the depth \(d\), this form is indeterminate when \(w=0\); we would get in that case \(0 \times \psi(\infty)\). Our normalization by the rope length \(s\) avoided this issue since for all physically meaningful versions of the problem, the length \(s\) will always be positive. For new problems, the best choice of normalization factors may not initially be obvious, and it may be worthwhile to consider more than one possibility.
There are several different approaches for trying to come up with an equation for the shape of a hanging chain.
We'll use the first approach, because it works directly, without first having to develop any new mechanical or mathematical concepts beyond Newton's laws. Let us imagine our chain has very fine small links, so it appears smooth and very flexible (perhaps more like a cable than a chain). This is so we don't have to get in arguments about angles associated with individual pairs of links, but we should keep in mind as a possible source of errors.
So, consider a chain of length \(s\) hanging between two supports a distance \(w\) apart.
The length, of course, must be creater than the support separation (\(s>w\)) The chain is fully at rest, not moving. At each point along the chain, there is no acceleration, so the forces of gravity and tension in the chain must be perfectly balanced. We can write this balance of forces as
\[F _ {left} + F _ {right} + F _ {gravity} = \vec{0}\]
So, let's determine these forces. Let \(y(x)\) be the height of the chain at each location \(x\), and that the chain has a uniform thickness and density \(\rho\) everywhere. At each point \(x\), there is a little piece of chain of length \(2 \mathrm{d} x\), \(\mathrm{d} x\) to the left and \(\mathrm{d} x\) to the right. The forces are tension to the left and right, and gravity pulling down on that part of the chain. The forces from the tension in the chain must point approximately along the chain. Near the point \(x\), The dominant parts of the tension forces are then \[F _ {left} = k _ L(x)\begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} \end{pmatrix}\] and \[F _ {right} = k _ R(x) \begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} \end{pmatrix}\] where \(k _ L(x)\) and \(k _ R(x)\) are the unknown magnitudes of the forces. Assuming there is a sizable piece of chain to both the left and right of \(x\), though, we expect \(k _ L(x) \gg 0\) and \(k _ R(x) \gg 0\).
Now, let us look at gravity. We know that gravity must be important because without gravity, the chain could hang in arbitrary shapes or flap in the wind. Assume we are looking at a very short pieces of the chain that is nearly straight, then the force from gravity will be \[F_{gravity}=\rho g 2 \mathrm{d} s \begin{pmatrix} 0 \\ 1 \end{pmatrix}\] where \(2 \mathrm{d} s\) is the length of the piece of chain between \(x\mathrm{d} x\) and \(x+\mathrm{d} x\). Using the arclength derivation from calculus, we can show that \(\mathrm{d} s = \mathrm{d} x \sqrt{1+y'^2}\). Therefore our forcebalance equation gives \[\begin{gather} F _ {left} + F _ {right} + F _ {gravity} = \vec{0} \\ k _ L(x)\begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} \end{pmatrix}+k _ R(x) \begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} \end{pmatrix}+\rho g 2 \mathrm{d} s \begin{pmatrix} 0 \\ 1 \end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix} \end{gather}\]
Since the length of rope is very short, the force of gravity is very small relative to the two tension forces. Thus, the main part of the force balance is \[k_L(x) \begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} \end{pmatrix} + k_R(x) \begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}\] This implies that we must have \(k_L(x) = k_R(x)\). Further, this must be the same everywhere between the two ends of the chain, so this constant should not depend on \(x\). Thus, we can can just call it \(k\), with the understanding that \(\partial k/\partial x = 0\).
We know that gravity must be important because without gravity, the chain could hang in arbitrary shapes or flap in the wind. What we have done so far assumes the chain is straight, but in reality it must be curved.
\[F _ {left} = k \begin{pmatrix} 1 \\ y'(xdx) \end{pmatrix} = k \begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} + \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \mathrm{d} x \end{pmatrix},\]
Using the theory of Taylor series, \[y(x+\mathrm{d} x) = y(x) + \frac{\mathrm{d} y}{\mathrm{d} x} \mathrm{d} x + \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \frac{1}{2} \mathrm{d} x^2 + \ldots \quad \text{and} \quad y(x\mathrm{d} x) = y(x)  \frac{\mathrm{d} y}{\mathrm{d} x} \mathrm{d} x + \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \frac{1}{2} \mathrm{d} x^2 + \ldots\]
Substituting, \[F _ {left} = k \begin{pmatrix} 1 \\ y'(xdx) \end{pmatrix} = k \begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} + \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \mathrm{d} x+\textrm{h.o.t} \end{pmatrix},\] and \[F_{right} = k \begin{pmatrix} 1 \\ y'(x+dx) \end{pmatrix} = k \begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} + \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \mathrm{d} x+\textrm{h.o.t} \end{pmatrix}\] Back to our force balance, \[F_{left} + F_{right} + F_{gravity} = k \begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} + \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \mathrm{d} x+\textrm{h.o.t} \end{pmatrix} + k \begin{pmatrix} 1 \\ \frac{\mathrm{d} y}{\mathrm{d} x} + \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \mathrm{d} x+\textrm{h.o.t} \end{pmatrix} + \rho g 2 \mathrm{d} s \begin{pmatrix} 0 \\ 1 \end{pmatrix}\] \[= \begin{pmatrix} 0 \\ 2 k \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \mathrm{d} x  \rho g 2 \mathrm{d} x \sqrt{1+\left(\frac{\mathrm{d} y}{\mathrm{d} x}\right)^2}+\textrm{h.o.t} \end{pmatrix}\] Focusing now on the vertical component, dividing out the \(\mathrm{d} x\) and letting \(dx\rightarrow 0\) (so the higher order terms \(\rightarrow 0\)), and rearranging the terms, we find \[\begin{gather*} \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} = \frac{\rho g}{k} \sqrt{ 1 + \left( \frac{\mathrm{d} y}{\mathrm{d} x} \right)^2 } \\ \left( \frac{1}{H} \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \right)^2 = 1 + \left( \frac{\mathrm{d} y}{\mathrm{d} x} \right)^2, \end{gather*}\] where \(H = \rho g/k\). This is the chain equation. Note that we have not determined \(k\)  it is an unknown constant still, and its value depends on the length of the chain and how far the chain anchors are separated.
The chain equation may be solved in closedform, despite being nonlinear. The standard properties of hyperbolic sine and cosine show that \(\cosh^2 \theta = 1 + \sinh^2 \theta\) and that \(\dfrac{d}{d\theta} \sinh(\theta) = \cosh(\theta)\). Fro these properties, it is a direct calculation to show \[\begin{gather} \frac{1}{H} \cosh( H (x + C) ) + K \end{gather}\] is a solution for any values of \(C\) and \(K\). Note that neither constant \(C\) or \(K\) effects the shape of the catenary, only the position. They can be determined by using the positions and heights of the chains two supports. We call these conditions boundary conditions. If we have a chain held up by two supports of equal height and separated by distance \(w\), then we have boundary conditions \(y(w/2)=y(w/2)=0\). Solving for these constants we find \(C=0\), \(K = \cosh(Hw/2)/H\), and \[y(x) = \frac{ \cosh( H x )  \cosh(Hw/2) }{H}\] The shape is controlled completely by \(H\). To find \(H\), we need to make sure the hanging chain as the same length as it did when we started. Thus, \[\begin{align*}s &= \int_{w/2}^{w/2} \sqrt{ 1 + \left( \frac{\mathrm{d} y}{\mathrm{d} x} \right)^2 } \mathrm{d} x \\ &= \int_{w/2}^{w/2} \frac{1}{H} \frac{\mathrm{d}^2 y}{\mathrm{d} x^2} \mathrm{d} x \\ &= \frac{2}{H} \sinh\left(\frac{wH}{2}\right) \end{align*}\] With a little rearrangement, we have \[\frac{s H}{2}= \sinh\left( \frac{w H}{2} \right).\] This is a transcendental equation for \(H\) in terms of the chain length \(s\) and does not have an explicit solution, but can be solved graphically and using 1d root finding as long as \(s > w\). It is helpful to thing of the constant \(H\) as an implicitly defined function of the two fundamental problem parameters  the chain length \(s\) and the support separation \(w\), \(H(s,w)\). The function \(H(s,w)\) will have three useful properties: \(H(w, w) = 0\), homogeneity \(H(\lambda s, \lambda w) = \frac{1}{\lambda} H(s,w)\), and \(\lim _ {s\rightarrow \infty} 1/H(s,w) = 0\).
A fancier approach to this problem is based on Aristotle's idea that nature always does what's best. In this case, we can use Lagrangian mechanics to find the shape of the chain that minimizes the potential energy under the constraint that the chain has fixed length.
The overall idea is to write down an equation for the potential energy of the chain and take the derivative of this with respect to changes in chain shape. Since the derivative should vanish at the minimum potential energy, we set the derivative to zero and solve for the shape. That is also exactly how we would have approached the paroblem in multivariable calculus. The approach will also work here, with a extra elbow grease needed because we are differentiating with respect to a curve rather than a vector.
(see Wan's book and Lancos's book for reference)
To minimize the potential energy of the hanging chain
\[P = \rho g \int _ 0 ^ w y(x) \sqrt{1+\left(\frac{dy}{dx}\right)^2} dx\]
subject to the constraint
\[s = \int _ 0 ^ w \sqrt{1+\left(\frac{dy}{dx}\right)^2} dx\]
We construct the functional with lagrange multiplier L (which is a constant),
\[\rho g \int _ 0 ^ w y(x) \sqrt{1+\left(\frac{dy}{dx}\right)^2} dx + L \left(s  \int _ 0 ^ w \sqrt{1+\left(\frac{dy}{dx}\right)^2} dx \right)\] \[\int _ 0 ^ w (\rho g y(x)L) \sqrt{1+\left(\frac{dy}{dx}\right)^2} dx + s L\] From this, we functionally differentiate with respect to \(y(x)\) to derive the EulerLagrange equation \[\begin{align} 0 = & \frac{\delta}{\delta y} \int _ 0 ^ w (\rho g y(x)L) \sqrt{1+y'^2} dx + \frac{\delta}{\delta y} (L s ) \\ = & \int _ 0 ^ w \frac{\delta}{\delta y}\left\{(\rho g y(x)L) \sqrt{1+y'^2} \right\}dx + 0 \\ = & \int _ 0 ^ w \frac{\delta}{\delta y}\left\{(y(x)\frac{L}{\rho g}) \sqrt{1+y'^2} \right\}dx \\ = & \int _ 0 ^ w \frac{\delta}{\delta y}\left\{(y(x) L ) \sqrt{1+y'^2} \right\}dx \\ = & \int _ 0 ^ w \delta(xu) \sqrt{1+y'^2} + (y(x)L) \frac{1}{2} (1+y'^2)^{1/2} \left( 2 y' \delta'(xu) \right) dx \\ = & \sqrt{1+y'^2}  \frac{\partial}{\partial x} \left\{ \frac{(yL)y'}{\sqrt{1+y'^2}} \right\} \\ = & \sqrt{1+y'^2}  \frac{(y L) y'' + \left(y'\right)^{4} + \left(y'\right)^{2} }{\left(\left(y'\right)^{2} + 1\right)^{\frac{3}{2}}} \\ 0 = & \frac{(Ly) y'' + y'^2 + 1}{(1+(y')^2)^{3/2}} \end{align}\] We note that the denominator is always positive (never zero) and bounded above as long as the first derivative is bounded, in which case we can crossmultiply to get \[0 = (Ly) y'' + y'^2 + 1.\] This nonlinear secondorder equation. It is NOT the same as the equation we derived from first principles  our original version included the square of the second derivative, while this version does not. But it turns out the equations have the same kind of general solution, \[y(x) = L + \frac{1}{H} \cosh( H (x + C) )\] where \(H\) and \(C\) are unknown constants constrained by our arclength condition above.
A simple implementation, using a sequence of nodes on the string.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 

Consider using a potentialformulation for forcedistance calculations.
Solution of the system of ordinary differential equations describing the motion of an elastic rope
Use a graphmodel, which provides a more general solution and can accomodate various truss designs and node masses.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 

In class, we took a photograph of the arc created by a hanging chain, and asked “What determines this curve’s shape?”. http://www.math.psu.edu/treluga/450/hangingchain.png is photo we had taken. The easiest way to think of a camera image is as a sequences of 3 matrices, where each matrix represents the intensity of one color, red, green, or blue ( sometimes, people will use the word “tensor”). Now, using a little python magic (that you may find useful to read and explore), we can extract data from the image like http://www.math.psu.edu/treluga/450/thresholds.png. http://www.math.psu.edu/treluga/450/extractchaindata.py. , I extracted a data set of points on the curve, which you can read at http://www.math.psu.edu/treluga/450/hw04chaindata.txt
Plot the data points \((x_i, y_i)\), so we can see what it looks like. Clearly label your plot.
Using the linear leastsquares methods discussed previously in class, find the coefficients of \(a_n\) of the parabola \[\hat{y}(x) := a_0 + a_1 x + a_2 x^2\] that best approximates the shape of the curve observed in our photo.
Make a new figure with 2 subplots. In the first subplot, show the data and your fit to the data, superimposed over each other. In the second subplot, plot the residuals \([x_i, y_i\hat{y}(x_i)]\).
If your curve is a good fit, to all the data points, the residuals should be "independent", and should not show any patterns. Are your residuals random?
Calculate the total error \(E = \sum_{i}  y_i  \hat{y}(x_i) \) between your curve and the data.
In class, we predicted that the curve should be a catenary of the form \[\tilde{y}(x) = b + c \cosh((xd)/c).\] Try to find the \((b,c,d)\) that minimize the error between the catenary and the data. (Note: you can use your parabola coefficients and the observation that \(\cosh(x) \approx 1 + x^2/2\) to find initial guesses for \(b\), \(c\), and \(d\).
Compare the performance of Galileo's parabola hypothesis and Bernoulli's catenary hypothesis for explaining a hanging chain's shape. Discuss.
What about a general polynomial model of the form \[\hat{y}(x) := a_0 + a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4 + a_5 x^5 + a_6 x^6 ?\]
For a hanging chain, if we move the poles closer by half, how do the minimum and tension change?
Suppose that instead of having a uniform density, we have a chain whose density varies. Can we weight the chain so that it hangs in a circular arc rather than a catenary? If so, what would be the mass distrubition?
Suppose you building a simple rope bridge across a gorge in the Andes mountains. The paths are equal height on either side of the gorge. What length bridge should you build to minimize maximum force exherted on the bridge when it is empty and at rest?
Fermat's principle says that light rays travel the path of leasttime between two points. While Fermat's principle is not quite right, it does explain common phenomena of reflection and refraction at once. Now, the refraction index of a material is define as the ratio of the speed of light in a vacuum to the speed of light in the material \(n = c / v\).
Suppose we'd like to know the path of a light ray from the point \((0,0)\) to the point \((1,0)\) in a medium with refraction index \(n(x,y)\).
\[T = \int_{0}^1 \frac{n(x,y(x))}{c} \sqrt{1 + \left(\frac{dy}{dx}\right)^2} dx\]
Use functional calculus to find a differential equation for the paths of lightrays between these two points.
(Bernoulli's Brachistochrome) Suppose a bead slides down a wire from an initial position \((0,1)\) to a final position \((L,0)\). Find a differential equation describing the shape of the wire which leads to the fastest fall of the bead between these two points.
F. Wan's derivation of the beam equation by functional differentiation. According to (Fung, 1965), (Sampson and the House of Dagon) Consider a vertical column of length \(L\) compressed for a force \(P\). If the potential energy of the Let \(x(y)\) be the narrow displacement of this column from the perfect vertical at each height \(y\), and \(\rho(y)\) be the mass of the column per unit height. The potential energy of the beam is the sum of the bending energy and the gravitational potential energy minus the loss of energy from compression, or approximately \[E[x] = \frac{1}{2} \int_{0}^L EI (x'')^2  P (x')^2 dy\] Use functional differentiation to find an ordinary differential equation that will be satisfied when the potential energy is stationary (either being a minimum or a saddle point).
Suppose we have a large, thick piece of foam, that we compress allong a line using a narrow steel blade. Find an equation for the shape of surface of the foam around the compressed crease. You can assume all deformation is vertical and there is no lateral deformation.
Using an image of the Ead's bridge, extract a graph model of the bridge consisting of coordinates for nodes where steel beams meet and distances between connected nodes.
Although Galileo was incorrect about the shape of the hanging chain, his Galileo's catenary: Show the equation for the forces on an elastic string under the pull of gravity, where the net force at each point is proportional to the second derivative in space leads to the 1d PDE \[m\frac{d^2u}{dt^2} =  \mu \frac{du}{dt} + \frac{d^2u}{dx^2}  mg.\]