Equations of motion for transverse oscillations
we are working in the $(x\,,y)$ plane, the string have its endpoints fixed at $(0,0)$, and $(a,0)$. In a transverse oscillation the x-coordinate of any point on the string dose not change in time. the transverse displacement at any point is given by the y-coordinate.
The EOM's
$$\frac{\partial^2\,y(x,t)}{\partial x^2}-\frac{\mu_0}{T_0}\,\frac{\partial^2\,y(x,t)}{\partial t^2}=0\tag 1$$
Where: $T_0$ is the string tension force, and $\mu_0$ is string mass per unit length. the total string mass is then $M=\mu_0\,a$
Boundary condition and initial condition
Dirichlet Boundary condition
$$y(t,x=0)=y(t,x=a)=0$$
Neumann Boundary condition
$$\frac{\partial y}{\partial x}(t,x=0)=\frac{\partial y}{\partial x}(t,x=a)=0$$
Solution
Ansatz :
$$y(t,x)=y(x)\,\sin(\omega\,t+\phi)\tag 2$$
where $\omega$ is the angular frequency and $\phi$ is the phase.
equation (2) in (1) we get:
$$\frac{d^2 y(x)}{dx^2}+\omega^2\frac{\mu_0}{T_0}\,y(x)=0\tag 3$$
The differential equation (3) is solved in term of trigonometric functions, and with the
dirichlet boundary condition we get:
$$y_n(x)=A_n\sin\left(\frac{n\,\pi\,x}{a}\right)\quad,n=1\,,2\ldots$$
plugging $y_n(x)$ in (3) we find the frequencies
$$\omega_n=\sqrt{\frac{T_0}{\mu_0}}\frac{n\,\pi}{a}=\sqrt{\frac{T_0}{\mu_0}\,\frac{1}{a^2}}\,{n\,\pi}=\sqrt{\frac{T_0}{a\,M}}\,{n\,\pi}=\sqrt{\frac{k}{M}}\,{n\,\pi}\quad,n=1\,,2\ldots$$ .
so we have the same "energy source" as for a rigid body oscillation with mass $M$ and stiffness $k$