I have the given integral formula for the diffusion equation on an infinite rod:
\begin{equation} u(x,t)=\frac{1}{\sqrt{4\pi\alpha t}}\int_0^\infty e^{-(x-y)^2/4\alpha t}-e^{-(x+y)^2/4\alpha t}\phi(y)dy \end{equation}
From the given PDE
$u_t=\frac{1}{4}u_{xx}, \\ \ u_x(0,t)=0, \\ u(x,0)=\begin{cases}6 , 0<x<3\\ 0, x>3 \end{cases}$
I have that $\phi(y)=6$ and $\alpha=1/4 $ and inserting into the formula for $u(x,t)$ I get the integral:
\begin{equation} u(x,t)=\frac{6}{\sqrt{\pi t}}\int_0^\infty e^{-(x-y)^2/t}-e^{-(x+y)^2/t}dy \end{equation}
I want to solve this so I set $u=\frac{(x-y)}{\sqrt{t}}\ and\ v=\frac{(x+y)}{\sqrt{t}}$ and get:
\begin{equation} u(x,t)=-\frac{6}{\sqrt{\pi t}}\int_{\frac{-x}{\sqrt{t}}}^\infty e^{-(u)^2}du-\frac{6}{\sqrt{\pi t}}\int_{\frac{x}{\sqrt{t}}}^\infty e^{-(v)^2}dv \end{equation}
At this stage I see from Wolframalpha this yields:
\begin{equation} u(x,t)=-\frac{3\operatorname{erf} \bigg(\frac{x}{\sqrt{t}} \bigg)+1}{\sqrt{t}}-\frac{2\operatorname{erfc}\bigg(\frac{x}{\sqrt{t}} \bigg)}{\sqrt{t}} \end{equation}
But how is this calculated step by step? I can't find any sources online that describe this.
Suggestion
I tried converting it to radial coordinates, and using the fact that $\int e^{-x^2}dx=\sqrt{\int\int e^{-x^2-y^2}dxdy}=\sqrt{\int_0^{2\pi}\int e^{-r^2}rdrd\phi}$.
This approach on the first of the two integrals above gives:
$\int_{\frac{-x}{\sqrt{t}}}^\infty e^{-u^2}du$
\begin{equation} \bigg(\int_0^{2\pi}\int_{\frac{-rcos\phi}{\sqrt{t}}}^\infty e^{-r^2}rdrd\phi\bigg)^{\frac{1}{2}} \end{equation}
For simplicity we consider:
\begin{equation} \int_0^{2\pi}\int_{\frac{-rcos\phi}{\sqrt{t}}}^\infty e^{-r^2}rdrd\phi \end{equation}
We now substitute $w=r^2$:
\begin{equation} \frac{1}{2}\int_0^{2\pi}\int_{\frac{-rcos\phi}{\sqrt{t}}}^\infty e^{-w}dw \end{equation}
\begin{equation} -\frac{1}{2}\int_0^{2\pi}\bigg[e^{-w}\bigg]_{\frac{-rcos\phi}{\sqrt{t}}}^{\infty}d\phi \end{equation}
Here,
\begin{equation} \bigg[e^{-w}\bigg]_{\frac{-rcos\phi}{\sqrt{t}}}^{\infty}=e^{\frac{-r^2cos^2\phi}{t}}+1 \end{equation}
So we'd get:
\begin{equation} -\frac{1}{2}\int_0^{2\pi} e^{\frac{-r^2cos^2\phi}{t}}+1 d\phi \end{equation}
rewriting to:
\begin{equation} -\frac{1}{2}e^{\frac{-r^2}{t}}\int_0^{2\pi} e^{\frac{1}{2}(1+cos2\phi)}+1 d\phi \end{equation}
and further to
\begin{equation} -\frac{1}{2}e^{\frac{-r^2}{t}}e^{\frac{1}{2}}\int_0^{2\pi} e^{\frac{1}{2}cos2\phi}+1 d\phi \end{equation}
So the challenge is to solve without Wolfram alpha:
\begin{equation} \int_0^{2\pi} e^{\frac{1}{2}cos2\phi} d\phi \end{equation}
This integral gives the Bessel function of the first kind. Any ideas how that comes about?
Thanks
The error function is defined as $$ \operatorname{erf} z = \frac{2}{\sqrt\pi}\int_0^z e^{-t^2}\,dt $$ The reason to define it like this is because this integral cannot be reduced to simpler functions.