TITLE: The integral $\int_{0}^{\pi/2} \sin 2\theta ~ \mbox{erf}(\sin \theta)~ \mbox{erf}(\cos \theta)~d\theta=e^{-1}$
QUESTION [5 upvotes]: In a work it was required to find an integral akin to  $$I=\int_{0}^{\pi/2} \sin 2 \theta~\tanh(\sin\theta) \tanh(\cos \theta)~d\theta.$$ Since $\tanh x$ and $\operatorname{erf}(x)$ are similar functions so it was a pleasure to see that its variant namely  $$J=\int_{0}^{\pi/2} \sin 2\theta ~ \operatorname{erf}(\sin \theta)~ \operatorname{erf}(\cos \theta)~d\theta=e^{-1}$$
could be solved by Mathematica.
So the question is: Can one do it ($J$) by hand?

REPLY [4 votes]: $$J=\int_{0}^{\pi/2} \sin 2\theta  \mbox{erf}(\sin \theta) \mbox{erf}(\cos \theta). $$
I get clue from the fact that though $\tanh x$ and erf$(x)$ are similar, but the latter one enjoys beautiful expansions!
Expanding $$\mbox{erf}(x)= e^{-x^2} \sum_{n=0}^{\infty} \frac{x^{2n+1}}{\Gamma(n+3/2)}.$$ We re-write
$$J=2e^{-1}\sum_{m=0}^{\infty} \sum _{n=0}^{\infty} \int_{0}^{\pi/2} \frac{ \sin^{2m+2} \theta ~\ cos^{2n+2} \theta} {\Gamma(m+3/2)~\Gamma(n+3/2)} ~d \theta.$$
By Beta-integral, we get
$$J=e^{-1}\sum_{m=0}^{\infty} \sum_{n=0}^{\infty} \frac{1}{\Gamma(m+n+2)}=e^{-1}\sum_{k=1}^{\infty} \sum_{m=0}^{k-1} \frac{1}{(m+1)!}=e^{-1}\sum_{k=1}^{\infty} \frac{k}{(k+1)!}.$$
$$\Rightarrow e^{-1} \sum_{k=0} \left( \frac{1}{k!}-\frac{1}{(k+1)!} \right)=e^{-1}.$$