#### 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

Taken from Peter Olver textbook, Introduction to Partial diﬀerential equations.

Solve $$u_t+u_x+\frac {1}{2}u = 0$$ with IC $$u(0,x)=\arctan (x)$$.

Mathematica

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

Maple

$u \left (t , x\right ) = -\arctan \left (t -x \right ) {\mathrm 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 ﬁnd $$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

________________________________________________________________________________________