2.1.1 Transport equation \(u_t+ u_x = 0\)

problem number 1

Taken from Mathematica Symbolic PDE document

Solve for \(u(x,t)\) \[ u_t+ u_x = 0 \]

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], {t}] + D[u[x, t], {x}] == 0; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[pde, u[x, t], {x, t}], 60*10]];
 

\[\{\{u(x,t)\to c_1(t-x)\}\}\]

Maple

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

\[u \left (x , t\right ) = \mathit {\_F1} \left (t -x \right )\]

Hand solution

\begin {equation} u_{t}+u_{x}=0\tag {1} \end {equation}

Let \(u\equiv 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) to (2) then we see that

\begin {align} \frac {du}{dt} & =0\tag {3}\\ \frac {dx}{dt} & =1\tag {4} \end {align}

(3) says that \(u\) is constant. Since no initial conditions are given, let \(u=F\left ( x\left ( 0\right ) \right ) \) where \(F\) is arbitrary function. To find \(x\left ( 0\right ) \) we solve (4). The solution to (4) is \(x=x\left ( 0\right ) +t\). Hence \(x\left ( 0\right ) =x-t\).  Therefore

\[ u\left ( x,t\right ) =F\left ( x-t\right ) \]

____________________________________________________________________________________