That looks like Laplace's equation for the first and I assume you mean the wave equation in 1D over a finite domain for the second right? The answer to the first is yes. For the second, I'll assume its:

$\displaystyle \text{D.E}\quad \frac{\partial^2 u}{\partial t^2}=a^2\frac{\partial^2 u}{\partial x^2},\quad 0\leq x\leq \pi,\quad -\infty<t<\infty$

$\displaystyle \text{B.C}\quad u(0,t)=0\quad u(\pi,t)=0$

$\displaystyle \text{I.C}\quad u(x,0)=0\quad u_t(x,0)=g(x)=x(\pi-x)$

Ok then, the solution is simply:

$\displaystyle u(x,t)=\frac{1}{2a}\int_{x-at}^{x+at} \tilde{g_0}(\tau)d\tau$

where $\displaystyle \tilde{g_0}(x)$ is the odd extension of $\displaystyle g(x)$.

Can you derive the odd extension for $\displaystyle g(x)$ and then plot $\displaystyle u(x,t)$ for say 10 seconds? Tell you what, I'll use $\displaystyle g(x)=e^{x}\sin(x)$ and show what the odd extension for it between -2pi and 2pi looks like as well as the (cryptic) Mathematica code I used to plot it. Now, if I wanted to calculate u(x,t), I'd use those "conditional" expressions in the integral whenever the parameters x-at and x+at reaches each region.

Code:

f[x_] := Which[0 <= x <= Pi, Exp[x]*Sin[x], Pi <= x <= 2*Pi,
(-Exp[2*Pi - x])*Sin[2*Pi - x], -Pi <= x <= 0,
(-Exp[-x])*Sin[-x], -2*Pi <= x <= -Pi,
(-Exp[2*Pi + x])*Sin[2*Pi - x]];
Plot[f[x], {x, -2*Pi, 2*Pi}]