Taken from Mathematica help pages
Solve for \(u(x,t)\)
with initial value \(u(x,0)=\sin x\) and boundary value \(u(0,t)=0\)
Mathematica ✓
ClearAll["Global`*"]; pde = D[u[x, t], t] + D[u[x, t], x] == 0; bc = u[0, t] == 0; ic = u[x, 0] == Sin[x]; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, u[x, t], {x, t}], 60*10]];
Maple ✓
restart; pde := diff(u(x,t),t)+diff(u(x,t),x)=0; bc := u(0,t)=0; ic := u(x,0)=sin(x); cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic,bc],u(x,t)) assuming x>0),output='realtime'));
Hand solution
Since initial and boundary conditions are given, the Laplace transform method will be used to solve this PDE. Let \(U\left ( x,s\right ) \) be the Laplace transform of \(u\left ( x,t\right ) \). Applying Laplace transform to the PDE gives
Integrating factor is \(\mu =e^{\int sdx}=e^{sx}\). Multiplying the above by \(\mu \) gives
Integrating
Applying boundary conditions \(U\left ( 0,s\right ) =0\) gives
Hence
Applying inverse Laplace transform gives
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________