The wavefunction of a particle is given by
$$
\psi(x)=A \cos (k x)+B \sin (k x)
$$
where $A, B,$ and $k$ are constants. Show that $\psi$ is a solution of the Schrödinger equation (Eq. 6.13), assuming the particle is free $(U=0),$ and find the corresponding energy $E$ of the particle.