What is the shape of a rope hanging from two ends?

If I hang a rope from two points that are at the same height above the ground, what is the mathematical function that describes the shape of the rope between the two points? Assuming the mass of the rope is evenly distributed between the two points.

Upon visual inspection, it appears to be parabolic, but looks can be deceiving. I want to be able to calculate how much rope I'll need to span the distance, assuming that I want it to sag by a given amount. If I know the function of the rope's shape, I think I can use an integral to calculate the length of the curve.

• Possible duplicates: physics.stackexchange.com/q/51485/2451 , physics.stackexchange.com/q/64240/2451 , and links therein. See also Wikipedia. – Qmechanic May 27 '14 at 15:18
• I don't generally like this kind of comment, but a quick Google of "shape of a hanging rope" really gets you everything you need: en.wikipedia.org/wiki/Catenary. – Wouter May 27 '14 at 15:19
• @Wouter: you're right, sorry =(. I tried searching but couldn't come up with the correct terms. It wasn't until after I had started writing the question that I came up with the title, and by then I didn't think to try a new search. – brianmearns May 27 '14 at 15:24
• If it's a taut rope, like say telephone wires, it's a hyperbola. But if the two ends are right next to each other, I'd say it is a wonky U. I think that's the technical term – Jim May 27 '14 at 20:41

This is a classic problem in the calculus of variations, and the shape is not, in fact, a parabola. The curve is called a catenary and its basic equation is $$y=a \cosh(x/a).$$ For more details, see the catenary page at Wikipedia.
$$y = a \, \cosh \left ({x \over a} \right ) = {a \over 2} \, \left (e^{x/a} + e^{-x/a} \right )\,$$