I have this initial value problem:
$$ u_{tt}- c^2u_{xx} = 0; \,0 < x < 1; \,t > 0; $$
$$ u(x, 0) = 0; \,u_t(x, 0) = 1; 0 <= x <= 1; $$ $$ u(0, t) = u(1, t) = 0; t >= 0: $$
Solving it using d'Alembert's Solution, answer I get is,
$$ u(x,y) = t $$
But that does not satisfy last condition. Putting x 0 or 1 should make u 0. But that is not the case here. Am I missing something? Do we have to add something after d'Alembert's Solution?
D'Alambert's formula is for problems on the whole line (infinite string). Your problem is on a bounded interval (finite string) with boundary conditions.