How to prove that $\int_{-a}^{a} \operatorname{erf}(x)dx=0$? How to prove that $\int_{-a}^{a} \operatorname{erf}(x)dx=0$?
I know that this must be true because $\operatorname{erf}(x)$ is an odd function so the integration from $-a$ to $0$ is equal to minus the integration from $0$ to $a$?
But how to prove this mathematically? 
Basically, I am unsure how to integrate a function that itself is defined by an integral.
Thanks
 A: Note that we have
$$\text{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt$$
Enforce the substitution $t\to -t$.  Then, we have
$$\begin{align}
\text{erf}(x)&=-\frac{2}{\sqrt{\pi}}\int_0^{-x} e^{-t^2}\,dt\\\\
&=-\text{erf}(-x)
\end{align}$$
whereby we see that the error function is an odd function.  And we are done!

Note that we used nothing particularly special about the integrand, $e^{-t^2}$, aside from the fact that it is an even function of $t$.  Therefore, we have the general result that the integral of an even function is an odd function.
If $f(t)$ is an even function, then $g(x)=\int_a^x f(t)\,dt$ is an odd function.

A: The error function is defined as $$\text{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^xe^{-t^2}dt.$$
Therefore, you have  \begin{align}f(a)&=\frac{2}{\sqrt{\pi}}\int_{-a}^a\int_0^xe^{-t^2}dtdx\\
&=\frac{2}{\sqrt{\pi}}\left[\int_{-a}^0\int_0^xe^{-t^2}dtdx+\int_{0}^a\int_0^xe^{-t^2}dtdx\right]\\
&=\frac{2}{\sqrt{\pi}}\left[-\int_{a}^0\int_0^{-x}e^{-t^2}dtdx+\int_{0}^a\int_0^xe^{-t^2}dtdx\right]\\
&=\frac{2}{\sqrt{\pi}}\left[\int_{a}^0\int_0^{x}e^{-t^2}dtdx+\int_{0}^a\int_0^xe^{-t^2}dtdx\right]\\
&=\frac{2}{\sqrt{\pi}}\int_{a}^a\int_0^{x}e^{-t^2}dtdx\\
&=0,\end{align}
where in the third step I made a change of variable $x\rightarrow -x$, and in the fourth step another change $t\rightarrow -t$.
A: If you feel like you need to say more than just noting the function os odd, something like this should be fine.
$$\int^{a}_{-a}erf(x)dx \, = \int^{0}_{-a}erf⁡(x)dx \, + \int^{a}_{0}erf⁡(x)dx$$
$$ \hspace{8mm}= -\int^{a}_{0}erf⁡(x)dx \, + \int^{a}_{0}erf⁡(x)dx \tag{definite integral of odd function}$$
$$\hspace{-17mm} = 0$$
Depending on the level of rigor expected for the course you're in, more work is probably expected. 
