Why are cosine and sine used to solve this differential equation? $$
\frac{d^2 u}{dt^2}+\lambda u =0
$$
Why are cosine and sine used to solve this differential equation of second order?

Apart from the mathematical theory, and assuming $\lambda >0$ since otherwise no sine/cosine is involved, this is a rough argument: you are looking for a function whose second derivative is a negative multiple of the function itself. Since the second derivative of the sine is minus the sine and the second derivative of the cosine is minus the cosine, it is natural to manipulate $\sin (\cdot)$ and $\cos (\cdot)$ to find a true solution.
