This Demonstration plots two catenaries, both of which represent a solution to the Euler–Lagrange equation for the variable-length hanging cable problem. To determine the stability of these solutions, two perturbed catenaries are also plotted, and their lengths and potential energies are computed. You can select the right endpoint, as well as the perturbation parameter, using the slider. By comparing the potential energies of the perturbed and unperturbed catenaries, stability can be ascertained.
For additional information see: A. Mareno and L. Q. English, "The Stability of the Catenary Shapes for a Hanging Cable of Unspecified Length," Eur. J. Phys, 30, 2009 pp. 97–108.