Question
Solve the following heat equation on the semi-infinite rod by Fourier Transform $$u_t=ku_{xx}$$ where $x,t>0$ and $u_x(0,t) =0$ and $u(x,0)=\begin{cases} 1, & 0 < x <2 \\ 0, & 2\leq x \end{cases} $
My attempt
If we apply Fourier Trans. to both sides, we get
$ \frac{\partial \mathcal{F} \{U(w,t)\}}{\partial t} = -kw^{2} \mathcal{F} \{U(w,t)\}$
Solving the ODE, we have $U(w,t)=C(w)e^{-kw^2t}$
to find $C(w)$ we use the initial condt. $u(x,0)$
$C(w)=\mathcal{F} \{u(x,0)\}=\frac{1}{(2\pi)^{1/2}}\int_{-\infty}^{\infty} u(x,0) e^{-iwx} \ dx $
Could you help me to solve the rest? What is the solution $$u\left(x,t\right)=\mathrm{TF}^{-1}\{U(w,t)\}=\frac{1}{(2\pi)^{1/2}}\intop_{x\in\mathbb{R}}C(w)e^{-kw^2t}e^{iwx}dw$$?
(I can't calculate $C(w)$ since $u(x,0)$ is undefined on $-\infty<x<0$ )