
1312 LINEAR PARTIAL DIFFERENTIAL EQUATIONS WITH MAPLE
Figure 22.5 The numer ical solution u(x,t) o f the IBVP for the linear wave equation and the corre-
sponding errors (between the exact and numerical solutions) at times t = 1 /8,3/8,5/8.
Eq4:=expand(subs(x=L,rhs(SolEx)))=g2(t);
Sols:=[solve({Eq1,Eq2,Eq3,Eq4},{_C1,_C2,_C3,_C4,_c[1]})] assuming _c[1]<0;
Sol3:=subs(Sols[2],SolEx); SolF:=simplify(convert(Sol3,trig));
T1:= pdetest(u(x,t)=rhs(SolEx),PDE1); T2:=simplify(subs(t=0,Sols[2],SolEx));
T3:=D[2](u)(x,0)=simplify(subs(t=0,Sols[2],diff(rhs(SolEx),t)));
T4:=simplify(subs(x=0,Sols[2],rhs(SolEx)));
T5:=simplify(subs(x=L,Sols[2],rhs(SolEx)));
Finally