2.1.9 Transport equation \(u_t+(1-2 t) u_x= 0\) IC \(u(x,0)=\frac {1}{1+x^2}\). Peter Olver textbook, problem 2.2.29

problem number 9

Added Sept 15, 2019.

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

Solve \(u_t+(1-2 t) u_x= 0\) with IC \(u(x,0)=\frac {1}{1+x^2}\)

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x,t], t] +(1-2*t)*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}{2 t^2 x+t^4-2 t^3+t^2-2 t x+x^2+1}\right \}\right \}\]

Maple

restart; 
pde := diff(u(x,t), t) +(1-2*t)*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 ) = \frac {1}{\left (-t^{2}+t -x \right )^{2}+1}\]

Hand solution

Solve \[ u_{t}+\left ( 1-2t\right ) u_{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} & =\left ( 1-2t\right ) \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)\[ x=t-t^{2}+C \] At \(t=0\)\[ x\left ( 0\right ) =C \] Hence \begin {align*} x & =t-t^{2}+x\left ( 0\right ) \\ x\left ( 0\right ) & =x-t+t^{2} \end {align*}

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

Source code used for the above

____________________________________________________________________________________