Question: Show that
$$\begin{align}u(x,t) &=c\sqrt{\frac{k}{\pi}}\int^t_0s^{-1/2}e^{-x^2/4ks}\,ds\\ &=c\sqrt{\frac{4kt}{\pi}}e^{-x^2/4kt}-cx\,\text{erfc}\frac{x}{\sqrt{4kt}}\end{align}$$
The book where the question is found gives a hint that "subtitute $\sigma=x/\sqrt{4ks}$ and then integrate by part". So here are my attempts and obstacles:
- The substitute yields $d\sigma=-x/2\sqrt{4ks^3}\,ds$, but the original function lacks $s^{-1}$ in the integrand.
- Immediate integration by part before substitution will make $s^{-1/2}$ to $s^{-3/2}$, but I don't know how can I integrate the other part. This action seems to contradict our reason of substitution.
- I would like to write $$\text{erfc}\frac{x}{\sqrt{4kt}}=\frac{2}{\sqrt{\pi}}\int^\infty_{x/\sqrt{4kt}}e^{-s^2}\,ds$$ in form of $$A\int^\infty_tg(s)\,ds$$ to see if it makes things clearer. But it is unlikely.
I appreciate for any help.
$$u(x,t) =c\sqrt{\frac{k}{\pi}}\int^t_0s^{-1/2}e^{-x^2/4ks}\,ds=$$
With $s=x^2/(4k\sigma^2)$ and $ds=-(2x^2)/(4k\sigma^3)d\sigma$
$$=c\sqrt{\frac{k}{\pi}}\frac{2x}{\sqrt{4k}}\int^{x/\sqrt{4kt}}_{-\infty}-\sigma^{-2}e^{-\sigma^2}\,d\sigma$$
$\begin{cases} u=-e^{-\sigma^2}\;;du=2\sigma e^{-\sigma^2}d\sigma\\ dv=d\sigma/\sigma^2\;;v=-1/\sigma \end{cases}$
$$u(x,t)=c\frac{x}{\sqrt{\pi}}\left[\frac{e^{-\sigma^2}}{\sigma}\right]^{x/\sqrt{4kt}}_{-\infty}+cx\frac{2}{\sqrt{\pi}}\int^{x/\sqrt{4kt}}_{-\infty}e^{-\sigma^2}$$
$u=-\sigma$
$$\frac{2}{\sqrt{\pi}}\int^{x/\sqrt{4kt}}_{-\infty}e^{-\sigma^2}d\sigma=\frac{2}{\sqrt{\pi}}\int_{-x/\sqrt{4kt}}^{+\infty}e^{-u^2}du=-\frac{2}{\sqrt{\pi}}\int_{x/\sqrt{4kt}}^{+\infty}e^{-u^2}du=-\text{erfc}\left(\frac{x}{\sqrt{4kt}}\right)$$
$$u(x,t)=c\frac{x}{\sqrt{\pi}}\frac{e^{-x^2/4kt}}{x/\sqrt{4kt}}-cx\,\text{erfc}\left(\frac{x}{\sqrt{4kt}}\right)=$$
$$=c\sqrt{\frac{4kt}{\pi}}e^{-x^2/4kt}-cx\,\text{erfc}\left(\frac{x}{\sqrt{4kt}}\right)$$