TITLE: Find the Green's Function and solution of a heat equation on the half line
QUESTION [12 upvotes]: Consider the heat equation on the half line 
$$u_t = ku_{xx},\quad x > 0,\, t > 0,\\ u(x,0) = 0, \,x \in\mathbf R,\\
 u(0,t) = \alpha(t),\, t > 0.
$$
Find Green's function and the solution.
The solution is $$u(x,t) = k \cdot \int_0^t \frac{x}{\sqrt{4\pi}} \cdot \frac{ 1}{(k(t-t'))^{3/2}} \cdot  \exp\left(\frac{-x^2}{4k(t-t')}\right) \cdot \alpha(t')dt'$$
Honestly I just need guidance, I am very lost so even a similiar example would be appreciated.

REPLY [5 votes]: Although it's years late, I thought it might be useful for later readers to provide an answer corresponding to the original intention of the question.
For simplicity, I set $k=1$ here. Let 
$$
L=\frac{\partial}{\partial t}-\frac{\partial^2}{\partial x^2}.
$$
It is assumed known that a fundamental solution (also called a free Green's function) is given by 
$$
E(x,t;\xi,\tau)=H(t-\tau)\frac{1}{\sqrt{4\pi(t-\tau)}}e^{-(x-\xi)^2/(4(t-\tau))}
$$
for $x,t,\xi,\tau\in\mathbb{R}$. Here $H$ denotes the Heaviside function. This function satisfies 
$$
LE=\delta(x-\xi)\delta(t-\tau)
$$
or 
$$
LE=\delta\bigl((x,t)-(\xi,\tau)\bigr)
$$
if you prefer. Furthermore, this fundamental solution is causal, which simply means that $E(x,t;\xi,\tau)=0$ whenever $t<\tau$.
The Green's function $g(x,t;\xi,\tau)$ for the boundary value problem satisfies the same differential equation as a fundamental solution and, in addition, satisfies the homogeneous boundary conditions, i.e., $g(x,0;\xi,\tau)=0$ for $x\in\mathbb{R}$ and $g(0,t;\xi,\tau)=0$ for $t>0$. Here we always suppose that $\xi,\tau>0$. 
Using the method of images, we can construct $g$ from $E$: since $E$ is causal, the boundary condition for $t=0$ is automatically satisfied. It is then sufficient to set 
$$
g(x,t;\xi,\tau)=E(x,t;\xi,\tau)-E(x,t;-\xi,\tau)
$$
(placing a "negative image charge" at $(\xi^*,\tau^*)=(-\xi,\tau)$). It is easily checked that $g$ now satisfies the homogeneous boundary conditions. This is Green's function for the problem.
The solution of the given boundary value problem is found from 
$$
u(x,t)=\int_{\partial\varOmega} \alpha \frac{\partial g(x,t;\cdot)}{\partial n}
$$
where $\varOmega$ is the domain for the differential equation (in this case, $\{(x,t)\in\mathbb{R}^2\colon x>0,\ t>0\}$) and $\partial\varOmega$ is its boundary. The derivative $\frac{\partial}{\partial n}$ denotes the normal derivative, i.e., the directional derivative in the direction of the (outward-pointing) normal vector to the domain $\varOmega$.
In our case, the boundary consists of the positive $x$-axis and the positive $t$-axis. Since the boundary condition on the positive $x$-axis is zero, the integral along that part will vanish, so it remains to consider the positive $t$-axis, which we parametrize by  $\gamma\colon[0,\infty)\to\mathbb{R}^2$, $\gamma(\tau)=(0,\tau)$.
Then the normal derivative of $g$ on the boundary is given by 
\begin{align*}
\frac{\partial g(x,t;\cdot)}{\partial n}\biggr|_{\gamma(\tau)}&=-\frac{\partial}{\partial\xi}g(x,t;\xi,\tau)\biggr|_{\xi=0} \\
&=H(t-\tau)\frac{2(x-\xi)}{4(t-\tau)\sqrt{4\pi(t-\tau)}}e^{-(x-\xi)^2/(4(t-\tau))}\biggr|_{\xi=0}\\
&\quad\ -H(t-\tau)\frac{-2(x+\xi)}{4(t-\tau)\sqrt{4\pi(t-\tau)}} e^{-(x+\xi)^2/(4(t-\tau))}\biggr|_{\xi=0} \\
&=H(t-\tau)\frac{x}{\sqrt{4\pi}(t-\tau)^{3/2}}e^{-x^2/(4(t-\tau))}
\end{align*}
The line integral for the solution hence becomes
\begin{align*}
  u(x,t)&=\int_{0}^\infty \alpha(\tau) H(t-\tau)\frac{x}{\sqrt{4\pi}(t-\tau)^{3/2}}e^{-x^2/(4(t-\tau))}\, d\tau \\
  &=\frac{x}{\sqrt{4\pi}} \int_0^t\frac{\alpha(\tau)}{(t-\tau)^{3/2}}e^{-x^2/(4(t-\tau))}\, d\tau.
  \end{align*}