Padé Approximation

← Numerical Methods

Source inspiration: (Mathew 2000-2019).

Description

Padé approximant is a rational function approximation expanded from a function value and the derivative function values similar to Taylor Series. Often, Padé approximant’s can converge when Taylor Series does not even though both use the same information at a point. The key is Taylor Series is a polynomial while Padé approximant is a rational function. Rational functions can have singularities/vertical-asymptotes and horizontal asymptotes. Polynomials do not have asymptotes or singularities.

Padé approximation replaces a polynomial truncation with a ratio of two polynomials,

\[ R_{m,n}(x)=\frac{P_m(x)}{Q_n(x)},\qquad Q_n(x_0)=1, \]

and chooses coefficients so the Taylor expansion of \(R_{m,n}\) about \(x_0\) matches the target function through order \(m+n\). Equivalently, \(f^{(k)}(x_0)=R_{m,n}^{(k)}(x_0)\) for \(k=0,\dots,m+n\). Mathews’ theorem assumes \(f\in C^{m+n}\) near \(x_0\), so these derivatives exist. When Taylor coefficients vanish, as for even or odd functions or when \(f(x_0)=0\), some entries \([m/n]\) have no such \(R_{m,n}\). Those frames show the lower-order entry that takes their place in the Padé table, which matches \(f\) only to a lower order, and the legend says so, for example “Padé [2/1] = [1/0] (degenerate)” in Case 08.

Compared with a Taylor polynomial of the same total order, Padé approximants can represent poles and often stay accurate on larger intervals, especially for functions with nearby singularities or branch-point behavior. In Case 16, the Taylor polynomial \([10/0]\) of \(\arctan x\), whose series converges only for \(|x|\le1\), is off by 43.2 at \(x=2\), while \([5/5]\) stays within 0.016 on all of \([-2,2]\).

High-order Padé Approximants can be hard to compute because the linear system for the denominator coefficients can become badly conditioned as the order rises (for \(\sqrt{x}\) about \(x_0=5\) in Case 03, the \([4/6]\) system has condition number about \(1.5\times10^{11}\)), and because that system is singular for some entries \([m/n]\), the degenerate entries described above. MATLAB’s symbolic pade can be very slow for some entries below total order (numerator plus denominator order) 20: with the 20-digit vpa setting of the video script, the \([1/15]\), \([1/16]\) and \([1/17]\) entries for \(e^x\) about 0 took about 7, 31 and 134 seconds in MATLAB R2026a. padeapprox from chebfun also struggles. It takes a lot of effort to compute a high-order Padé approximate.

The \([m/0]\) entries are the Taylor polynomials of Maclaurin and Taylor Series, and Rational Approximation fits \(P_m/Q_n\) on an interval instead of at a point.

The most useful way to understand Padé approximant is to watch the animations below. For details on the construction, see the resources section below.

Video Animations

These videos have a different aesthetic than the GIFs. The videos are generated by a MATLAB script:

pade_animation_code.m

\(exp(x)\) about 0 and 1

\(tanh(x)\) about 0 and 0.5

\(arctan(x)\) about 0 and 0.5

\(1/x\) about 0.5

\(1/(x-1)\) about 0.75

\(sin(x)\) about 0 and 0.5

\(x/(x^2 + 0.01^2)^{1/4}\) about 0.5

Runge function \(1/(1+25x^2)\) about 0 and 0.5

Animations

Each animation shows one Padé order per frame for a fixed center \(x_0\), overlaid on the target function. Unlike Mathews’ surviving original animations, which stepped along the diagonal (or next-to-diagonal) entries of the Padé table, up to total order 18, and marked a tolerance interval, these step through every entry \([m/n]\) with \(m+n\le 10\) (\(m+n\le 8\) in Cases 12, 17 and 22–27).

Julia source for all cases

Case 01 — \(f(x)=\sqrt{x}\), \(x_0=1\), \(x\in[0,10.5]\)

Julia source

Padé approximation frames for sqrt(x) centered at x0=1 over x in [0,10.5].

Case 02 — \(f(x)=\sqrt{x}\), \(x_0=4\), \(x\in[0,10.5]\)

Julia source

Padé approximation frames for sqrt(x) centered at x0=4 over x in [0,10.5].

Case 03 — \(f(x)=\sqrt{x}\), \(x_0=5\), \(x\in[0,10.5]\)

Julia source

Padé approximation frames for sqrt(x) centered at x0=5 over x in [0,10.5].

Case 04 — \(f(x)=\dfrac{1}{\sqrt{1-x}}\), \(x_0=0\), \(x\in[-1.5,1.5]\)

Julia source

Padé approximation frames for one over square root of one minus x centered at zero.

Case 05 — \(f(x)=\log(x)\), \(x_0=1\), \(x\in[-0.5,4.1]\)

Julia source

Padé approximation frames for log(x) centered at x0=1 over x in [-0.5,4.1].

Case 06 — \(f(x)=\log(x)\), \(x_0=2\), \(x\in[-0.5,4.1]\)

Julia source

Padé approximation frames for log(x) centered at x0=2 over x in [-0.5,4.1].

Case 07 — \(f(x)=\log(1+x)\), \(x_0=0\), \(x\in[-1.5,1.5]\)

Julia source

Padé approximation frames for log(1+x) centered at zero.

Case 08 — \(f(x)=\sin(x)\), \(x_0=0\), \(x\in[-3\pi,3\pi]\)

Julia source

Padé approximation frames for sin(x) centered at x0=0 over x in [-3pi,3pi].

Case 09 — \(f(x)=\cos(x)\), \(x_0=0\), \(x\in[-3\pi,3\pi]\)

Julia source

Padé approximation frames for cos(x) centered at zero over x in [-3pi,3pi].

Case 10 — \(f(x)=\sin(x)\), \(x_0=\pi/4\), \(x\in[-7\pi/4,9\pi/4]\)

Julia source

Padé approximation frames for sin(x) centered at pi over 4.

Case 11 — \(f(x)=\cos(x)\), \(x_0=\pi/3\), \(x\in[-5\pi/3,7\pi/3]\)

Julia source

Padé approximation frames for cos(x) centered at pi over 3.

Case 12 — \(f(x)=\tan(x)\), \(x_0=0\), \(x\in[-\pi,\pi]\)

Julia source

Padé approximation frames for tan(x) centered at x0=0 over x in [-pi,pi].

Case 13 — \(f(x)=e^x\), \(x_0=0\), \(x\in[-2,3]\)

Julia source

Padé approximation frames for exp(x) centered at zero over x in [-2,3].

Case 14 — \(f(x)=e^{-x}\cos(x)\), \(x_0=0\), \(x\in[-2,4]\)

Julia source

Padé approximation frames for exp(-x)cos(x) centered at zero over x in [-2,4].

Case 15 — \(f(x)=\cosh(x)\), \(x_0=0\), \(x\in[-4,4]\)

Julia source

Padé approximation frames for cosh(x) centered at zero over x in [-4,4].

Case 16 — \(f(x)=\arctan(x)\), \(x_0=0\), \(x\in[-2,2]\)

Julia source

Padé approximation frames for arctan(x) centered at zero over x in [-2,2].

Case 17 — \(f(x)=\arcsin(x)\), \(x_0=0\), \(x\in[-1.5,1.5]\)

Julia source

Padé approximation frames for arcsin(x) centered at x0=0 over x in [-1.5,1.5].

Case 18 — \(f(x)=J_0(x)\), \(x_0=0\), \(x\in[-10.2,10.2]\)

Julia source

Padé approximation frames for Bessel J0 centered at zero over x in [-10.2,10.2].

Case 19 — \(f(x)=J_1(x)\), \(x_0=0\), \(x\in[-10.2,10.2]\)

Julia source

Padé approximation frames for Bessel J1 centered at zero over x in [-10.2,10.2].

Case 20 — \(f(x)=\dfrac{1}{\sqrt{2\pi}}e^{-x^2/2}\), \(x_0=0\), \(x\in[-3,3]\)

Julia source

Padé approximation frames for the normal density centered at zero over x in [-3,3].

Case 21 — \(f(x)=\dfrac{1}{2}+\dfrac{1}{2}\operatorname{erf}\!\left(\dfrac{x}{\sqrt{2}}\right)\), \(x_0=0\), \(x\in[-3,3]\)

Julia source

Padé approximation frames for the normal CDF centered at zero over x in [-3,3].

Case 22 — \(f(x)=\Gamma(x)\), \(x_0=1\), \(x\in[-0.2,5.2]\)

Julia source

Padé approximation frames for Gamma(x) centered at one over x in [-0.2,5.2].

Case 23 — \(f(x)=\Gamma(x)\), \(x_0=2\), \(x\in[-0.2,5.2]\)

Julia source

Padé approximation frames for Gamma(x) centered at two over x in [-0.2,5.2].

Case 24 — \(f(x)=\Gamma(x)\), \(x_0=3\), \(x\in[-0.2,5.2]\)

Julia source

Padé approximation frames for Gamma(x) centered at three over x in [-0.2,5.2].

Case 25 — \(f(x)=Y_0(x)\), \(x_0=10\), \(x\in[0,22]\)

Julia source

Padé approximation frames for Bessel Y0 centered at ten over x in [0,22].

Case 26 — \(f(x)=Y_0(x)\), \(x_0=5\), \(x\in[0,22]\)

Julia source

Padé approximation frames for Bessel Y0 centered at five over x in [0,22].

Case 27 — \(f(x)=Y_0(x)\), \(x_0=2\), \(x\in[0,22]\)

Julia source

Padé approximation frames for Bessel Y0 centered at two over x in [0,22].

References

Mathew, John H. 2000-2019. Numerical Analysis - Numerical Methods Modules. https://web.archive.org/web/20190808102217/http://mathfaculty.fullerton.edu/mathews/n2003/NumericalUndergradMod.html.