Taken from Mathematica help pages
Solve for \(u(x,t)\)
With initial conditions \(u(x,0)=e^{-x^2}\)
Mathematica ✓
ClearAll["Global`*"]; ic = u[x, 0] == Exp[-x^2]; pde = D[u[x, t], {t}] + c*D[u[x, t], {x}] == 0; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic}, u[x, t], {x, t}], 60*10]];
Maple ✓
restart; interface(showassumed=0); pde := diff(u(x, t), t) + c* diff(u(x, t),x) =0; ic := u(x,0)=exp(-x^2); cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],u(x,t))),output='realtime'));
Hand solution
Solve
with initial conditions \(u\left ( x,0\right ) =e^{-x^{2}}\).
Solution
Let \(u=u\left ( x\left ( t\right ) ,t\right ) \). Then
Solving (3) gives
We need to find \(x\left ( 0\right ) \). From (4)
Then (5) becomes
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________