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