TITLE: What is the general solution of this PDE?
QUESTION [2 upvotes]: The problem:
\begin{cases}
u_{tt} - u_{xx} = e^{-\pi^2t}\sin {\pi x} \; & \text{in} \; ]0,1[ \times(0,+\infty) \\
u = 0 = u_t \; & \text{on} \;  ]0,1[  \times\{t = 0\} \\
u(0,t) = 0 = u_t(1,t) \; &  \;  t > 0 \\
\end{cases}
So I found a particular solution
$$u_p = \frac{1}{\pi^2(1+\pi^2)} e^{-\pi^2t}\sin {\pi x}$$
Now for the general solution do I only have to add the solution of the homogeneous associated problem? If so how do you justify that?  
I know how to find a solution to the homogeneous equation what I want is to know if since equations are linear then the method usually used when solving ODE's (which is particular + homogeneous) works here as well and why. 
Any clarification will be greatly appreciated! Thanks!

REPLY [1 votes]: Let me denote $\square=\partial_t^2-\partial_x^2$ and $f(x,t)=e^{-\pi^2t}\sin(\pi x)$.
You found a solution $u_p$ for the equation $\square u_p=f$.
Any function $u$ on your space $(0,1)\times(0,\infty)$ can be written as $u=u_p+v$.
(The precise statement depends slightly on what function spaces you work with.)
Since $\square$ is linear, we have that $\square u=f$ if and only if $\square v=0$.
Therefore the general solution to $\square u=f$ is $u_p+v$, where $v$ solves $\square v=0$.
When looking for the general solution, make sure you get the boundary condition right.
If $u_p$ has the correct boundary conditions, then $v$ has the corresponding zero conditions.
Looking at the boundary conditions you demanded of $u$ and those satisfied by $u_p$, one can see that that the solution $v$ of the homogeneous equation has to vanish when $x\in\{0,1\}$ and $t>0$.
However, your $u_p$ does not satisfy the boundary condition at $t=0$, so you get the conditions $v(x,0)=-u_p(x,0)$ and $\partial_tv(x,0)=-\partial_tu_p(x,0)$ for $v$.
This is precisely the same argument we use in ODE theory.
And in fact, it is true for any linear equations $Au=f$ and not specific to differential equations.
{"set_name": "stack_exchange", "score": 2, "question_id": 2784286}