naginterfaces.library.fit.pade_​app¶

naginterfaces.library.fit.pade_app(ia, ib, c)[source]

pade_app calculates the coefficients in a Padé approximant to a function from its user-supplied Maclaurin expansion.

For full information please refer to the NAG Library document for e02ra

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/e02/e02raf.html

Parameters
iaint

must specify and must specify , where and are the degrees of the numerator and denominator of the approximant, respectively.

ibint

must specify and must specify , where and are the degrees of the numerator and denominator of the approximant, respectively.

cfloat, array-like, shape

must specify, for , the coefficient of in the given power series.

Returns
afloat, ndarray, shape

, for , contains the coefficient in the numerator of the approximant.

bfloat, ndarray, shape

, for , contains the coefficient in the denominator of the approximant.

Raises
NagValueError
(errno )

On entry, , and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

The Pade approximant is degenerate.

Notes

Given a power series

pade_app uses the coefficients , for , to form the Padé approximant of the form

with defined to be unity. The two sets of coefficients , for , and , for , in the numerator and denominator are calculated by direct solution of the Padé equations (see Graves–Morris (1979)); these values are returned through the argument list unless the approximant is degenerate.

Padé approximation is a useful technique when values of a function are to be obtained from its Maclaurin expansion but convergence of the series is unacceptably slow or even nonexistent. It is based on the hypothesis of the existence of a sequence of convergent rational approximations, as described in Baker and Graves–Morris (1981) and Graves–Morris (1979).

Unless there are reasons to the contrary (as discussed in Module 4, Section 2, Modules 5 and 6 of Baker and Graves–Morris (1981)), one normally uses the diagonal sequence of Padé approximants, namely

Subsequent evaluation of the approximant at a given value of may be carried out using pade_eval().

References

Baker, G A Jr and Graves–Morris, P R, 1981, Padé approximants, Part 1: Basic theory, encyclopaedia of Mathematics and its Applications, Addison–Wesley

Graves–Morris, P R, 1979, The numerical calculation of Padé approximants, Padé Approximation and its Applications. Lecture Notes in Mathematics, (ed L Wuytack) (765), 231–245, Adison–Wesley