Catenary from hyperbolic cosine (source code)

= Catenary from hyperbolic cosine
{title2=$y=a\cosh(x/a),\quad a>0$}

A <catenary> is the static shape of an ideal flexible, inextensible chain hanging under its own <gravitational weight> in a <uniform gravitational field>, with uniform <linear mass density> along its <arc length>. With the lowest point above $x=0$, one convenient vertical origin gives
$$
y(x)=a\cosh(x/a),\qquad a>0.
$$
Here $a$ has units of <length>. The supports and the chain's <arc length> determine the scale and position; horizontal and vertical shifts give the general <catenary>. https://www.damtp.cam.ac.uk/user/reh10/lectures/nst-mmii-handout3.pdf[Robert Hunt, Cambridge Mathematical Methods II: worked example, The Catenary]{ref}

For $a=1$, the three points at $x=-1,0,1$ have heights $\cosh1\approx1.543081$, $1$, and $\cosh1\approx1.543081$. If heights should instead be measured from the lowest point, subtract $a$:
$$
y_{\mathrm{shifted}}(x)=a\bigl(\cosh(x/a)-1\bigr).
$$
The same three heights are then approximately $0.543081$, $0$, and $0.543081$. The shift changes the vertical origin and preserves the <catenary> shape.

\Image[/hyperbolic-cosine-catenary.png]
{title=A hanging chain follows a scaled hyperbolic cosine, with an optional shift of its lowest point to zero}
{description=The left panel marks $x=-1,0,1$ on $y=\cosh x$. The right panel puts the lowest point at zero, compares three positive scales $a$, and shows the local <parabola> $y=x^2/2$ for $a=1$.}

The scale also measures <tension>: if $H>0$ is its constant horizontal component, $\mu$ is the <linear mass density>, and $g$ is the magnitude of <gravitational acceleration>, then $a=H/(\mu g)$. A short <force> balance explains this. For the portion from the lowest point to $x\geq0$, with <arc length> $s(x)$, vertical <tension> balances its <gravitational weight> and horizontal <tension> gives
$$
Hy'(x)=\mu g\,s(x),\qquad s'(x)=\sqrt{1+y'(x)^2}.
$$
Applying <differentiation> yields $ay''=\sqrt{1+y'^2}$. The proposed <hyperbolic cosine> solves this <differential equation>, because $y'=\sinh(x/a)$ and $ay''=\cosh(x/a)=\sqrt{1+\sinh^2(x/a)}$. This is the mechanism behind the shape, under the stated ideal chain assumptions.

The same identity simplifies the <arc length> between symmetric supports at $x=\pm b$:
$$
L=\int_{-b}^b\sqrt{1+y'(x)^2}\,dx=\int_{-b}^b\cosh(x/a)\,dx=2a\sinh(b/a).
$$
For $a=b=1$, $L\approx2.350402$, exceeding the horizontal span of two. A larger $a$ at fixed $b$ gives a shallower sag: the <Taylor series> gives $a(\cosh(x/a)-1)=x^2/(2a)+x^4/(24a^3)+\cdots$. Thus a <parabola> is a local approximation, while the exact ideal chain shape is a <catenary>. The useful connection is that the same <hyperbolic Pythagorean identity> controls its coordinates, <force> balance, and <arc length>.