____________________________________________________________________________________
From Mathematica symbolic PDE document.
Solve for \(u(x,t)\) \[ \frac {\partial u}{\partial t} + u(x,t) \frac {\partial u}{\partial x} = \mu \frac {\partial ^2 u}{\partial x^2} \]
Mathematica ✓
ClearAll[u, x, t, mu]; pde = D[u[x, t], {t}] + u[x, t]*D[u[x, t], {x}] == \[Mu]*D[u[x, t], {x, 2}]; sol = AbsoluteTiming[TimeConstrained[DSolve[pde, u[x, t], {x, t}], 60*10]];
\[ \left \{\left \{u(x,t)\to -\frac {2 c_1^2 \mu \tanh \left (c_2 t+c_1 x+c_3\right )+c_2}{c_1}\right \}\right \} \]
Maple ✓
x:='x'; t:='t'; y:='y'; mu:='mu'; interface(showassumed=0); pde := diff(u(x, t), t) + u(x, t)*diff(u(x, t), x) = mu* diff(u(x,t),x$2); cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde, u(x, t))),output='realtime'));
\[ u \left ( x,t \right ) =-2\,\mu \,{\it \_C2}\,\tanh \left ( {\it \_C2}\,x+{\it \_C3}\,t+{\it \_C1} \right ) -{\frac {{\it \_C3}}{{\it \_C2}}} \]
____________________________________________________________________________________
From Mathematica symbolic PDE document.
Solve for \(u(x,t)\) \[ \frac {\partial u}{\partial t} + u(x,t) \frac {\partial u}{\partial x} = \mu \frac {\partial ^2 u}{\partial x^2} \]
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[u, x, y, mu]; 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 ✗
x:='x'; y:='y'; mu:='mu';u:='u'; 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'));
\[ \text { sol=() } \]
____________________________________________________________________________________
From Mathematica DSolve help pages.
Solve for \(u(x,t)\) \[ \frac {\partial u}{\partial t} + u(x,t) \frac {\partial u}{\partial x} = \mu \frac {\partial ^2 u}{\partial x^2} \]
With initial conditions
\(u\left ( x,0\right ) =\left \{ \begin {array} [c]{ccc}1 & & |x| \leq \frac {1}{2} \\ 0 & & \text {otherwise} \end {array} \right . \)
Mathematica ✓
ClearAll[u, x, y, mu]; 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] == UnitBox[x]; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic}, u[x, t], {x, t}], 60*10]];
\[ \left \{\left \{u(x,t)\to \frac {e^{\frac {t+1}{4 \mu }} \left (\text {Erf}\left (\frac {2 t-2 x-1}{4 \sqrt {\mu t}}\right )-\text {Erf}\left (\frac {2 t-2 x+1}{4 \sqrt {\mu t}}\right )\right )}{e^{\frac {x}{2 \mu }} \text {Erf}\left (\frac {1-2 x}{4 \sqrt {\mu t}}\right )+e^{\frac {t+1}{4 \mu }} \text {Erf}\left (\frac {2 t-2 x-1}{4 \sqrt {\mu t}}\right )-e^{\frac {t+1}{4 \mu }} \text {Erf}\left (\frac {2 t-2 x+1}{4 \sqrt {\mu t}}\right )+e^{\frac {x+1}{2 \mu }} \text {Erf}\left (\frac {2 x+1}{4 \sqrt {\mu t}}\right )-e^{\frac {x}{2 \mu }}-e^{\frac {x+1}{2 \mu }}}\right \}\right \} \]
Maple ✗
x:='x'; y:='y'; mu:='mu';u:='u'; 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< -1/2 or x>1/2,0, 1); cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, ic],u(x,t)) assuming mu > 0,t>0),output='realtime'));
\[ \text { sol=() } \]