1D Heat Equation, Infinite Bar Find the solution $u(x, t)$ to the 1-D heat equation
$$ u_t = c^2u_{xx}$$ 
with initial conditions 
$$ u(x,0) =  \begin{cases} 
      \hfill 0    \hfill & \text{ if $x < 0$ } \\
      \hfill u_0 \hfill & \text{ if $x > 0$}
  \end{cases}
$$
The final answer should be expressed in terms of the error function, which is defined as: 
$$ \frac 2 {\sqrt{\pi}} \int _{-\infty}^\infty e^{-w^2} \, dx$$
So far, I have taken the Fourier transform of the PDE and obtained
$$\frac {du}{dt} = -c^2w^2u$$
Then, I took the Fourier transform of the initial conditions and obtained
$$ \frac {u_0}{iw \sqrt{2\pi}}$$
After this part, I am not sure what do. Can someone clarify if what I have done is correct so far and tell me what I should do next?
 A: Solving the differential equation $U_t(w,t) = -c^2 w^2 U(w,t)$ gives
\begin{equation}
U(w,t) = F(w) e^{-c^2w^2t},\ w\in \mathbb{R},\ t>0
\end{equation}
where $F(w)$ is the Fourier Transformation of the initial condition
function $f(x)$.
Now we shall use the fact that $\mathcal{F}^{-1}(F\cdot G) = f * g$, where
$*$ denotes the convolution of $f$ and $g$.
\begin{align}
u(x,t) &= \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}f(z)g(x-z,t)\ dz \\
&= \frac{1}{2c\sqrt{\pi t}}\int_{-\infty}^{\infty}f(z)\exp\left(-\frac{(x-z)^2}{4c^2t}\right)\ dz \\
&=\frac{1}{\sqrt{\pi}}\int_{-\infty}^{\infty}f(x-2c\tau\sqrt{t})\ e^{-\tau^2}\ d\tau\\
&= \frac{u_0}{\sqrt{\pi}} \int_{-\infty}^{x/(2c\sqrt{t})}e^{-\tau^2}d\tau\\
&= \frac{u_0}{\sqrt{\pi}} \left(\int_{-\infty}^{0}e^{-\tau^2}d\tau \ +\  \int_{0}^{x/(2c\sqrt{t})}e^{-\tau^2}d\tau \right)\\
&= \frac{u_0}{2} \left(1+erf\left(\frac{x}{2c\sqrt{t}}\right)\right)
\end{align}
where we used the inverse Fourier transform of $G(w,t) = e^{-c^2w^2t}$ and the transformation $\tau = \frac{x-z}{2c\sqrt{t}}$. 
