2.1.3 Transport equation ut+2ux=0 IC u(1,x)=x1+x2. Peter Olver textbook, 2.2.2 (b)

problem number 3

Added Sept 12, 2019.

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

Solve for u(t,x) in ut+2ux=0 with IC u(1,x)=x1+x2

Mathematica

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

{{u(t,x)2t+x24t24t(x2)+x24x+5}}

Maple

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

u(t,x)=2t+x2(2t+x2)2+1

Hand solution

Solve ut+2ux=0 With initial conditions u(1,x)=x1+x2.

Solution

Let u=u(x(t),t). Then (2)dudt=uxdxdt+ut Comparing (1),(2) shows that (3)dudt=0(4)dxdt=2

Eq (3) says that u is constant on the chataterstic lines, or u=u(x(1)). Using the given initial conditions, this becomes (5)u(x(t),t)=x(1)1+x(1)2 Eq (4) is now used to find x(1). Soving (4) gives x=x(0)+2t. Hence x(1)=x(0)2 or x(0)=x(1)+2. Therefore x=x(1)+2+2tx(1)=x22t

Now that we found x(1), we substitute it in (5), giving the solutionu(x(t),t)=x22t1+(x22t)2 Alternative method. Using Lagrange-charpit method

dt1=dx2=du0 Which implies that du=0 or u=C1. A constant. Integrating dt1=dx2 gives t=12x+C2 or C2=t12x. But C1=F(C2) always, where F is arbitrary function. Since C1=u thenu=F(C2)(1)u=F(t12x)

At t=1 the above becomesx1+x2=F(112x) Let 112x=z which implies x=2(1+z) The above can be written as2(1+z)1+(2(1+z))2=F(z)F(z)=2(1+z)4z2+8z+5

From the above then (1) can be written asu(t,x)=2(1+(t12x))4(t12x)2+8(t12x)+5=x2t24t24tx+8t+x24x+5=x2t21+(x22t)2

The following is an animation of the solution

3D

2D

Source code used for the above

____________________________________________________________________________________