Questions--Heat equation with $x>0,t>0$ I have the following problem:
$$u_t=u_{xx}, x>0, t>0$$
$$u(x=0,t)=0 , t>0$$
$$u(x,t=0)=f(x), x>0$$
The solution of the problem is: 
$$u(x,t)=\int_0^{+\infty} a(k) \sin(kx) e^{-k^2t} dk$$
$$u(x,0)=f(x)=\int_0^{+\infty} a(k) \sin(kx) dk$$
$$\sin(k'x) f(x)= \sin(k'x) \int_0^{+\infty} a(k) \sin(kx) dk \Rightarrow \int_{0}^{\infty}\sin(k'x) f(x) dx =  \int_0^{+\infty} a(k) \sin(kx) \sin(k'x) dk dx$$
We know the integral:
$$\int_{-\infty}^{+\infty} e^{-i(k-k')x}dx= 2 \pi \delta(k-k')$$
$$e^{-ikx} e^{ik'x}=\cos(kx) \cos(k'x)+\sin(kx) \sin(k'x)+ i(\cos(kx) \sin(k'x)-sin(kx) \cos(k'x)) $$
Why do we know that $e^{-ikx} e^{ik'x}=$ is real,so  $\cos(kx) \sin(k'x)-sin(kx) \cos(k'x)=0$ ?
Also, why $\int_{-\infty}^{+\infty} (\cos(kx) \cos(k'x)+\sin(kx) \sin(k'x))dx=2 \int_{\infty}^{+\infty} \sin(kx) \sin(k'x) dx$ ?

Of course use separation of variables:
Let $u(x,t)=X(x)T(t)$ ,
Then $X(x)T'(t)=X''(x)T(t)$
$\dfrac{T'(t)}{T(t)}=\dfrac{X''(x)}{X(x)}=-k^2$
$\begin{cases}\dfrac{T'(t)}{T(t)}=-k^2\\X''(x)+k^2X(x)=0\end{cases}$
$\begin{cases}T(t)=c_3(k)e^{-tk^2}\\X(x)=\begin{cases}c_1(k)\sin xk+c_2(k)\cos xk&\text{when}~k\neq0\\c_1x+c_2&\text{when}~k=0\end{cases}\end{cases}$
$\therefore u(x,t)=\int_0^\infty a(k)e^{-tk^2}\sin xk~dk+\int_0^\infty b(k)e^{-tk^2}\cos xk~dk$
$u(0,t)=0$ :
$\int_0^\infty b(k)e^{-tk^2}~dk=0$
$b(k)=0$
$\therefore u(x,t)=\int_0^\infty a(k)e^{-tk^2}\sin xk~dk$
$u(x,0)=f(x)$ :
$\int_0^\infty a(k)\sin xk~dk=f(x)$
$\mathcal{F}_{s,k\to x}\{a(k)\}=f(x)$
$a(k)=\mathcal{F}^{-1}_{s,x\to k}\{f(x)\}$
$\therefore u(x,t)=\int_0^\infty\mathcal{F}^{-1}_{s,x\to k}\{f(x)\}e^{-tk^2}\sin xk~dk$
