The differential equation of the spring mass system gives you a second order differential equation. Now, similarly wave equations have solutions that just like the spring system contain trigonometric functions (sine or cosine) as this function differentiated twice is itself negative.
Now my question is, how do we know this is the only solution to these equations? If in would think of another equation being itself after differentiated twice, it is $\exp(ix)$ which is a trigonometric function as well. So is the solution always a harmonic oscillation, and what is the proof that this is the only general solution?