Consider the wave equation \[\begin{equation} \label{eq:wave} \left\{ \begin{array}{ll} u_{tt}(x,t)=c^2u_{xx}(x,t) , & \left( x,t\right)\in \left( 0,2\pi\right)\times \left( 0,\infty\right),\\ u(0,t)=u(2\pi,t),& t\in (0,\infty),\\ u(x,0)=f(x), & t\in (0,2\pi),\\ u_t\left( x,0\right)=0,& x\in \left( 0,2\pi\right), \end{array} \right. \end{equation}\] where \(f\) is a smooth function on \(\left[ 0,2\pi\right]\) with \(f(0)=f(2\pi)=0\). We will find a solution to the \(\eqref{eq:wave}\) by utilising the Fourier series (like the heat equation). We assume that we can write \[u(x,t) = \sum_{n\in\mathbb{Z}}a_n(t)e^{inx}\] with \[a_n(t) = \frac{1}{2\pi}\int_{0}^{2\pi}u(x,t) e^{-inx}dx\] and that the convergence is such that all interchanging of differentiation and integration is allowed (this will happen, for instance, if we seek a solution that is \(C^4\) on the periodic domain).
Show that \(a_n(t)\) satisfies the equation \[a_n^{\prime\prime}(t) + n^2c^2a_n(t)=0.\]
using he boundary conditions show that \[a_n(t) = A_n\cos\left( nct\right)\] and
find an explicit expression for \(\left\lbrace
A_n\right\rbrace_{n\in\mathbb{Z}}\) which depends on \(f\).
Write a solution to \(\eqref{eq:wave}\)