2.5.4 \(u_t + u u_x + \mu u_{xx}\) with IC

problem number 94

From Mathematica symbolic PDE document.

Viscous fluid flow with initial conditions.

Solve for \(u(x,t)\) \[ u_t + u u_x + \mu u_{xx} \]

With initial conditions

\(u\left ( x,0\right ) =\left \{ \begin {array} [c]{ccc}1 & & x< 0 \\ 0 & & x \geq 0 \end {array} \right . \)

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], {t}] + u[x, t]*D[u[x, t], {x}] == mu*D[u[x, t], {x, 2}]; 
ic  = u[x, 0] == Piecewise[{{1, x < 0}, {0, x >= 1}}]; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, ic}, u[x, t], {x, t}, Assumptions -> mu > 0], 60*10]];
 

\[\left \{\left \{u(x,t)\to \frac {1}{\frac {e^{-\frac {t-2 x}{4 \mu }} \left (\text {erf}\left (\frac {x}{2 \sqrt {\mu } \sqrt {t}}\right )+1\right )}{\text {erf}\left (\frac {t-x}{2 \sqrt {\mu } \sqrt {t}}\right )+1}+1}\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x))  = mu*(diff(u(x, t), x$2)); 
ic  := u(x, 0) =  piecewise(x>=0,0,x<0,1); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, ic],u(x,t)) assuming mu > 0),output='realtime'));
 

sol=()

____________________________________________________________________________________