2.1.8 Transport equation \(u_t-x u_x= 0\) IC \(u(x,0)=\frac {1}{1+x^2}\). 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 \(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]];
 

\[\left \{\left \{u(x,t)\to \frac {1}{e^{2 t} x^2+1}\right \}\right \}\]

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 \left ( x,t \right ) = \left ( {x}^{2}{{\rm e}^{2\,t}}+1 \right ) ^{-1}\]

Hand solution

Solve the initial value problem \[ u_{t}-xu_{x}=0 \] 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 \begin {equation} \frac {du}{dt}=\frac {\partial u}{\partial x}\frac {dx}{dt}+\frac {\partial u}{\partial t}\tag {2} \end {equation} Comparing (1),(2) shows that \begin {align} \frac {du}{dt} & =0\tag {3}\\ \frac {dx}{dt} & =-x\tag {4} \end {align}

Solving (3) gives\begin {align} u & =u\left ( x\left ( 0\right ) \right ) \nonumber \\ & =\frac {1}{1+x\left ( 0\right ) ^{2}}\tag {5} \end {align}

We just need to find \(x\left ( 0\right ) \) to finish the solution. From (4)\begin {align} \ln \left \vert x\right \vert & =-t+C\nonumber \\ x & =x\left ( 0\right ) e^{-t}\nonumber \\ x\left ( 0\right ) & =xe^{t}\tag {6} \end {align}

Substituting (6) in (5) gives\[ u\left ( x\left ( t\right ) ,t\right ) =\frac {1}{1+x^{2}e^{2t}}\] The following is an animation of the solution

Source code used for the above

____________________________________________________________________________________