Solve $\kappa \frac{\partial^2 u}{\partial x^2} = \frac{\partial u }{\partial t}$ using Fourier sine or cosine 
Solve the problem
  $$\kappa \frac{\partial^2 u}{\partial x^2} = \frac{\partial u }{\partial t}$$
  given that $u(0,t) = u_0$, a constant and $u(x,0) = 0.$ 
You may also use $$\int_{0}^{\infty}\frac{\sin kx}{k} = \frac{\pi}{2}$$ and $$\mathfrak{F}_S\left(\frac{1}{x}e^{-x^2/2}\right) = \sqrt{\frac{\pi}{2}}\operatorname{erf}\left(\frac{k}{\sqrt{2}}\right).$$

Ans: $u_0 = \operatorname{erf}\left(\frac{x}{s\sqrt{\kappa t}}\right)$
What I've done so far is take fourier sine series w.r.t. $x$ and got the ODE $$\kappa k \sqrt{\frac{\pi}{2}} u_0 = \frac{\partial}{\partial t}\mathfrak{F}_S(u) + k^2 \kappa \mathfrak{F}_S(u)$$ 
By using integrating factor and solving, my solution became $\mathfrak{F}_S(u) = \frac{1}{k}\sqrt{\frac{\pi}{2}}u_0 \left(1 - e^{\kappa k^2t}\right)$. I couldn't attain the answer as mentioned above. Just wondering anyone could help me check and tell me what to do from this point onwards if I'm doing it right so far. 
Thanks for your time. 
 A: Similar to Solving PDE using Laplace transforms:
Let $u(x,t)=X(x)T(t)$ ,
Then $\kappa X''(x)T(t)=X(x)T'(t)$
$\dfrac{T'(t)}{\kappa T(t)}=\dfrac{X''(x)}{X(x)}=-s^2$
$\begin{cases}\dfrac{T'(t)}{T(t)}=-\kappa s^2\\X''(x)+s^2X(x)=0\end{cases}$
$\begin{cases}T(t)=c_3(s)e^{-\kappa ts^2}\\X(x)=\begin{cases}c_1(s)\sin xs+c_2(s)\cos xs&\text{when}~s\neq0\\c_1x+c_2&\text{when}~s=0\end{cases}\end{cases}$
$\therefore u(x,t)=\int_0^\infty C_1(s)e^{-\kappa ts^2}\sin xs~ds+\int_0^\infty C_2(s)e^{-\kappa ts^2}\cos xs~ds$
$u(0,t)=u_0$ :
$\int_0^\infty C_2(s)e^{-\kappa ts^2}~ds=u_0$
$C_2(s)=u_0\delta(s)$
$\therefore u(x,t)=\int_0^\infty C_1(s)e^{-\kappa ts^2}\sin xs~ds+\int_0^\infty u_0\delta(s)e^{-\kappa ts^2}\cos xs~ds=\int_0^\infty C_1(s)e^{-\kappa ts^2}\sin xs~ds+u_0$
$u(x,0)=0$ :
$\int_0^\infty C_1(s)\sin xs~ds+u_0=0$
$\mathcal{F}_{s,s\to x}\{C_1(s)\}=-u_0$
$C_1(s)=\mathcal{F}^{-1}_{s,x\to s}\{-u_0\}=-\dfrac{2u_0}{\pi s}$
$\therefore u(x,t)=u_0-\dfrac{2u_0}{\pi}\int_0^\infty\dfrac{e^{-\kappa ts^2}\sin xs}{s}~ds=u_0~\text{erfc}\left(\dfrac{x}{2\sqrt{\kappa t}}\right)$
