= Solution
Extend the forcing oddly across the boundary:
$$
f_{\rm odd}(y,s)=
\begin{cases}
f(y,s),&y\geq0,\\
-f(-y,s),&y<0.
\end{cases}
$$
The initial displacement $\sin x$ is already odd, so its homogeneous evolution on the line is $\sin x\cos(ct)$. Applying <Duhamel principle>[Duhamel's principle] to the odd extension gives
$$
\boxed{
u(x,t)=\sin x\cos(ct)
+\frac1{2c}\int_0^t
\int_{x-c(t-s)}^{x+c(t-s)}
f_{\rm odd}(y,s)\,dy\,ds }.
$$
The odd-reflection method makes $u(0,t)=0$. At $t=0$ the double integral vanishes together with its first time derivative, so the prescribed initial displacement and velocity are also satisfied.
Back to article page