Application of Newton's second law to an infinitesimally small element of string
Consider a wire that is under tension T₀ and has a mass per unit length μ. A small amplitude transverse wave is generated, propagating along the string in the positive x-direction, with particle displacements measured along the y-axis.
At any given time, we examine a segment of the wire with a length denoted as AB = $\partial s$. The angles of the slope at points A and B are represented as θA and θB, respectively. As all particles are moving in the y-direction, the wire segment of length $\partial x$ has been extended to $\partial s$. This indicates that the tension is greater where the slope angle is larger, while the tension is at its minimum value. To, when the angle θ is zero.
We now apply Newton's law to section AB of the wire having mass $dm=\mu \partial x$.
$$\sum{{{F}_{x}}}=0\,\,\,and\,\,\,\sum{{{F}_{y}}}=\partial m{{a}_{y}}\tag{1}$$
Along y axis the equation is $${{T}_{B}}\sin {{\theta }_{B}}-{{T}_{A}}\sin {{\theta }_{A}}=-\mu \partial x\frac{{{\partial }^{2}}y}{{{\partial }^{2}}t}\tag{2}$$.
The negative sign in this above equation is due to the fact that the acceleration of a small element is downwards at the shown instant.
This implies in along x-axis ${{T}_{A}}\cos {{\theta }_{A}}={{T}_{B}}\cos {{\theta }_{B}}={{T}_{O}}\cos 0={{T}_{O}}\tag{3}$
This equation tells that horizontal component of tension at all points on the vibrating string is same and equal to ${{T}_{O}}$.
From Equation 2 and 3 we get
$${{T}_{O}}\tan {{\theta }_{B}}-{{T}_{O}}\tan {{\theta }_{A}}=-\mu \partial x\frac{{{\partial }^{2}}y}{{{\partial }^{2}}t}\,\,\, or\,\,\,{{T}_{O}}{{\left. \frac{\partial y}{\partial x} \right|}_{x=B}}-{{T}_{O}}{{\left. \frac{\partial y}{\partial x} \right|}_{x=A}}=-\mu \partial x\frac{{{\partial }^{2}}y}{{{\partial }^{2}}t}$$
$${{T}_{O}}{{\left. \frac{\partial y}{\partial x} \right|}_{x=B}}-{{T}_{O}}{{\left. \frac{\partial y}{\partial x} \right|}_{x=A}}=-\mu \partial x\frac{{{\partial }^{2}}y}{{{\partial }^{2}}t}$$