I need to find a general way of expressing a catenary, and I couldn't find anything online.

Is it possible to explicitly find an explicit equation of a catenary which goes through $P_1 = (x_1,y_1)$ and $P_2 = (x_2,y_2)$ (assuming $x_1 \neq x_2$) so that the length of the curve between the two points is $l$ (assuming $l> d(P_1,P_2) = \sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$)?

  • $\begingroup$ The [Wiki article](en.wikipedia.org/wiki/Catenary) has a step-by-step procedure listed under the heading "Determining parameters". $\endgroup$
    – COTO
    Nov 1, 2014 at 3:18

1 Answer 1


As COTO already pointed out in a comment, the section on determining parameters in the Wikipedia article for the Catenary has details on this. The most important part is probably the following, writing $v=y_2-y_1$ for the vertical distance (i.e. the difference in height), $h=x_2-x_1$ for the horizontal distance and $s$ for the length of the curve, i.e. your $l$:

$$\sqrt{s^2-v^2}=2a\sinh\frac h{2a}$$ This is a transcendental equation in $a$ and must be solved numerically. It can be shown with the methods of calculus[49] that there is at most one solution with $a>0$ and so there is at most one position of equilibrium.

So yes, you can compute the parameters, and that section has details on how to do that. But you won't get a single explicit equation to solve, due to the transcendental nature of the problem.

In this post on Stack Overflow (although deemed off-topic there) there is some discussion of how to compute these parameters in a real world application. The core of my answer there is the idea to consider the following equation instead:

$$ \left(\frac{\sqrt{s^2-v^2}}{h}-1\right)^{-1/2} = \left(2b\sinh\frac1{2b}-1\right)^{-1/2} \approx 2\sqrt6b $$

This is using the substitution $b=\frac ah$ and doing a transformation which makes the function almost linear in large parts of the parameter space:


Then you can use Newton's method to find solutions rather quickly. For that you need the derivative

$$\frac{\mathrm d}{\mathrm db}\left(2b\sinh\frac1{2b}-1\right)^{-1/2} = \left(\frac1{2b}\cosh\frac1{2b}-\sinh\frac1{2b}\right) \left(2b\sinh\frac1{2b}-1\right)^{-3/2}$$

Once you have solved the equation, then your original curve would be a suitably translated version of


  • $\begingroup$ Thank you very much for your answer! I couldn't quite follow the instructions from wikipedia but your answer made it so clear, I really appreciate that! I mean you do not get such a high quality answer that often, so thanks! $\endgroup$
    – flawr
    Nov 2, 2014 at 21:19
  • $\begingroup$ Hi, my problem with this is.....that I have 2 fix end points with different x & y co-ordinates. Cable unit length weight is also known. I need to draw catenary curve, and calculate length of cable required. Any help? $\endgroup$ Aug 16, 2016 at 10:26
  • $\begingroup$ @JuliandotNut: With the above approach you can find a curve for any cable length as long as it's longer than the direct connection between the endpoints. So I assume you have some further physical constraint related to the weight. Perhaps some maximal force at one of the endpoints or some such. Anyway it's likely a new question, so I suggest you ask it as such and link back to this question here. $\endgroup$
    – MvG
    Aug 17, 2016 at 6:57
  • 1
    $\begingroup$ This is a really nice discussion, but finding a doesn't seem to be the full answer to the OP's question. After you know a, it's still necessary to solve for x and y offsets that cause the curve to intercept the given points. That itself seems to require solving another transcendental equation! Ideas? $\endgroup$
    – Gene
    Jun 17, 2017 at 5:03
  • $\begingroup$ I confirm the substituted formula converges much quicker. After getting "a" I used Newton's method again to get X offset (using mid X as initial value), and then Y offset by looking at error at first point. $\endgroup$ Mar 2, 2020 at 9:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .