2.5.5 \(u_t + u u_x + \mu u_{xx}\) IC as UnitBox

problem number 95

From Mathematica DSolve help pages.

Viscous fluid flow with initial conditions as UnitBox

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| \leq \frac {1}{2} \\ 0 & & \text {otherwise} \end {array} \right . \)

Mathematica


\[\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 {t+1}{4 \mu }} \left (\operatorname {Erfc}\left (\frac {2 t-2 x-1}{4 \sqrt {\mu t}}\right )-\operatorname {Erfc}\left (\frac {2 t-2 x+1}{4 \sqrt {\mu t}}\right )\right )+e^{\frac {x}{2 \mu }} \left (\operatorname {Erfc}\left (\frac {1-2 x}{4 \sqrt {\mu t}}\right )+e^{\left .\frac {1}{2}\right /\mu } \operatorname {Erfc}\left (\frac {2 x+1}{4 \sqrt {\mu t}}\right )\right )}\right \}\right \}\]

Maple


sol=()