2.1.5 Transport equation \(u_t-4u_x+u = 0\) IC \(u(0,x)=\frac {1}{1+x^2}\). Peter Olver textbook, 2.2.2 (d)

problem number 5

Added Sept 12, 2019.

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

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

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[t, x], {t}] -4*D[u[t, x], {x}]+u[t,x] == 0; 
ic = u[0,x]==1/(1+x^2); 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde,ic}, u[t, x], {t, x}], 60*10]];
 

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

Maple

restart; 
pde := diff(u(t, x), t) -4*diff(u(t, x),x) +u(t,x)=0; 
ic:=u(0,x)=1/(1+x^2); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],u(t,x))),output='realtime'));
 

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

Hand solution

\begin {align} u_{t}-4u_{x}+u & =0\tag {1}\\ u\left ( x,0\right ) & =\frac {1}{1+x^{2}}\nonumber \end {align}

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

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

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

Substituting the above into (5) gives\[ u=\frac {e^{-t}}{1+\left ( x+4t\right ) ^{2}}\] The above is the method I prefer to solve these problems. Here are some alternative ways

Alternative approach

Let \(\xi \) be the characteristic variable defined such that \(\xi =x-ct\). Where characteristic lines are given by \(x=x_{0}+ct\). But \(c=-4\) in this problem. Hence characteristic lines are \[ x=x_{0}-4t \] And\[ \xi =x+4t \] Then \(u_{t}-4u_{x}\) are transformed to \(v\left ( t,\xi \right ) \) as was done in part (a) (will not be repeated) which results in\[ u_{t}-4u_{x}=\frac {\partial v}{\partial t}\] Substituting the above into (1) gives (where now \(v\) is used in place of \(u\)).\[ \frac {\partial v}{\partial t}+v=0 \] This is now first order ODE since it only depends on \(t\). Therefore \(v^{\prime }+v=0\). This is linear in \(v\). Hence the solution is \(\frac {d}{dt}\left ( ve^{\int dt}\right ) =0\) or \(ve^{t}=F\left ( \xi \right ) \) where \(F\) is arbitrary function of \(\xi \). Hence\[ v\left ( t,\xi \right ) =e^{-t}F\left ( \xi \right ) \] Converting to \(u\left ( t,x\right ) \) gives\begin {equation} u\left ( t,x\right ) =e^{-t}F\left ( x+4t\right ) \tag {2} \end {equation} At \(u\left ( 0,x\right ) =\frac {1}{1+x^{2}}\) the above becomes\[ \frac {1}{1+x_{0}^{2}}=F\left ( x_{0}\right ) \] From the above then (2) can be written as\[ u\left ( t,x\right ) =\frac {e^{-t}}{1+\left ( x+4t\right ) ^{2}}\] An alternative approach to solve transport PDE is by using Lagrange-charpit method\[ \frac {dt}{1}=-\frac {dx}{4}=\frac {-du}{u}\] Integrating \(\frac {dt}{1}=\frac {-dx}{4}\) gives \(t=-\frac {1}{4}x+C_{2}\) or \[ C_{2}=t+\frac {1}{4}x \] Now either \(\frac {dt}{1}=\frac {-du}{u}\) or \(\frac {-dx}{4}=\frac {-du}{u}\) can be integrated. The choice is not important. Integrating \(\frac {dt}{1}=\frac {-du}{u}\) gives \(t=-\ln u+C_{1}\) or \[ C_{1}=t+\ln u \] But \(C_{1}=F\left ( C_{2}\right ) \) always, where \(F\) is arbitrary function therefore

\begin {align} t+\ln u & =F\left ( C_{2}\right ) \nonumber \\ t+\ln u & =F\left ( t+\frac {1}{4}x\right ) \nonumber \\ \ln u & =F\left ( t+\frac {1}{4}x\right ) -t\nonumber \\ u & =e^{-t}e^{F\left ( t+\frac {1}{4}x\right ) } \tag {1} \end {align}

At \(u\left ( 0,x\right ) =\frac {1}{1+x^{2}}\) the above becomes\begin {align*} \frac {1}{1+x^{2}} & =e^{F\left ( \frac {1}{4}x\right ) }\\ F\left ( \frac {x}{4}\right ) & =\ln \left ( \frac {1}{1+x^{2}}\right ) \end {align*}

Let \(z=\frac {x}{4}\), then \(x=4z\). The above becomes\[ F\left ( z\right ) =\ln \left ( \frac {1}{1+\left ( 4z\right ) ^{2}}\right ) \] From the above then (1) can be written as\begin {align*} u\left ( t,x\right ) & =e^{-t}e^{\ln \left ( \frac {1}{1+\left ( 4\left ( t+\frac {1}{4}x\right ) \right ) ^{2}}\right ) }\\ & =\frac {e^{-t}}{1+\left ( 4\left ( t+\frac {1}{4}x\right ) \right ) ^{2}}\\ & =\frac {e^{-t}}{1+\left ( 4t+x\right ) ^{2}} \end {align*}

The following is an animation of the solution

3D

2D

Source code used for the above

____________________________________________________________________________________