Consider the problem $$\cases{u_t - Du_{xx} = 0, \qquad x>0, t>0 \\ u(x,0) = 0, \:\:\:\:\:\:\qquad x>0 \\ u(0,t) = q }$$ for $q,D\in \mathbb{R}_{>0}$. We will attempt solving it in two slightly different ways:
- (1) Extend $x$ to the whole of $\mathbb{R}$ by ôdd extension of $u$ with respect to $x=0$ and then apply one-sided Laplace transform in the $x$-direction
- (2) Homogenization of boundary condition, and then repeat the steps above
(1)
Define the odd extension $u^-$ of $u = u(x,t)$ as $$u^-=\cases{u(x,t), \:\:\qquad x \geq 0 \\ -u(-x,t), \quad x<0}$$ Then $u^-_t = \dfrac{\partial}{\partial t} u^- $ and $u^-_{xx} = \dfrac{\partial}{\partial x^2} u^- + 2u(0,t)\delta'(x)$. So our problem becomes $$\cases{u^-_t - Du^-_{xx} = -2q\delta'(x) \\ u^-(x,0) = 0 }$$ Laplace transformation in the $x$-direction, with $\mathcal{L}_x u(x,t)= U(s,t)$ gives the equation $U_t - Ds^2U = - 2qs$ which has the solution $U(s,t) = a(s)e^{Ds^2t}+\dfrac{2q}{s}$ but $U(s,0) = 0$ so $a(s) = -\dfrac{2q}{s}$. The transformation pair $e^{-x^2} \overset{\mathcal{L}}\mapsto \sqrt{\pi}e^{-s^2/4}$ together with the scaling rule means $e^{Ds^2t} \overset{\mathcal{L}^{-1}}\mapsto \underbrace{\dfrac{1}{\sqrt{4\pi D t}} e^{-x^2/4 D t}}_{g(x,t)}$. The convolution theorem finally hands us the result $$u(x,t) = \mathcal{L}^{-1}\{-\dfrac{2q}{s}e^{Ds^2t}+\dfrac{2q}{s}2q/s\}(x,t) = 2q \theta(x) - 2q\theta * g = 2q \theta(x) - 2q\dfrac{1}{\sqrt{4\pi D t}}\int_{-\infty}^{\infty} \theta(x-y) e^{-y^2/4 D t} dy = \{\xi = y/\sqrt{4 D t}\} = 2q \theta(x) - q\dfrac{2}{\sqrt{\pi}} \int_{-\infty}^{x/\sqrt{4Dt}} e^{-u^2} d\xi = 2q \theta(x)-q(erf(x/\sqrt{4Dt})+1) = q(1-erf(x/\sqrt{4Dt}))$$ since $x>0$.
(2)
Set $v(x,t) = u(x,t) -q$ and the problem stated for $v$ is: $$\cases{v_t - Dv_{xx} = 0, \qquad x>0, t>0 \\ v(x,0) = -q, \:\:\:\qquad x>0 \\ v(0,t) = 0 }$$ The only real difference here is that the Laplace transform yields the equation $V_t - Ds^2V = 0$ (this is because $V(0,t) = 0$ so the term $2v(0,t)\delta'(x)$ vanishes. But our solution to $V$ is then $V(s,t) = -\dfrac{q}{s}e^{Ds^2t}$. Notice how the $2$ from our $a(s)$ has disappeared! This will in fact ultimately lead us to the solution $u(x,t) = \dfrac{q}{2}(1-erf(x/\sqrt{4Dt}))$
Question Either I have done a) a careless mistake or b) the problem is not well-posed (which it surely is?). So I ask you to find my mistake(s)!