Inhomogeneous wave equation with Dirichlet condition

57 Views Asked by At

I'm trying to solve the problem:

$\begin{cases} \frac{\partial u}{\partial tt} -\frac{\partial u}{\partial xx} =g(t)sin(x)\\ u(x,0)=\frac{\partial u}{\partial t}(x,0)=0 \\ u(0,t)=u(\pi, t)=0 \end{cases}$

I'd know the solution if there were no Dirichlet condition:

$u(x,t)=\int_{\Delta} g(t)sin(x)dxdt$

where $\Delta$ is the area between the x axis and the characteristics that pass thorugh $(x,t)$.

I'd also know the solution if there were no source: in that case you can separate variables, and the solution is found by decomposing $u(x,0)$ in a Fourier serie and by considering the time evolution of every eigenfunction. But with the inhomogenous case, when I try to separate the variables I get:

$u=Q(t)S(x)\\ \frac{d^2Q}{dt^2}(t)S(x)-\frac{d^2S}{dx^2}(x)Q(t)=g(t)sin(x)$

and now I have a harder problem.

Is there a better way to find the solution?