More on why simple approximations work

A few weeks ago I wrote several blog posts about very simple approximations that are surprisingly accurate. These approximations are valid over a limited range, but with range reduction they can be used over the full range of the functions.

In this post I want to look again at

\exp(x) \approx \frac{2 + x}{2 - x}


\log(x)\approx \frac{2x-2}{x + 1}

Padé approximation

It turns out that the approximations above are both Padé approximants [1], rational functions that match the first few terms of the power series of the function being approximated.

“First few” means up to degree mn where m is the degree of the numerator and n is the degree of the denominator. In our examples, mn = 1, and so the series terms up to order 2 match.


The approximations I wrote about before were derived by solving for a constant that made the approximation error vanish at the ends of the interval of interest. Note that there’s no interval in the definition of a Padé approximant.

Also, the constants that I derived were rounded in order to have something easy to compute mentally. The approximation for log, for example, works out to have a factor of 2.0413, but I rounded it to 2 for convenience.

And yet the end result is exactly was exactly a Padé approximant.


First let’s look at the exponential function. We can see that the series for our approximation and for exp match up to x².

\begin{align*} \exp(x) &= 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \ldots \\ \frac{2+x}{2-x} &= 1 + x + \frac{x^2}{2} + \frac{x^3}{4} + \ldots \\ \end{align*}

The error in the Padé approximation for exp is less than the error in the 2nd order power series approximation for all x less than around 0.78.


Here again we see that our function and our approximation have series that agree up to the x² terms.

\begin{align*} \log(x) &= (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{3}(x-1)^3 + \ldots \\ \frac{2x-2}{x+1} &= (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{4}(x-1)^3 + \ldots \end{align*}

The error in the Padé approximation for log is less than the error in the 2nd order power series approximation for all x

[1] The other approximations I presented in that series are not Padé approximations.

Leave a Reply

Your email address will not be published.