Package 'Pade'

Title: Padé Approximant Coefficients
Description: Given a vector of Taylor series coefficients of sufficient length as input, the function returns the numerator and denominator coefficients for the Padé approximant of appropriate order (Baker, 1975) <ISBN:9780120748556>.
Authors: Avraham Adler [aut, cph, cre]
Maintainer: Avraham Adler <[email protected]>
License: GPL (>= 2) | BSD_2_clause + file LICENSE
Version: 1.0.7
Built: 2024-11-16 05:04:56 UTC
Source: https://github.com/aadler/pade

Help Index


Padé Approximant Coefficients

Description

Given a vector of Taylor series coefficients of sufficient length as input, the function returns the numerator and denominator coefficients for the Padé approximant of appropriate order (Baker, 1975) <ISBN:9780120748556>.

Details

The DESCRIPTION file:

Package: Pade
Type: Package
Title: Padé Approximant Coefficients
Version: 1.0.7
Date: 2024-06-19
Authors@R: c(person(given="Avraham", family="Adler", role=c("aut", "cph", "cre"), email="[email protected]", comment = c(ORCID = "0000-0002-3039-0703")))
Description: Given a vector of Taylor series coefficients of sufficient length as input, the function returns the numerator and denominator coefficients for the Padé approximant of appropriate order (Baker, 1975) <ISBN:9780120748556>.
License: GPL (>= 2) | BSD_2_clause + file LICENSE
Imports: utils
Suggests: covr, tinytest
URL: https://github.com/aadler/Pade
BugReports: https://github.com/aadler/Pade/issues
Encoding: UTF-8
NeedsCompilation: no
Repository: https://aadler.r-universe.dev
RemoteUrl: https://github.com/aadler/pade
RemoteRef: HEAD
RemoteSha: c2dee815c8bf0f7fce9d185094e299da79bfc59c
Author: Avraham Adler [aut, cph, cre] (<https://orcid.org/0000-0002-3039-0703>)
Maintainer: Avraham Adler <[email protected]>

Index of help topics:

Pade                    Padé Approximant Coefficients
Pade-package            Padé Approximant Coefficients

Author(s)

Avraham Adler [aut, cph, cre] (<https://orcid.org/0000-0002-3039-0703>)

Maintainer: Avraham Adler <[email protected]>


Padé Approximant Coefficients

Description

Given Taylor series coefficients ana_n from n=0n = 0 up to n=Tn = T, the function will calculate the Padé [L/M]\left[L / M\right] approximant coefficients so long as L+MTL + M \leq T.

Usage

Pade(L, M, A)

Arguments

L

Order of Padé numerator

M

Order of Padé denominator

A

vector of Taylor series coefficients, starting at x0x^0

Details

As the Taylor series expansion is the “best” polynomial approximation to a function, the Padé approximants are the “best” rational function approximations to the original function. The Padé approximant often has a wider radius of convergence than the corresponding Taylor series, and can even converge where the Taylor series does not. This makes it very suitable for computer-based numerical analysis.

The [L/M]\left[L / M\right] Padé approximant to a Taylor series A(x)A(x) is the quotient

PL(x)QM(x)\frac{P_L(x)}{Q_M(x)}

where PL(x)P_L(x) is of order LL and QM(x)Q_M(x) is of order MM. In this case:

A(x)PL(x)QM(x)=O(xL+M+1)A(x) - \frac{P_L(x)}{Q_M(x)} = \mathcal{O}\left(x^{L + M + 1}\right)

When q0q_0 is defined to be 11, there is a unique solution to the system of linear equations which can be used to calculate the coefficients.

The function accepts a vector A of length T + 1, composed of the ana_n of the of truncated Taylor series

A(x)=j=0TajxjA(x) = \sum_{j=0}^T a_j x^j

and returns a list of two elements, Px and Qx, the Padé numerator and denominator coefficients respectively, as long as L+MTL + M \leq T.

Value

Pade returns a list with two entries:

Px

Coefficients of the numerator polynomial starting at x0x^0.

Qx

Coefficients of the denominator polynomial starting at x0x^0.

Author(s)

Avraham Adler [email protected]

References

Baker, George Allen (1975) Essentials of Padé Approximants Academic Press. ISBN 978-0-120-74855-6

See Also

This package provides similar functionality to the pade function in the pracma package. However, it does not allow computation of coefficients beyond the supplied Taylor coefficients and it expects its input and provides its output in ascending—instead of descending—order.

See the minimaxApprox package for polynomial and rational minimax approximations to functions.

Examples

A <- 1 / factorial(0:10) ## Taylor sequence for e^x up to x^{10} around x_0 = 0
Z <- Pade(5, 5, A)
print(Z)                             ## Padé approximant of order [5 / 5]
x <- -.01                            ## Test value
Actual <- exp(x)                     ## Proper value
print(Actual, digits = 16)
Estimate <- sum(Z[[1L]] * x ^ (seq_along(Z[[1L]]) - 1)) /
    sum(Z[[2L]] * x ^ (seq_along(Z[[2L]]) - 1))
print(Estimate, digits = 16)         ## Approximant value
all.equal(Actual, Estimate)