### 7 Heat PDE on inﬁnite domain, 1D

_______________________________________________________________________________________

#### 7.1 No boundary conditions speciﬁed. Initial conditions $$u(x,0)=\sin (x)$$ and no source

problem number 69

Solve the heat equation

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

For $$-\infty <x<\infty$$ and $$t>0$$. The boundary conditions are

Initial condition is $$u(x,0)=\sin (x)$$

Mathematica

$\left \{\left \{u(x,t)\to e^{-k t} \sin (x)+m t\right \}\right \}$

Maple

$u \left ( x,t \right ) =\sin \left ( x \right ){{\rm e}^{-k\,t}}+mt$

_______________________________________________________________________________________

#### 7.2 No intial conditions and no boundary conditions speciﬁed

problem number 70

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

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

Mathematica

$\text{DSolve}\left [u^{(0,1)}(x,t)=u^{(2,0)}(x,t),u(x,t),\{x,t\}\right ]$

Maple

$u \left ( x,t \right ) ={\it \_C3}\,{{\rm e}^{{\it \_c}_{{1}}t}}{\it \_C1}\,{{\rm e}^{\sqrt{{\it \_c}_{{1}}}x}}+{\frac{{\it \_C3}\,{{\rm e}^{{\it \_c}_{{1}}t}}{\it \_C2}}{{{\rm e}^{\sqrt{{\it \_c}_{{1}}}x}}}}$

_______________________________________________________________________________________

#### 7.3 with source and a piecewise initial condition at $$t>0$$

problem number 71

Solve the heat equation for $$u(x,t)$$ on real line with $$t>0$$
$\frac{ \partial u}{\partial t}+ 1 = \mu \frac{ \partial ^2 u}{\partial x^2}$ With initial condition $u(x,1)= \begin{cases} 0 & x \geq 0 \\ 1 & x < 0 \end{cases}$
$\text{DSolve}\left [\left \{u^{(0,1)}(x,t)+1=\mu u^{(2,0)}(x,t),u(x,1)=\left (\begin{array}{cc} \{ & \begin{array}{cc} 1 & x\leq 0 \\ 0 & \text{True} \\\end{array} \\\end{array}\right )\right \},u(x,t),x,t,\text{Assumptions}\to \mu >0\right ]$ due to i.c. not at zero
$u \left ( x,t \right ) =3/2-1/2\,\erf \left ( 1/2\,{\frac{x}{\sqrt{t-1}\sqrt{\mu }}} \right ) -t$