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:

Ok then, the solution is simply:

where is the odd extension of .

Can you derive the odd extension for and then plot for say 10 seconds? Tell you what, I'll use 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}]