# Why erf(a-b)+erf(a)+erf(a+b) is so close to 3erf(a)?

I am approximating an empirical distribution function with a sum of three gaussians, and noticed that for erf function $erf(a-b)+erf(a)+erf(a+b)$ is numerically very close to $3erf(a)$ for applicable values of $a$ and $b$, $a>>b$. Close, but not quite the same, of course. Could you suggest an analytical explanation why these functions are so close?

• Did you mean $3 erf(a)$ instead? Because as its written right now, you can subtract $erf(a)$ from both sides to get a positive number $erf(a-b)+erf(a+b)$ being close to zero, which I don't think is what you meant. – pre-kidney Feb 19 '15 at 7:10
• Do you mean close to $3 \text{erf(a)}$ ? – Claude Leibovici Feb 19 '15 at 7:11
• Yes, thanks, I meant 3. Will edit now – Michael Feb 19 '15 at 7:24
• This is true for "most" functions, not just $\operatorname{erf}$. – Rahul Feb 19 '15 at 8:23
• @Rahul, this is true for smooth functions when $b$ is tiny, but for $erf$ that is noticeable for larger $b$ than what I would expect. Claude Leibovici explained it nicely in his answer: the $b^2$ coefficient in the Taylor series has term $e^{-a^2}$, which is very small in my range. – Michael Feb 19 '15 at 16:56

Assuming you mean close to $3\, \text{erf}(a)$, set $b=x\, a$ and perform a Taylor expansion at $x=0$.
You should arrive to $$\text{erf}(a-a x)+\text{erf}(a )+\text{erf}(a+ax)=3\, \text{erf}(a)-\frac{4 \left(a^3 e^{-a^2}\right) x^2}{\sqrt{\pi }}+O\left(x^4\right)$$ or, if you prefer, $$\text{erf}(a-b)+\text{erf}(a )+\text{erf}(a+b)=3\,\text{erf}(a)-\frac{4 \left(a e^{-a^2}\right) b^2}{\sqrt{\pi }}+O\left(b^4\right)$$ I suppose that this is clarifying.