### 6 Heat PDE on semi-inﬁnite domain (1D)

_______________________________________________________________________________________

#### 6.1 Left end $$u(0,t)=f(t)$$, zero initial conditions, No source (Logan p. 76)

problem number 58

This is problem at page 76 from David J Logan text book.

Solve the heat equation

$\frac{ \partial u}{\partial t} = \frac{ \partial ^2 u}{\partial x^2}$

The boundary conditions are $$u(0,t)=f(t)$$ and initial conditions $$u(x,0)=0$$

Mathematica

$\left \{\left \{u(x,t)\to \frac{x \int _0^t \frac{f(z) e^{-\frac{x^2}{4 (t-z)}}}{(t-z)^{3/2}} \, dz}{2 \sqrt{\pi }}\right \}\right \}$

Maple

$u \left ( x,t \right ) =1/2\,{\frac{x}{\sqrt{\pi }}\int _{0}^{t}\!{\frac{f \left ( \zeta \right ) }{ \left ( t-\zeta \right ) ^{3/2}}{{\rm e}^{-{\frac{{x}^{2}}{4\,t-4\,\zeta }}}}}\,{\rm d}\zeta }$

_______________________________________________________________________________________

#### 6.2 Left end $$u(0,t)=1$$, zero initial conditions, No source

problem number 59

Solve the heat equation

$\frac{ \partial u}{\partial t} = k \frac{ \partial ^2 u}{\partial x^2}$

For $$x>0$$ and $$t>0$$. The boundary conditions is $$u(0,t)=1$$ and And initial condition $$u(x,0)=0$$

Mathematica

$\left \{\left \{u(x,t)\to \text{Erfc}\left (\frac{x}{2 \sqrt{k t}}\right )\right \}\right \}$

Maple

$u \left ( x,t \right ) =1-\erf \left ( 1/2\,{\frac{x}{\sqrt{t}\sqrt{k}}} \right )$

_______________________________________________________________________________________

#### 6.3 B.C. not located at $$x=0$$ and I.C. not at $$t=0$$

problem number 60

Solve the heat equation for $$u(x,t)$$

$\frac{ \partial u}{\partial t}= \frac{1}{4} \frac{ \partial ^2 u}{\partial x^2}$ With initial condition $u(x,t_0)= 10;$ And boundary conditions $u(-x_0,t) = 0$ For $$x>|x_0|$$ and $$t>|t_0|$$.

Mathematica

$\text{DSolve}\left [\left \{u^{(0,1)}(x,t)=\frac{1}{4} u^{(2,0)}(x,t),u(-\text{x0},t)=0,u(x,\text{t0})=10\right \},u(x,t),x,t,\text{Assumptions}\to \{t>\left | \text{t0}\right | ,x>\left | \text{x0}\right | \}\right ]$ due to IC/BC not zero

Maple

$u \left ( x,t \right ) =10\,\erf \left ({\frac{x+{\it x0}}{\sqrt{t-{\it t0}}}} \right )$

_______________________________________________________________________________________

#### 6.4 Left end at $$u(0,t)=\mu$$, non zero initial conditions, No source

problem number 61

Solve the heat equation

$\frac{ \partial u}{\partial t} = k \frac{ \partial ^2 u}{\partial x^2}$

For $$x>0$$ and $$t>0$$. The boundary conditions is $$u(0,t)=\mu$$ and And initial condition $$u(x,0)=\lambda$$

Mathematica

$\left \{\left \{u(x,t)\to \mu \text{Erf}\left (\frac{x}{2 \sqrt{k t}}\right )+\lambda \text{Erfc}\left (\frac{x}{2 \sqrt{k t}}\right )\right \}\right \}$

Maple

$u \left ( x,t \right ) = \left ( -\lambda +\mu \right ) \erf \left ( 1/2\,{\frac{x}{\sqrt{t}\sqrt{k}}} \right ) +\lambda$

_______________________________________________________________________________________

#### 6.5 No condition on left end. Initial conditions given, no source

problem number 62

From Mathematica DSolve help pages. Solve the heat equation for $$u(x,t)$$ on real line with $$t>0$$

$\frac{ \partial u}{\partial t}= \frac{ \partial ^2 u}{\partial x^2}$ With initial condition $u(x,0)= e^{-x^2}$

Mathematica

$\left \{\left \{u(x,t)\to \frac{e^{-\frac{x^2}{4 t+1}}}{\sqrt{4 t+1}}\right \}\right \}$

Maple

$u \left ( x,t \right ) ={\frac{1}{\sqrt{1+4\,t}}{{\rm e}^{-{\frac{{x}^{2}}{1+4\,t}}}}}$

_______________________________________________________________________________________

#### 6.6 With advection term and initial conditons

problem number 63

From Mathematica DSolve help pages. Solve the heat equation for $$u(x,t)$$ on real line with $$t>0$$

$\frac{ \partial u}{\partial t}= 12 \frac{ \partial ^2 u}{\partial x^2} + \sin t \frac{\partial u}{\partial x}$ With initial condition $u(x,0)= x$

Mathematica

$\{\{u(x,t)\to -\cos (t)+x+1\}\}$

Maple

$u \left ( x,t \right ) =-\cos \left ( t \right ) +x+1$

_______________________________________________________________________________________

#### 6.7 Initial position as a UnitBox function

problem number 64

From Mathematica DSolve help pages. Solve the heat equation for $$u(x,t)$$ on real line with $$t>0$$

$\frac{ \partial u}{\partial t}= \frac{ \partial ^2 u}{\partial x^2}$ With initial condition $u(x,0)= \text{UnitBox[x]}$ Where UnitBox is equal to 1 if $$|x| \leq \frac{1}{2}$$ and zero otherwise.

Mathematica

$\left \{\left \{u(x,t)\to \frac{1}{2} \left (\text{Erf}\left (\frac{1-2 x}{4 \sqrt{t}}\right )+\text{Erf}\left (\frac{2 x+1}{4 \sqrt{t}}\right )\right )\right \}\right \}$

Maple

$u \left ( x,t \right ) =-1/2\,\erf \left ( 1/4\,{\frac{2\,x-1}{\sqrt{t}}} \right ) +1/2\,\erf \left ( 1/4\,{\frac{2\,x+1}{\sqrt{t}}} \right )$

_______________________________________________________________________________________

#### 6.8 Left end ﬁxed at speciﬁc temperature, non-zero initial conditions, no source

problem number 65

From Mathematica DSolve help pages.

Solve the heat equation for $$u(x,t)$$ on half the line $$x>0$$ and $$t>0$$

$\frac{ \partial u}{\partial t}= \frac{ \partial ^2 u}{\partial x^2}$ With initial condition $u(x,0)= \cos x$ And boundary conditions $u(0,t)= 1$

Mathematica

$\left \{\left \{u(x,t)\to \begin{array}{cc} \{ & \begin{array}{cc} \frac{i e^{-\frac{x^2}{4 t}} \left (\text{DawsonF}\left (\frac{2 t-i x}{2 \sqrt{t}}\right )-\text{DawsonF}\left (\frac{2 t+i x}{2 \sqrt{t}}\right )\right )}{\sqrt{\pi }}+\text{Erfc}\left (\frac{x}{2 \sqrt{t}}\right ) & x>0 \\ \text{Indeterminate} & \text{True} \\\end{array} \\\end{array}\right \}\right \}$

Maple

$u \left ( x,t \right ) =1/2\,{{\rm e}^{-t+ix}}\erf \left ( 1/2\,{\frac{2\,it+x}{\sqrt{t}}} \right ) -\erf \left ( 1/2\,{\frac{x}{\sqrt{t}}} \right ) -1/2\,{{\rm e}^{-t-ix}}\erf \left ( 1/2\,{\frac{2\,it-x}{\sqrt{t}}} \right ) +1$

_______________________________________________________________________________________

#### 6.9 Left end function of temperature, zero initial conditions, no source

problem number 66

Solve the heat equation for $$u(x,t)$$ on half the line $$x>0$$ and $$t>0$$

$\frac{ \partial u}{\partial t}= k \frac{ \partial ^2 u}{\partial x^2}$ With initial condition $u(x,0)=0$ And boundary conditions \begin{align*} u(0,t) &= \sin (t) u(\infty ,t) &\leq \infty \end{align*}

The last condition above means it is bounded at inﬁnity.

Mathematica

$\left \{\left \{u(x,t)\to \frac{\left (2 k t+x^2\right ) \text{Erfc}\left (\frac{x}{2 \sqrt{k t}}\right )-\frac{2 x \sqrt{k t} e^{-\frac{x^2}{4 k t}}}{\sqrt{\pi }}}{2 k}\right \}\right \}$

Maple

$u \left ( x,t \right ) =-{\frac{1}{k\,\sqrt{\pi }} \left ({{\rm e}^{-1/4\,{\frac{{x}^{2}}{k\,t}}}}\sqrt{k}\sqrt{t}x+ \left ( k\,t+1/2\,{x}^{2} \right ) \left ( \erf \left ( 1/2\,{\frac{x}{\sqrt{k}\sqrt{t}}} \right ) -1 \right ) \sqrt{\pi } \right ) }$

_______________________________________________________________________________________

#### 6.10 Left end insulated, initial conditions triangle function. No source

problem number 67

From Mathematica DSolve help pages.

Solve the heat equation for $$u(x,t)$$ on half the line $$x>0$$ and $$t>0$$

$\frac{ \partial u}{\partial t}= \frac{ \partial ^2 u}{\partial x^2}$ With initial condition $u(x,0)= \text{UnitTriagle[x-3]}$ And boundary conditions $\frac{ \partial u}{\partial x}(0,t)= 0$

Mathematica

$\left \{\left \{u(x,t)\to \begin{array}{cc} \{ & \begin{array}{cc} \frac{1}{2} \left (\frac{\text{Erf}\left (\frac{\left | x-4\right | }{2 \sqrt{t}}\right ) (x-4)^2}{\left | 4-x\right | }+(x+2) \text{Erf}\left (\frac{x+2}{2 \sqrt{t}}\right )-2 (x+3) \text{Erf}\left (\frac{x+3}{2 \sqrt{t}}\right )+(x+4) \text{Erf}\left (\frac{x+4}{2 \sqrt{t}}\right )-\frac{2 (x-3)^2 \text{Erf}\left (\frac{\left | x-3\right | }{2 \sqrt{t}}\right )}{\left | 3-x\right | }+\frac{(x-2)^2 \text{Erf}\left (\frac{\left | x-2\right | }{2 \sqrt{t}}\right )}{\left | 2-x\right | }+\frac{2 \left (e^{-\frac{(x-4)^2}{4 t}}-2 e^{-\frac{(x-3)^2}{4 t}}+e^{-\frac{(x-2)^2}{4 t}}+e^{-\frac{(x+2)^2}{4 t}}-2 e^{-\frac{(x+3)^2}{4 t}}+e^{-\frac{(x+4)^2}{4 t}}\right ) \sqrt{t}}{\sqrt{\pi }}\right ) & x>0 \\ \text{Indeterminate} & \text{True} \\\end{array} \\\end{array}\right \}\right \}$

Maple

$u \left ( x,t \right ) ={\frac{1}{\sqrt{\pi }\sqrt{t}} \left ( t{{\rm e}^{-1/4\,{\frac{ \left ( -4+x \right ) ^{2}}{t}}}}-2\,t{{\rm e}^{-1/4\,{\frac{ \left ( -3+x \right ) ^{2}}{t}}}}+t{{\rm e}^{-1/4\,{\frac{ \left ( -2+x \right ) ^{2}}{t}}}}+t{{\rm e}^{-1/4\,{\frac{ \left ( 2+x \right ) ^{2}}{t}}}}+t{{\rm e}^{-1/4\,{\frac{ \left ( 4+x \right ) ^{2}}{t}}}}-2\,t{{\rm e}^{-1/4\,{\frac{ \left ( x+3 \right ) ^{2}}{t}}}}+1/2\, \left ( \left ( -4+x \right ) \erf \left ( 1/2\,{\frac{-4+x}{\sqrt{t}}} \right ) + \left ( -2\,x+6 \right ) \erf \left ( 1/2\,{\frac{-3+x}{\sqrt{t}}} \right ) + \left ( -2+x \right ) \erf \left ( 1/2\,{\frac{-2+x}{\sqrt{t}}} \right ) + \left ( 2+x \right ) \erf \left ( 1/2\,{\frac{2+x}{\sqrt{t}}} \right ) + \left ( 4+x \right ) \erf \left ( 1/2\,{\frac{4+x}{\sqrt{t}}} \right ) -2\,\erf \left ( 1/2\,{\frac{x+3}{\sqrt{t}}} \right ) \left ( x+3 \right ) \right ) \sqrt{\pi }\sqrt{t} \right ) }$

_______________________________________________________________________________________

#### 6.11 one end insulated at arbitray location, initial conditions not at $$t=0$$. No source

problem number 68

Solve for $$u(x,t)$$ for $$t>0,x>0$$
$\frac{ \partial u}{\partial t}= \frac{1}{4} \frac{ \partial ^2 u}{\partial x^2}$ With initial condition $u(x,t_0)= 10 e^{-x^2}$ And boundary conditions $\frac{ \partial u}{\partial x}(x_0,t)= 0$
$\text{DSolve}\left [\left \{u^{(0,1)}(x,t)=\frac{1}{4} u^{(2,0)}(x,t),u(x,\text{t0})=10 e^{-x^2},u^{(1,0)}(\text{x0},t)=0\right \},u(x,t),\{x,t\},\text{Assumptions}\to \{x>0,t>0\}\right ]$
$u \left ( x,t \right ) =5\,{\frac{1}{\sqrt{t-{\it t0}+1}} \left ({{\rm e}^{4\,{\frac{{\it x0}\, \left ( -x+{\it x0} \right ) }{-t+{\it t0}-1}}}}\erf \left ({\frac{ \left ({\it t0}-t+1 \right ){\it x0}-x}{\sqrt{t-{\it t0}+1}\sqrt{t-{\it t0}}}} \right ) +{{\rm e}^{4\,{\frac{{\it x0}\, \left ( -x+{\it x0} \right ) }{-t+{\it t0}-1}}}}+\erf \left ({\frac{ \left ( -t+{\it t0}-1 \right ){\it x0}+x}{\sqrt{t-{\it t0}+1}\sqrt{t-{\it t0}}}} \right ) +1 \right ){{\rm e}^{{\frac{{x}^{2}}{-t+{\it t0}-1}}}}}$