The book Mathematical Physics by Eugene Butkov has, on Chapter 8, the equation for a held string (by held I mean with endpoints fixed and both at the same height) as being
$$T\frac{\partial^2 u}{\partial x^2}+F(x)-\rho(x)g=\rho(x)\frac{\partial^2 u}{\partial t^2},$$
where $T$ is the tension, $F$ an external force, $\rho$ the density, $g$ gravity and $u$ transversal (vertical) displacement.

However, the book derives this equation assuming the string deforms little from the horizontal position and the tension is contant. Such assumptions are strong, I think.

Plus, for the stationary case $\frac{\partial u}{\partial t}=0$ it doesn't seem to differentiate between a string hanging by its own weight and a string being pulled by a constant force. And we know these two situations are different since the solution for them is a catenary and a parabola, respectively.

Net vertical force will be $T_0\frac{\partial^2 y}{\partial x^2}dx-F(x)dx-\rho g ds$, where $F(x)$ is assumed downwards. Notice how we take the force to be proportional to $dx$ and not $ds$, assuming it acts only on the horizontal breadth of the element. On the other hand, the mass is definitely proportional to $ds$.

I believe this is the exact equation. In the stationary regime, it does give a parabola for a constant force if we ignore the weight, and a catenary for no external force.

Notice however that it only reduces to the usual wave equation $T_0\frac{\partial^2 y}{\partial x^2}=\rho \frac{\partial^2 y}{\partial t^2}$ when we ignore the weight, set $F=0$ and also assume $\sqrt{1+\left(\frac{\partial y}{\partial x}\right)^2}\approx 1$.

The steady-state catenary arises when $F(x)=0$; the steady-state parabola arises when $F(x)\gg\rho(x)g$. (I just happened to be writing about this here.)

More generally, you could perform an force balance on a differential element of the string to obtain $$\frac{\partial\mathbf{T}(s,t)}{\partial s}+\mathbf{F}(s)-\rho(s)g\mathbf{k}=\rho(s)\frac{d^2 \mathbf{x}(t)}{d t^2}$$ where the parameters in bold are the tension vector $\mathbf{T}$, distributed force $\mathbf{F}(s)$, element position $\mathbf{x}$, and the unit vector $\mathbf{k}$ in the vertical direction and $s$ is the distance along the string. To this you must also add a relationship between $|\mathbf{T}(s)|$ and $ds$. If the string is inextensional, for example, then $s$ is constant. This governing equation is independent of endpoint location and can accommodate forces and displacements in any direction and for a curved string.

$\begingroup$It took me some time to type my answer, so I didn't see yours. I would be happy to know what you think of it.$\endgroup$
– MarcelApr 29 '18 at 23:43

$\begingroup$@Marcel I especially like how you emphasize that a distributed downward force acts over $dx$, whereas the self-weight acts over $ds$. In my equation above, one would have to take care to define $\mathbf{F}(s)$ properly so that the correct distributed force is applied regardless of the angle of the string.$\endgroup$
– ChemomechanicsApr 29 '18 at 23:48

$\begingroup$I think this is a better answer than the one by Marcel as it does not make use of $T_0$ and thus begs for a "string"-dependent constitutive relation. However, I suggest using a total time derivative rather than a partial one in the expression of the acceleration.$\endgroup$
– HusseinMay 1 '18 at 4:04