2.1.8 Transport equation utxux=0 IC u(x,0)=11+x2. Peter Olver textbook, problem 2.2.17

problem number 8

Added Sept 12, 2019.

Taken from Peter Olver textbook, Introduction to Partial differential equations. problem 2.2.17

Solve utxux=0 with IC u(x,0)=11+x2

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]];
 

{{u(x,t)1e2tx2+1}}

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'));
 

u(x,t)=1x2e2t+1

Hand solution

Solve the initial value problem utxux=0 With initial conditions u(0,x)=11+x2

Solution

Let u=u(x(t),t). Then (2)dudt=uxdxdt+ut Comparing (1),(2) shows that (3)dudt=0(4)dxdt=x

Solving (3) givesu=u(x(0))(5)=11+x(0)2

We just need to find x(0) to finish the solution. From (4)ln|x|=t+Cx=x(0)et(6)x(0)=xet

Substituting (6) in (5) givesu(x(t),t)=11+x2e2t The following is an animation of the solution

Source code used for the above

____________________________________________________________________________________