In this modern society, cables are pretty much everywhere. It’s not just the stuff that connects your computer and monitor, but data and power cables need to be run all over the place. Often these cables are suspended between poles to keep them out of the way of cars and pedestrians.
Some of these overhead lines might look like they are straight from one pole to the next, but they aren’t. There is always some bit of sag. You can really notice this when the cable mounting points are quite a distance away.
But now we get to the physics of this. What shape does a cable make as it is supported between two points? The answer is a catenary curve. No, it’s not a parabola — even though it sort of looks like one.
The exact shape of the hanging cable depends on the linear mass density, the tension, and the location of the two mounting points.
OK, let’s derive this curve. It’s going to be fun.
I’ll be honest. This is one of those problems that at first seems too hard, then it seems straight forward, then you get stuck in some maths. We are going to work through it together.
Suppose we have a hanging cable. If we look at one particular segment of wire, it is at rest so that the net force (vector force) must be zero. Here is a diagram.
So, what’s going on here?
- This is for a segment of length s and a uniform linear density of λ (kg/m).
- There are three forces on this segment — the gravitational force and the tension on the left-end and the tension on the right-end.
- Since this is NOT a massless string, the tension in the string is NOT constant.
- I picked the left point of the segment such that T1 is horizontal.
- The tension on the right (T2) is up at some angle, θ.
OK, three forces — I can add up the x-components and that has to be equal to zero. Same for the y-components. Notice that only T2 has components in both the x and y-directions.
Since this is just part of the cable, I can find the mass from the length (s) and the linear density ( λ) — oh, g is the local gravitational field. That means I have the following two equations:
Now for trick number 1. First, I will get the trig terms on one side of both equations, then I’m going to take the y-equation and divide by the x-equation. This will make the tension, T2 cancel — YAY.
But wait! The c is related to the slope of the line. Here is a diagram to show how that works.
Replacing tan(θ) would give us an equation with dy, dx and s.
Since λ, g, and T1 are just constants I am replacing them with the simpler constant k. But still, I have that s term in there. Here is trick number 2 — taking the derivative of both sides with respect to x. That gives:
Looking back at the right triangle with θ, the hypotenuse has a length ds. Using the Pythagorean theorem:
Putting this in for ds:
Multiple the top and bottom of the right hand side by 1/dx. This will cancel dx on the bottom and then I can bring the dx into the square root as 1/dx². Now I have:
Let me just write the simplified result so that it’s clear.
Notice that on the left, that’s a SECOND derivative of y with respect to x. On the right, it’s different. That’s the FIRST derivative of y with respect to x — but then it’s squared. I’m just point this out because the notation for second derivative and squares looks similar — but it isn’t.
OK, so now we have a differential equation. Let me use another trick to get an analytical solution. The key is to realize that I can make this a first order differential equation. Let’s replace dy/dx with some variable, z. In that case, I have:
I need to get all the “z” terms on one side and the “x” terms on the other side. I can multiply both sides by dx and divide by sqrt(1+z²) to get:
Since there are just z-terms on the left and x-terms on the right, I can integrate both sides.
The right side is pretty easy (hopefully). For the left side, I’m just going to look this up in an integral table. Actually WolframAlpha is great for this. Also, since these are indefinite integrals, I need a constant. But I only need one constant — I will put that on the right side.
I should probably write a post about hyperbolic trig functions in the future.
OK, I can actually find the value for this constant. If z is dy/dx, then that is the slope of the cable. If I put the lowest point at x = 0, then z(0) = 0. The inverse hyperbolic sine of zero is also zero. The only way for this equation to work is if C also equals zero.
Now I can take the hyperbolic sine of both sides and replace z with dy/dx to get:
This is ANOTHER differential equation. Again separating the variables, I get:
Integrating both sides (and putting the constant on the right):
Remember that k is just a constant. I think that’s good enough for the solution. I can find C based on the boundary conditions. Yay.
Plotting a Solution
How about an actual case? Let’s say that I have a cable that is 40 cm long with a total mass of 100 grams. The cable has two mounting points at (-0.15,0) and (0.15,0).
Now things get a little crazy. Apparently, it’s not so trivial to find this coefficient (k). I think that if the curve is centered on the origin, C = 0. If you follow the instructions at this Wikipedia page (and this helpful math stack exchange page), then the coefficient (k) can be found from the following equation.
Here, L is the total length of the cable and h is the x-distance from the two mount points. This equation assumes the two points are at the same y-value. But there’s still a problem — this is a transcendental equation. That means I have to solve this numerically. Let’s go.
Here is my code to find the value of k. The basic idea is to calculate both sides of the equation above and plot them vs. k. When these two curves cross, the value of k is the solution. Oh, I’m using GlowScript / VPython — which is nice, but it doesn’t have hyperbolic sine built in. That just means I had to make my own sinh function.
Oh, also — here is the actual code.
The two curves cross at about k = 0.11. Now, I can use that to plot my hanging cable. OK, I did also need that constant C to make my plot start and end at y = 0. But here is the curve. (code here)