6
$\begingroup$

It appears to be well-known that $\tanh(x)\le \mathrm{erf}(x)$ on $[0,\infty)$. It's off-handedly mentioned here, for example. Where can I find a formal proof? On the one hand, it's hard to imagine that a "classic" like this wouldn't have been proven already. On the other hand, the Taylor expansions are somewhat involved (tanh involves Bernoulli numbers) and unfortunately, the inequality does not hold termwise in the expansions -- so it's certainly far from obvious.

$\endgroup$
3
  • 2
    $\begingroup$ Not an answer but related: mathapps.net/Holmes/Holmes.pdf $\endgroup$ Dec 31, 2012 at 15:38
  • $\begingroup$ Tastes vary, but this strikes me as a nice example of a fact for which I would much prefer an informal proof to a formal one. It's obvious from the definitions of the two functions that the inequality must hold for large x. Graphing would establish it for small x. $\endgroup$
    – user21349
    Dec 31, 2012 at 22:02
  • $\begingroup$ If proofs by plotting were sufficient, it would have saved us a lot of work here... $\endgroup$ Jan 1, 2013 at 6:58

2 Answers 2

17
$\begingroup$

Let $f(x)={\mathrm{erf}}(x)-\tanh(x)$. It can be easily seen from Taylor series at $0$ and from asymptotics at $\infty$ that $f(x)>0$ for small $x$ and for large $x$.

Let us prove that $f(x)>0$ by contradiction. Suppose that $f(x)$ is negative for some $x$, then $f'$ must have at least $3$ positive zeros, by Rolle's theorem. This means that the equation $$g(x):=e^{-x^2}(e^{2x}+2+e^{-2x})=2\sqrt{\pi}$$ has at least $3$ positive solutions. But this is not the case because the LHS is monotone. Indeed, differentiating $g$, dividing by $e^{-x^2}$ and replacing $2x$ with $y$ we obtain $$g'(x)=\sinh(y)-y\cosh(y)-y<0,$$ because $\sinh(y) < y \cosh(y)$ as you can see from their Taylor series.

$\endgroup$
5
  • $\begingroup$ Sorry, I can only see that, on your supposition, $f'$ has $2$ (or more) positive zeros. But anyway that's enough for the rest of the argument to work. $\endgroup$ Dec 31, 2012 at 21:20
  • $\begingroup$ John, if you have a function that tends to zero from the positive side on both ends of the interval then derivative has ODD number of zeros. Only one if it positive everywhere, and at least 3 if not. $\endgroup$ Dec 31, 2012 at 23:36
  • $\begingroup$ Yes. But the function $f$ here doesn't tend to zero at both ends of the interval $[0, \infty)$, because $f(0)=\mathrm{erf}\, 0-\mathrm{tanh}\,0=\frac{1}{2}-0=\frac{1}{2}$. $\endgroup$ Jan 1, 2013 at 8:30
  • $\begingroup$ Depends how you define erf. If you take the definition given here, which appears to be standard, then erf(0)=0. $\endgroup$ Jan 1, 2013 at 8:38
  • $\begingroup$ Thanks, Aryeh. I was confusing erf with a cumulative distribution function. $\endgroup$ Jan 1, 2013 at 9:06
5
$\begingroup$

First, $$\begin{align} 1-\mathrm{erf}(x) &= \frac{2}{\sqrt{\pi}}\int_x^\infty e^{-t^2}dt, \cr 1-\tanh(x) &= \int_x^\infty \mathrm{sech}^2 t\;dt . \end{align}$$ Subtract: $$ \mathrm{erf}(x)-\mathrm{tanh}(x) = \int_x^\infty \left(\mathrm{sech}^2 t - \frac{2}{\sqrt{\pi}}e^{-t^2}\right)dt $$ So it suffices to show that this integrand is positive. It is positive for $t>1$ (proof needed), so we establish $\mathrm{erf}(x) > \mathrm{tanh}(x)$ for $x > 1$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.