Solving the Heat/Diffusion Equation with Piecewise Continuous Initial Condition I'm trying to solve the following Cauchy problem in ${\rm \Bbb R}$ without using the fundamental solution.
$$
\begin{cases}
u_t = u_{xx} &\text{ for }\;\,(x,t)\in\Bbb R\times\{ 0<t<\infty\}\\
u|_{t=0}=g, 
\end{cases}
$$
where $g(x)$ is defined by
$$
g(x)=
\begin{cases} 
      0, & x < 0 \\
      1, & x > 0  \\
      \frac{1}{2} & x=0
\end{cases}
$$
I have a hint to look for a solution in the form $u(x,t)=\phi\big(\frac{x}{\sqrt{t}}\big)$, but I don't know how to apply this hint and get started! Any help, or skeleton of a solution would be appreciated! 
Edit: I think we can use the hint to write $\phi$ as an ODE, but then it would be a function of both x and t, so I don't know if this would help.
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

$\ds{\partiald{\mrm{u}\pars{x,t}}{t} =
\partiald[2]{\mrm{u}\pars{x,t}}{x}.\qquad\mrm{u}\pars{x,0} = \mrm{g}\pars{x} \equiv
\left\{\begin{array}{lrcl}
\ds{0\,,} & \ds{x} & \ds{<} & \ds{0}
\\
\ds{{1 \over 2}\,,} & \ds{x} & \ds{=} & \ds{0}
\\
\ds{1\,,} & \ds{x} & \ds{>} & \ds{0}
\end{array}\right.}$.

Hint:
\begin{align}
\int_{0}^{\infty}\partiald{\mrm{u}\pars{x,t}}{t}\expo{-st}\dd t & =
\int_{0}^{\infty}\partiald[2]{\mrm{u}\pars{x,t}}{x}\expo{-st}\dd t
\\[5mm]
-\mrm{g}\pars{x} +s\hat{\mrm{u}}\pars{x,s}& =
\partiald[2]{\hat{\mrm{u}}\pars{x,t}}{x}\,,\quad
\left\{\begin{array}{rcl}
\ds{\hat{\mrm{u}}\pars{x,s}} & \ds{\equiv} & \ds{\int_{0}^{\infty}\mrm{u}\pars{x,t}\expo{-st}\dd t}
\\[2mm]
\ds{\mrm{u}\pars{x,t}} & \ds{=} &
\ds{\int_{c - \infty\ic}^{c + \infty\ic}}\hat{\mrm{u}}\pars{x,s}\expo{ts}{\dd s \over 2\pi\ic}
\end{array}\right.
\end{align}
