The problem is here:

http://www.math.toronto.edu/courses/apm346h1/20169/PDE-textbook/Chapter3/S3.2.P.htmlHere is my tentative solution, hope everyone for correction:

consider:

$$w(x,t) = \left\{ {\matrix{

{u(x,t) - 1} & {0 < x < \infty } & {t < 1} \cr

{u(x,t)} & {0 < x < \infty } & {t > 1} \cr

} } \right.$$

Then we have:

$${w_t} = {u_t}, {w_{xx}} = {u_{xx}}$$

Therefore:

$$\matrix{

{{w_t} = k{w_{xx}}} & {t > 0} & {x > 0} \cr

{w\left| {_{t = 0} = u(x,0) - 1 = - 1} \right.} & {} & {x > 0} \cr

{w\left| {_{x = 0} = \matrix{

{\left\{ {\matrix{

{u(0,t) - 1 = 1 - 1 = 0} & {t < 1} \cr

{u(0,t) = 0} & {t > 1} \cr

} } \right\}} & { = 0} \cr

} } \right.} & {t > 0} & {} \cr

} $$

which is the Dirichlet boundary condition.

Solving this problem wrt $w(x,t)$, I get (The calculation may be wrong):

$$w = 1 - erf({x \over {\sqrt {4kt} }})$$

Therefore:

$$u = \left\{ {\matrix{

{2 - erf({x \over {\sqrt {4kt} }})} & {x > 0} & {0 < t < 1} \cr

{1 - erf({x \over {\sqrt {4kt} }})} & {x > 0} & {t > 1} \cr

} } \right.$$

However, in this case $u(x,t)$ is not continuous at $t = 1$.

Hope everyone for correction / verification.