2.1.14 \(u_t+ c u_x = 0\) and \(u(x,0)=e^{-x^2}\)

problem number 14

Taken from Mathematica help pages

Solve for \(u(x,t)\) \[ u_t+ c u_x = 0 \] With initial conditions \(u(x,0)=e^{-x^2}\)

Mathematica


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

Maple


\[u \left (x , t\right ) = {\mathrm e}^{-\left (t c -x \right )^{2}}\]

Hand solution

Solve \begin {equation} u_{t}+cu_{x}=0\tag {1} \end {equation} with initial conditions \(u\left ( x,0\right ) =e^{-x^{2}}\).

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

Solving (3) gives\begin {align} u & =u\left ( x\left ( 0\right ) \right ) \nonumber \\ & =e^{-x\left ( 0\right ) ^{2}}\tag {5} \end {align}

We need to find \(x\left ( 0\right ) \). From (4)\begin {align*} x & =ct+x\left ( 0\right ) \\ x\left ( 0\right ) & =x-ct \end {align*}

Then (5) becomes\[ u\left ( x\left ( t\right ) ,t\right ) =e^{-\left ( x-ct\right ) ^{2}}\]

________________________________________________________________________________________