# Numerical Solutions to the Variational Problems by [PERSON]'s Path-Finding Algorithm
## 7 Catenary Problem  
Consider a rope hanging between two fixed supports of the same height by its own weight. The catenary problem involves finding the shape of the rope. The problem was solved independently for the ideal case where the linear density of the rope is a constant by [PERSON], [PERSON], and [PERSON] in 1691 [33]. The name catenary was coined by [PERSON] in 1690, which in Latin means a chain. The curve has many applications in architecture and engineering. The inverted catenary arch, with no additional load or stress placed upon it, will produce no excess shear or pressure on its building materials. It can stand on its own indefinitely with no outer support or maintenance [34]. In civil engineering, the catenary curve is used in the design of hanging cables where the maximum tension is minimum [35]. Interestingly, the catenary curve has been adapted to approximate interesting curves in some medical applications, e.g., the dental arches [36,37] and the women's breast contours [38]. The shape of a catenary curve can be obtained by minimizing the potential energy of the rope. Since the gravitational force points vertically downward, the rope will lie on a vertical plane, which we define as the xy-plane. Thus, the problem is two-dimensional. If the shape of the rope is described by the functions y(x), the potential function can be written as  
\[\mathrm{U=}\int\mu\mathrm{gy}\;\mathrm{ds}\;=\int\mu\mathrm{gy}\;\sqrt{1+{ \mathrm{y^{\prime}}}^{2}}\mathrm{dx}\;, \tag{30}\]  
where \(\mu\) is the linear density of the rope. Note that the reference level of the potential energy is at \(y=0\). Here, we have \(\mathrm{F=\mu g}\sqrt{1+{\mathrm{y^{\prime}}}^{2}}\). Since \(\mathrm{F}\) does not explicitly depend on x, we can use the Euler-Lagrange Equation (25) to find the optimum shape of the rope. With some algebra, we have [39]  
\[\mathrm{y^{2}=a^{2}\left(1+{\mathrm{y^{\prime}}}^{2}\right)}, \tag{31}\]  
where a is a constant. The solution of this equation has the form of a hyperbolic cosine function:  
\[\mathrm{y=acosh\left(\frac{x}{a}\right)}. \tag{32}\]  
Here, we set the lowest point of the rope on the y-axis at the position \(\mathrm{y=a}\). We can see that the length of the rope depends on the vertical distance of the supporting points and the lowest point of the rope. In practice, this length is usually specified. This catenary problem with a specific length is an example of the isoperimetric problem, which is a class of variational problems subject to a constraint with the form of an integral. For the catenary problem, the constraint can be expressed as \(\mathrm{L_{r}=\int ds}\), where \(\mathrm{L_{r}}\) is the length of the rope. To solve the problem, we can use the technique of Lagrange multiplier [1]. By rewriting the function as  
\[\mathrm{F=}(\mu\mathrm{gy}+\lambda)\sqrt{1+{\mathrm{y^{\prime}}}^{2}}, \tag{33}\]  
the adjustable parameter \(\lambda\) can be used to relax the minimization condition to incorporate the length constraint. The solution of the Euler-Lagrange equation for the functional in Equation (33) is  
\[\mathrm{y=a+}\frac{\mathrm{b}}{\mu\mathrm{g}}\Big{[}\cosh\left(\frac{\mu \mathrm{gx}}{\mathrm{b}}\right)-1\Big{]}. \tag{34}\] \begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{\(\mathbf{y_{end}}\)} & \multicolumn{2}{c}{**ToF**} \\ \cline{2-3}  & **Dijkstra’s Algorithm** & **Exact Solutions** \\ \hline
0 & 15.862 & 15.853 \\
10 & 12.004 & 12.000 \\
20 & 11.287 & 11.283 \\
30 & 11.253 & 11.250 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of the ToF between the simulation and exact solutions. Here, \(\lambda=\text{bcosh}(\mu\text{g}\text{x}_{\text{s}}/\text{b})\), and \(\pm\text{x}_{\text{s}}\) are the x-coordinate of the supporting points of the rope.