2.1.4 Transport equation \(u_t+u_x+\frac {1}{2}u = 0\) IC \(u(0,x)=\arctan (x)\). Peter Olver textbook, 2.2.2 (c)

problem number 4

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

\[\left \{\left \{u(t,x)\to -e^{-t/2} \tan ^{-1}(t-x)\right \}\right \}\]

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

\[u \left ( t,x \right ) =-\arctan \left ( -x+t \right ) {{\rm e}^{-{\frac {t}{2}}}}\]

Hand solution

Solve \[ u_{t}+u_{x}+\frac {1}{2}u=0 \] With initial conditions \(u\left ( x,0\right ) =\arctan \left ( x\right ) \).

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} & =-\frac {1}{2}u\tag {3}\\ \frac {dx}{dt} & =1\tag {4} \end {align}

Solving (3) gives\begin {align*} \frac {du}{u} & =\frac {-1}{2}dt\\ \ln \left \vert u\right \vert & =-\frac {1}{2}t+c\\ u & =u\left ( x\left ( 0\right ) \right ) e^{\frac {-t}{2}} \end {align*}

Using the given initial conditions, this becomes \begin {equation} u\left ( x,t\right ) =\arctan \left ( x\left ( 0\right ) \right ) e^{\frac {-1}{2}t}\tag {5} \end {equation} Now we just need to find \(x\left ( 0\right ) \). From (4)\begin {align*} x & =x\left ( 0\right ) +t\\ x\left ( 0\right ) & =x-t \end {align*}

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

Source code used for the above

____________________________________________________________________________________