Explicit analytic expressions are found for the spectrum and solutions of the discrete, inhomogeneous wave equation
with boundary conditions , where , , and . As a corollary a solution is given of the classical problem of finding an explicit analytic expression describing the vibrations of a string all the mass of which is concentrated at a finite number of equidistant points, which was the object of detailed study by Euler, D'Alembert, D. Bernoulli, Lagrange, Sturm, Routh, and others, who gave a solution of it in the particular case where the masses of all points are the same. The general solution of the problem turns out to be connected with a generalized quaternion algebra and properties of certain of its ideals, and this connection is used in an essential way in the proofs of the theorems.