
23.4. Numerical Solutions and Their Visualizations 1357
Now we schematically write out the numerical solution
sol
with the aid of
NDSolve
and
then use it to obtain various visualizations (e.g.,
Plot
,
Plot3D
,
Animate
) and numerical
values (
numVals
).
sol=NDSolve[{PDE,IC,BC},u,{x,x1,x2},{t,t1,t2},ops]
Plot[Evaluate[u[x,tk]/.sol],{x,x1,x2},ops]
numVals=Evaluate[u[xk,tk]/.sol]
Plot3D[Evaluate[u[x,t]/.sol],{x,x1,x2},{t,t1,t2},ops]
Animate[Plot[Evaluate[u[x,t]/.sol],{x,x1,x2},ops],{t,t1,t2},ops]
Example 23.26. Line ar wave equation. Initial-boundary value prob le m. Numerical, graphical,
and exact solu tions. We find numerical, graphical, and exact solutions of the ...