Advection Diffusion Equation on Semi-Infinite Domain

I am going to outline a solution with a few differences:

1) I am going to use the boundary condition $u(0,t) = u_0$ for all $t \ge 0$.

2) I am going to assume that $u(x,0)=0$ for all $x \gt 0$.

3) I am going to use Laplace transforms in $t$ to help with the solution.

That all said, define the Laplace transform of the solution

$$\hat{u}(x,s) = \int_0^{\infty} dt \, u(x,t) \, e^{-s t}$$

The PDE above then becomes an ODE in $x$:

$$k \hat{u}'' + v \hat{u}'-s \hat{u}=0$$ $$\hat{u}(0,s) = \frac{u_0}{s}$$ $$\lim_{x \to \infty} \hat{u}(x,s) = 0$$

The general solution to the ODE may be written as

$$\hat{u}(x,s) = A(s) e^{r_+ x} + B(s) e^{r_- x}$$

where

$$r_{\pm} = -\frac{v}{2 k} \pm \frac{\sqrt{v^2+4 k s}}{2 k}$$

Our boundary conditions imply that $A(s)=0$ and $B(s)=u_0/s$. The solution to the equation is then an inverse Laplace transform:

$$u(x,t) = \frac{u_0}{i 2 \pi} e^{-v x/(2 k)} \int_{c-i \infty}^{c+i \infty} \frac{ds}{s} e^{-x\sqrt{v^2+4 k s} /(2 k)} \, e^{s t}$$

for some $c \gt 0$. Our job is now to evaluate this integral, which we will do via the residue theorem as follows.

Consider the following integral in the complex plane:

$$\oint_C \frac{dz}{z} e^{-x\sqrt{v^2+4 k z} /(2 k)} \, e^{z t}$$

where $C$ is the following contour:

enter image description here

Note the point is the branch point. I will assert without proof that the integral vanishes along the sections $C_2$, $C_4$, and $C_6$ of $C$. This leaves $C_1$ (the ILT), $C_3$, and $C_5$. There is a pole within the contour at $z=0$, so by the residue theorem, we have

$$\frac{1}{i 2 \pi}\left [\int_{C_1} + \int_{C_3} + \int_{C_5} \right ]\frac{dz}{z} e^{-x\sqrt{v^2+4 k z} /(2 k)} \, e^{z t} = e^{-v x/(2 k)}$$

Along $C_3$, note that there is a branch point at $z=-v^2/(4 k)$. Thus we parametrize $z=-v^2/(4 k) + e^{i \pi} y$; the integral over $C_3$ becomes

$$e^{-v^2 t/(4 k)} \int_{\infty}^0 \frac{dy}{y+\frac{v^2}{4 k}} \frac{e^{-i (x/(\sqrt{k})) \sqrt{y}}}{\sqrt{y}} e^{-t y}$$

Similarly, along $C_5$, let $z=-v^2/(4 k) + e^{-i \pi} y$; the integral over $C_5$ becomes

$$e^{-v^2 t/(4 k)} \int_0^{\infty} \frac{dy}{y+\frac{v^2}{4 k}} e^{i (x/(\sqrt{k})) \sqrt{y}}\, e^{-t y}$$

Putting this all together as above, we get an expression for the ILT:

$$\frac{1}{i 2 \pi} \int_{c-i \infty}^{c+i \infty} \frac{ds}{s} e^{-(x/(2 k)) \sqrt{v^2+4 k s}} \, e^{s t} = e^{-x v/(2 k)} - \frac{e^{-v^2 t/(4 k)}}{\pi} \int_0^{\infty} \frac{dy}{y+\frac{v^2}{4 k}} \sin{\frac{x \sqrt{y}}{\sqrt{k}}} \, e^{-t y}$$

ADDENDUM

I now address the evaluation of the integral on the RHS. Making the substitution $y=u^2$, we get

$$\frac{e^{-a^2 t}}{\pi} \int_{-\infty}^{\infty} du \frac{u \sin{b u}}{a^2+u^2} e^{-t u^2}$$

where $a^2=v^2/(4 k)$ and $b=x/\sqrt{k}$. This integral is a challenge to say the least, with Mathematica unable to evaluate analytically. That said, a minor rewrite of the integrand reveals a strategy for evaluation:

$$\frac{e^{-a^2 t}}{\pi} \int_{-\infty}^{\infty} du \frac{u^2}{a^2+u^2} \frac{\sin{b u}}{u} e^{-t u^2}$$

which in turn may be written as

$$\frac{e^{-a^2 t}}{\pi} \int_{-\infty}^{\infty} du \frac{\sin{b u}}{u} e^{-t u^2} - \frac{a^2 \,e^{-a^2 t}}{\pi} \int_{-\infty}^{\infty} \frac{du }{a^2+u^2} \frac{\sin{b u}}{u} e^{-t u^2}$$

The former integral may be evaluated any number of ways, e.g., Parseval's Theorem. I get

$$\int_{-\infty}^{\infty} du \frac{\sin{b u}}{u} e^{-t u^2} = \pi \, \text{erf}\left(\frac{b}{2 \sqrt{t}}\right)$$

The latter integral is over a product of three functions with known Fourier transforms. To evaluate this integral using Parseval's Theorem, we need to take the Fourier transform of a product of two of the functions by using the convolution theorem. As an illustration, let

$$f(u) = \frac{1}{a^2+u^2} \frac{\sin{b u}}{u}$$

Then by the convolution theorem, the Fourier transform $\hat{f}(k)$ is

$$\hat{f}(k) = \frac{\pi}{2 a} \int_{-b}^b dk' e^{-a |k-k'|}$$

Believe it or not, Mathematica wouldn't even evaluate this one. That said, it is not too difficult: just consider the cases $k \lt -b$, $k \gt b$, and $|k| \le b$. The result is

$$\hat{f}(k) = \begin{cases}\frac{\pi}{a^2} \left (1-e^{-a b} \cosh{a k} \right ) & |k| \le b\\ \frac{\pi}{a^2} \sinh{a b} \, e^{-a |k|} & |k| \gt b \end{cases}$$

The integral we seek is then

$$\int_{-\infty}^{\infty} \frac{du }{a^2+u^2} \frac{\sin{b u}}{u} e^{-t u^2} = \frac{1}{2 \pi} \sqrt{\frac{\pi}{t}} \int_{-\infty}^{\infty} dk \, \hat{f}(k) \, e^{-k^2/(4 t)}$$

which is expressible in terms of error functions.


Let $u(x,t)=X(x)T(t)$ ,

Then $X(x)T'(t)-vX'(x)T(t)=kX''(x)T(t)$

$X(x)T'(t)=kX''(x)T(t)+vX'(x)T(t)$

$X(x)T'(t)=(kX''(x)+vX'(x))T(t)$

$\dfrac{T'(t)}{T(t)}=\dfrac{kX''(x)+vX'(x)}{X(x)}=-\dfrac{4k^2s^2+v^2}{4k}$

$\begin{cases}\dfrac{T'(t)}{T(t)}=-\dfrac{4k^2s^2+v^2}{4k}\\kX''(x)+vX'(x)+\dfrac{4k^2s^2+v^2}{4k}X(x)=0\end{cases}$

$\begin{cases}T(t)=c_3(s)e^{-\frac{t(4k^2s^2+v^2)}{4k}}\\X(x)=\begin{cases}c_1(s)e^{-\frac{vx}{2k}}\sin xs+c_2(s)e^{-\frac{vx}{2k}}\cos xs&\text{when}~s\neq0\\c_1xe^{-\frac{vx}{2k}}+c_2e^{-\frac{vx}{2k}}&\text{when}~s=0\end{cases}\end{cases}$

$\therefore u(x,t)=\int_0^\infty C_1(s)e^{-\frac{2vx+t(4ks^2+v^2)}{4k}}\sin xs~ds+\int_0^\infty C_2(s)e^{-\frac{2vx+t(4ks^2+v^2)}{4k}}\cos xs~ds$

$u_x(x,t)=\int_0^\infty C_1(s)e^{-\frac{2vx+t(4ks^2+v^2)}{4k}}\left(-\dfrac{v}{2k}\sin xs+s\cos xs\right)ds+\int_0^\infty C_2(s)e^{-\frac{2vx+t(4ks^2+v^2)}{4k}}\left(-\dfrac{v}{2k}\cos xs-s\sin xs\right)ds$

If the B.C. is $u_x(0,t)=0$ :

$\int_0^\infty sC_1(s)e^{-\frac{t(4ks^2+v^2)}{4k}}~ds-\int_0^\infty\dfrac{v}{2k}C_2(s)e^{-\frac{t(4ks^2+v^2)}{4k}}~ds=0$

$\int_0^\infty\left(sC_1(s)-\dfrac{v}{2k}C_2(s)\right)e^{-\frac{t(4ks^2+v^2)}{4k}}~ds=0$

$sC_1(s)-\dfrac{v}{2k}C_2(s)=0$

$C_2(s)=\dfrac{2ks}{v}C_1(s)$

$\therefore u(x,t)=\int_0^\infty C_1(s)e^{-\frac{2vx+t(4ks^2+v^2)}{4k}}\sin xs~ds+\int_0^\infty\dfrac{2ks}{v}C_1(s)e^{-\frac{2vx+t(4ks^2+v^2)}{4k}}\cos xs~ds=\int_0^\infty C_1(s)e^{-\frac{2vx+t(4ks^2+v^2)}{4k}}\left(\sin xs+\dfrac{2ks}{v}\cos xs\right)ds$

If the B.C. is $u(0,t)=0$ :

$\int_0^\infty C_2(s)e^{-\frac{t(4ks^2+v^2)}{4k}}~ds=0$

$C_2(s)=0$

$\therefore u(x,t)=\int_0^\infty C_1(s)e^{-\frac{2vx+t(4ks^2+v^2)}{4k}}\sin xs~ds$