# Why is the entirity of string tension $T$ included in the potential energy of a string wave?

When calculating the elastic potential energy of a string segment inside a transversal string-wave, it is usually reasoned that the string tension $$T$$ causes the string segment to stretch as it oscillates, and therefore produces work equal to: $$\Delta U~=~T(d\ell-dx).$$ My question is, how come the entirety of the tension $$T$$ is contributing work here? We seem to be implying that the tension is always parallel to the string segment, but how is that possible if the tension also generates transversal movement in the string?

Indeed, don't we assume that the string is curved to derive the wave equation in the first place? Shouldn't we take some geometric factor into account when calculating the work done to stretch the segment?

Yes, OP is right. There is in general both longitudinal displacement $$\xi$$ in the $$x$$-direction and transversal displacement $$\eta$$ in the $$y$$-direction of the string. Then Pythagoras yields $$(d\ell)^2~=~(dx+d\xi)^2+(d\eta)^2.$$ If the string of length $$\ell$$ has undeformed length $$\ell_0$$ and spring constant $$k$$, then the total potential energy is $$V~=~\frac{k}{2}(\ell-\ell_0)^2,$$ cf. e.g. my Phys.SE answer here. The string tension is $$T~=~k|\ell-\ell_0|.$$
The total PE is $$T$$ times the change in length. The total length is $$\int_a^b \sqrt{1+ \left(\frac{dy}{dx}\right)^2} dx - \int_a^b dx = \int_a^b \frac 12 \left(\frac{dy}{dx}\right)^2dx + {\rm small},$$ so the PE is $$\int_a^b \frac 12 T\left(\frac{dy}{dx}\right)^2dx.$$
This derivation assumes that the change in length is small, so that the tension does not change as we stretch. As a result, to this approximation (the usual one made in vibrating string theory) the PE does not depend on the elastic constant $$k$$ of the material the string is made of.