## `pade` -- Pade approximation

#### Introduction

`pade``(f, ..)` computes a Pade approximant of the expression `f`.

#### Call(s)

`pade(f, x <, [m, n]>)`
`pade(f, x = x0 <, [m, n]>)`

#### Parameters

`f` | - | an arithmetical expression or a series of domain type `Series::Puiseux` generated by the function `series`
`x` | - | an identifier
`x0` | - | an arithmetical expression. If `x0` is not specified, then `x0` = 0 is assumed.

#### Options

`[m, n]` | - | a list of nonnegative integers specifying the order of the approximation. The default values are `[3, 3]`.

#### Returns

an arithmetical expression or `FAIL`.

#### Related Functions

`series`

#### Details

- The Pade approximant of order [m, n] around x = x0 is a rational expression

      (x-x0)^p * (a0+a1*(x-x0)+..+a.m*(x-x0)^m) / (1+b1*(x-x0)+..+b.n*(x-x0)^n)

  approximating f. The parameters p and a0 are given by the leading order term f = a0*(x-x0)^p + O((x-x0)^(p+1)) of the series expansion of f around x = x0. The parameters a1,..,b.n are chosen such that the series expansion of the Pade approximant coincides with the series expansion of f to the maximal possible order.
- If no series expansion of f can be computed, then `FAIL` is returned. Note that `series` must be able to produce a Taylor series or a Laurent series of f, i.e., an expansion in terms of integer powers of x-x0 must exist.

#### Example 1

The Pade approximant is a rational approximation of a series expansion:

    >> f := cos(x)/(1 + x): P := pade(f, x, [2, 2])

                                           2
                                  2 x - 7 x  + 12
                                  ---------------
                                          2
                                  14 x + x  + 12

For most expressions of leading order 0, the series expansion of the Pade approximant coincides with the series expansion of the expression through order m + n:

    >> S := series(f, x, 6)

                               2    3       4       5
                              x    x    13 x    13 x       6
                      1 - x + -- - -- + ----- - ----- + O(x )
                              2    2     24      24

This differs from the expansion of the Pade approximant at order 5:

    >> series(P, x, 6)

                               2    3       4       5
                              x    x    13 x    85 x       6
                      1 - x + -- - -- + ----- - ----- + O(x )
                              2    2     24      144

The series expansion can be used directly as input to `pade`:

    >> pade(S, x, [2, 3]), pade(S, x, [3, 2])

                                2                 2      3
                        12 - 5 x        12 x + 7 x  - 7 x  - 12
                   -------------------, -----------------------
                           2    3                 2
                   12 x + x  + x  + 12        13 x  - 12

Both Pade approximants approximate `f` through order m + n = 5:

    >> map([%], series, x)

          --          2    3       4       5
          |          x    x    13 x    13 x       6
          |  1 - x + -- - -- + ----- - ----- + O(x ),
          --         2    2     24      24

                      2    3       4       5         --
                     x    x    13 x    13 x       6   |
             1 - x + -- - -- + ----- - ----- + O(x )  |
                     2    2     24      24           --

    >> delete f, P, S:

#### Example 2

The following expression does not have a Laurent expansion around x = 0:

    >> series(x^(1/3)/(1 - x), x)

                    1/3    4/3    7/3    10/3    13/3      16/3
                   x    + x    + x    + x     + x     + O(x    )

Consequently, `pade` fails:

    >> pade(x^(1/3)/(1 - x), x, [3, 2])

                                       FAIL

#### Example 3

Note that the specified orders [m, n] do not necessarily coincide with the orders of the numerator and the denominator if the series expansion does not start with a constant term:

    >> pade(x^10*exp(x), x, [2, 2]), pade(x^(-10)*exp(x), x, [2, 2])

                        10      11    12            2
                    12 x   + 6 x   + x       6 x + x  + 12
                    --------------------, --------------------
                        2                     10      11    12
                       x  - 6 x + 12      12 x   - 6 x   + x

#### Changes

- used to be called `Dom::Pade`
- `pade` is not a domain any longer, hence Pade approximants no longer form a data type of their own.
- This routine was extended from diagonal approximants to arbitrary orders [m, n].

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000