Forced string problem with Forcing $\sin(\pi x) \cos(\pi t)$ the problem states to solve the forced string problem with
$$\frac{\partial^2u}{\partial t^2}=\frac{\partial^2u}{\partial x^2} - \cos( \pi t)\sin( \pi x)$$
the boundary conditions for the string are $u(0,t)=u(1,t)=0$ 
and the initial conditions are $u(x,0)=0, \frac{du}{dt}(x,0)=0$
I have no clue how to solve this, any help or even pointers in the right directions to sources, etc will be extremely useful. 
I thank you in advance
 A: Consider the change of variables $\xi=x+t$, $\eta=x-t$.  Then
\begin{align}
\frac{\partial^2 }{\partial t^2}=\frac{\partial^2}{\partial\xi^2}-2\frac{\partial^2}{\partial\xi\partial\eta}+\frac{\partial^2}{\partial \eta^2}
\end{align}
and
\begin{align}
\frac{\partial^2 }{\partial x^2}=\frac{\partial^2}{\partial\xi^2}+2\frac{\partial^2}{\partial\xi\partial\eta}+\frac{\partial^2}{\partial \eta^2}.
\end{align}
Then the equation now becomes
\begin{align}
4\frac{\partial^2 u}{\partial\xi\partial\eta}=\cos\left[\frac{\pi}{2}(\xi-\eta)\right]\sin\left[\frac{\pi}{2}(\xi+\eta)\right]
\end{align}
since $t=\frac{1}{2}(\xi-\eta)$ and $x=\frac{1}{2}(\xi+\eta)$.  The general solution to this PDE is given by 
\begin{align}
u(\xi,\eta) &= \frac{1}{4}\left\{c_2(\xi)+\xi c_1(\eta)+\int_0^\xi\int_0^\eta\cos\left[\frac{\pi}{2}(s-r)\right]\sin\left[\frac{\pi}{2}(s+r)\right]\,dr\,ds\right\} \\
&= \frac{1}{4}\left\{c_2(\xi)+\xi c_1(\eta)+\frac{1}{2\pi}[\eta+\xi-\xi\cos(\pi\eta)-\eta\cos(\pi\xi)] \right\}\\
\end{align}
(just integrate with respect to both variables).  Substituting our original variables, we have
\begin{align}
u(x,t)=\frac{1}{4}\left\{c_2(x+t)+(x+t)c_1(x-t)+\frac{1}{2\pi}[2x-(x+t)\cos(\pi x-\pi t)-(x-t)\cos(\pi x+\pi t)]\right\}.
\end{align}
Use the initial conditions to determine expressions for $c_1$ and $c_2$.
