# How to arrive at this solution to this PDE?

This sort of problem is well documented, but, I can not see how to get this solution;

The problem is:

$$\frac{\partial c}{\partial t}=D\frac{\partial^2 c}{\partial x^2}, 0 < x < \infty, t > 0$$

with boundary conditions $c(0,t)= C_0, c(x,0) = 0$ and possibly $\lim_{x \rightarrow \infty}c(x,t) = 0$ as the capillary that the model is modelling is infinitely long.

whose solution is

$$c(x,t) = 2C_0\bigg( 1-\frac{1}{\sqrt{2\pi}}\int^z_{-\infty}\exp(-\frac{s^2}{2}) ds \bigg), z = \frac{x}{\sqrt{2Dt}}$$

Now I have let $c(x,t) = X(x)T(t)$ and then obtained

$$\frac{T'}{DT} = - s^2 = \frac{X''}{X}$$

we have

$\begin{cases}T(t)=c_3(s)e^{-Dts^2}\\X(x)=\begin{cases}c_1(s)\sin xs+c_2(s)\cos xs&\text{when}~s\neq0\\c_1x+c_2&\text{when}~s=0\end{cases}\end{cases}$

so

$$u(x,t)=\int_0^\infty C_1(s)e^{-Dts^2}\sin xs~ds+\int_0^\infty C_2(s)e^{-Dts^2}\cos xs~ds$$

but my initial conditions give, first

$$\int_0^\infty C_2(s)e^{-Dts^2}ds = C_0$$

then changing variables $s = \sqrt{\frac{r}{D}}$

$$\int_0^\infty \frac{1}{2}\sqrt{\frac{D}{r}}C_2(r)e^{-tr}ds = C_0$$

$$L[ \frac{1}{2}\sqrt{\frac{D}{r}}C_2(r)] = C_0$$

the inverse Laplace transformation of the right and side is a multiple of the delta function.... I feel like I have taken the wrong way.

• The expressions $X(x)$ and $T(t)$ you found are both false. Even if you correct them, the particular solution with respect to the boundary conditions will require not only one function $c(x,t)=X(x)T(t)$ but the sum of an infinity of such functions with an infinity of values of $k$. This approach would be theoretically possible, but very arduous. – JJacquelin Sep 23 '16 at 9:21
• Note that the method of separation of variables $X(x)T(t)$ is convenient in cases of some "educational" problems where the boundary conditions are especially chosen to make successful the calculus with this method. – JJacquelin Sep 23 '16 at 9:32
• Right. Is there a method you can suggest. Or maybe an initial step to take? – user197848 Sep 23 '16 at 16:27
• Since the solution is known I suppose that the calculus behind is published or at least the references about the method used. – JJacquelin Sep 23 '16 at 17:16
• The key idea is to remplace a discrete infinite sum of terms $\sum_sC_sX(x,s)T(t,s)$ by an integral $\int C(s)X(x,s)T(t,s)ds$. For example see math.stackexchange.com/questions/1486114/… – JJacquelin Sep 23 '16 at 17:47

Of course use separation of variables:

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

Then $X(x)T'(t)=DX''(x)T(t)$

$\dfrac{T'(t)}{DT(t)}=\dfrac{X''(x)}{X(x)}=-s^2$

$\begin{cases}\dfrac{T'(t)}{T(t)}=-Ds^2\\X''(x)+s^2X(x)=0\end{cases}$

$\begin{cases}T(t)=c_3(s)e^{-Dts^2}\\X(x)=\begin{cases}c_1(s)\sin xs+c_2(s)\cos xs&\text{when}~s\neq0\\c_1x+c_2&\text{when}~s=0\end{cases}\end{cases}$

$\therefore c(x,t)=\int_0^\infty C_1(s)e^{-Dts^2}\sin xs~ds+\int_0^\infty C_2(s)e^{-Dts^2}\cos xs~ds$

$c(0,t)=C_0$ :

$\int_0^\infty C_2(s)e^{-kts^2}~ds=C_0$

$C_2(s)=C_0\delta(s)$

$\therefore c(x,t)=\int_0^\infty C_1(s)e^{-Dts^2}\sin xs~ds+\int_0^\infty C_0\delta(s)e^{-Dts^2}\cos xs~ds=\int_0^\infty C_1(s)e^{-Dts^2}\sin xs~ds+C_0$

$c(x,0)=0$ :

$\int_0^\infty C_1(s)\sin xs~ds+C_0=0$

$\mathcal{F}_{s,s\to x}\{C_1(s)\}=-C_0$

$C_1(s)=\mathcal{F}^{-1}_{s,x\to s}\{-C_0\}=-\dfrac{2C_0}{\pi s}$

$\therefore c(x,t)=C_0-\dfrac{2C_0}{\pi}\int_0^\infty\dfrac{e^{-Dts^2}\sin xs}{s}~ds=C_0~\text{erfc}\left(\dfrac{x}{\sqrt{4Dt}}\right)$

It luckily satisflies $\lim\limits_{x\to\infty}c(x,t)=0$ .

$\therefore c(x,t)=C_0~\text{erfc}\left(\dfrac{x}{\sqrt{4Dt}}\right)$

• Very nice : The Fourier sin transform to find $C_1(s)$. – JJacquelin Sep 25 '16 at 5:23
• Could you expand a little on the inverse Fourier equality. I understand that you have used the Fourier transform. I am trying to follow what is on wikipedia on the transform. – user197848 Sep 26 '16 at 15:50
• I get $C_1(s) = -\frac{2}{\pi} \int_{0}^{\infty}C_0 \sin(xs)dx = \frac{2C_0}{\pi s} \bigg([\frac{\cos(ys)}{s}]_{y \rightarrow \infty}-1 \bigg)$ how do i deal with the first term? – user197848 Sep 26 '16 at 17:46
• @HMPARTICLE When $\int_0^\infty f(x)\sin sx~dx$ diverges, we shouldn't simply recognize $\mathcal{F}^{-1}_{s,x\to s}\{f(x)\}=\dfrac{2}{\pi}\int_0^\infty f(x)\sin sx~dx$ and should consider at other suitable approach. – doraemonpaul Sep 28 '16 at 12:19
• Could you hint at another approach? – user197848 Sep 28 '16 at 21:00