SetDirectory[$HomeDirectory<>"/Documents/handouts/math467/NonhomogeneousWave"]

u[x_,t_]:=Sin[x]Cos[t]+Sin[3x]Sin[3t]/3

D[u[x,t],t,t]-D[u[x,t],x,x]

u[0,t]

u[π,t]

u[x,0]

D[u[x,t],t]/.t->0

Integrate[t Sin[x]Sin[m x],{x,0,π},Assumptions->{m∈Integers}]

Integrate[t Sin[x]Sin[x],{x,0,π}]

DSolve[{T''[t]+T[t]==t,T[0]==0,T'[0]==0},T,t]

v[x_,t_]:=(t-Sin[t])Sin[x]

D[v[x,t],t,t]-D[v[x,t],x,x]//Simplify

v[0,t]

v[π,t]

v[x,0]

Derivative[0,1][v][x,0]

Plot3D[u[x,t]+v[x,t],{x,0,π},{t,0,2},MeshFunctions->{#2&},MeshStyle->Thick,AxesLabel->{"x","t","u(x,t)"}]

Export["example01.pdf",%,"PDF"]

Export["example01.eps",%%,"EPS"]