%% Fourier series solution of: u_tt = c^2*u_xx, u(x,0) = f(x), u_t(x,0) = g(x) %and homogeneous boundary conditions at x={0,L}. %case i): f(x) = max{0, 1 - |x-L/2|/l}, g(x) = 0 %case ii): f(x) = 0, g(x) = 1/2l, if |x-L/2|