Example 1

uxx=ut
u(0,t)=u(1,t)=1
u(x,0)=1+sin(Pi x)

Transform the PDE by hand. Now proceed.


  DSolve[u''[x]-s u[x]==-(1+Sin[Pi x]),u[x],x];
  U[x_,s_]:=Evaluate[u[x]/.Flatten[%]]
  U[x,s]

Include the initial conditions:


  DSolve[{u''[x]-s u[x]==-(1+Sin[Pi x]),u[0]==1/s,u[1]==1/s},u[x],x];
  U[x_,s_]:=Evaluate[u[x]/.Flatten[%]]
  U[x,s]

Transform back to get u(x,t).


  u[x_,t_]:=InverseLaplaceTransform[U[x,s],s,t]
  u=u[x,t]


  p0=Plot[u/.t->0,{x,0,1},PlotRange->{0,2}];


  p1=Plot[u/.t->.25,{x,0,1},PlotRange->{0,2}];


  p2=Plot[u/.t->.5,{x,0,1},PlotRange->{0,2}];


  Show[p0,p1,p2];

Up to PDE and Laplace Transform Examples