Added Sept 12, 2019.
Taken from Peter Olver textbook, Introduction to Partial differential equations. problem 2.2.17
Solve \(u_t-x u_x= 0\) with IC \(u(x,0)=\frac {1}{1+x^2}\)
Mathematica ✓
ClearAll["Global`*"]; pde = D[u[x,t], t] -x*D[u[x,t], x]== 0; ic = u[x,0]==1/(1+x^2); sol = AbsoluteTiming[TimeConstrained[DSolve[{pde,ic}, u[x,t], {x,t}], 60*10]];
Maple ✓
restart; pde := diff(u(x,t), t) -x*diff(u(x,t),x) =0; ic:=u(x,0)=1/(1+x^2); cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],u(x,t))),output='realtime'));
Hand solution
Solve the initial value problem
With initial conditions \(u\left ( 0,x\right ) =\frac {1}{1+x^{2}}\)
Solution
Let \(u=u\left ( x\left ( t\right ) ,t\right ) \). Then
Solving (3) gives
We just need to find \(x\left ( 0\right ) \) to finish the solution. From (4)
Substituting (6) in (5) gives
The following is an animation of the solution
Source code used for the above
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________