x=var('x')
t=var('t')
c=var('c') #  An arbitary Constant
w=var('w')
u=function('u',x,t)
u=exp(-9*t)*cos(w*x) # solution
pde=diff(u,t)-c^2*diff(u,x,x) 
print solve(pde,c,w) # Verification of solution
#Thus, given 'u' is a solution of PDE since we can find a suitable constant 'c' for which equation is satisfied.

SageDays/Kreyszig-11.1-8 (last edited 2010-08-12 10:55:30 by Aashita)