x=var('x')
t=var('t')
c=var('c') #  An arbitary Constant
w=var('w')
u=function('u',x,t)
u=exp(-(w^2)*(c^2)*t)*sin(w*x) # solution
pde=diff(u,t)-c^2*diff(u,x,x) 
print solve(pde,w,c) # Verification of solution
#Thus, given 'u' is not a solution of given P.D.E. since there's no suitable constant 'c' to satisfy the equation

SageDays/Kreyszig-11.1-9 (last edited 2010-08-12 10:57:28 by Aashita)