Question: d'Alemberts solution

Is there anyway to animate d'Alemberts wave solution as time goes on? 

Suppose I have the initial value problem:

PDE:   utt = uxx

ICS:    u(x,0) = x

            ut(x,0) = f(x)

where f(x) is piecewise defined as:

f(x) = cos(pi*x), -1/2 < x < 1/2               and

             0             otherwise

Please Wait...