## Maxima – 166 – Somme, prodotti e serie – 3 Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.501.

`pade (taylor_series, numer_deg_bound, denom_deg_bound)`
Returns a list of all rational functions which have the given Taylor series expansion where the sum of the degrees of the numerator and the denominator is less than or equal to the truncation level of the power series, i.e. are “best” approximants, and which additionally satisfy the specified degree bounds.

`taylor_series` is a univariate Taylor series. `numer_deg_bound` and `denom_deg_bound` are positive integers specifying degree bounds on the numerator and denominator.

`taylor_series` can also be a Laurent series, and the degree bounds can be `inf` which causes all rational functions whose total degree is less than or equal to the length of the power series to be returned. Total degree is defined as `numer_deg_bound + denom_deg_bound`. Length of a power series is defined as `"truncation level" + 1 - min(0, "order of series")`.

``````(%i1) taylor (1 + x + x^2 + x^3, x, 0, 3);
2    3
(%o1)/T/                    1 + x + x  + x  + . . .
1
(%o2)                              [- -----]
x - 1
(%i3) t: taylor(-(83787*x^10 - 45552*x^9 - 187296*x^8
+ 387072*x^7 + 86016*x^6 - 1507328*x^5
+ 1966080*x^4 + 4194304*x^3 - 25165824*x^2
+ 67108864*x - 134217728)
/134217728, x, 0, 10);
2    3       4       5       6        7         8         9
x   3 x    x    15 x    23 x    21 x    189 x    5853 x    2847 x
(%o3)/T/ 1 - - + ---- - -- - ----- + ----- - ----- - ------ + ------- + -------
2    16    32   1024    2048    32768   65536    4194304   8388608
10
83787 x
- --------- + . . .
134217728
(%o4)                                 []``````

There is no rational function of degree 4 numerator/denominator, with this power series expansion. You must in general have degree of the numerator and degree of the denominator adding up to at least the degree of the power series, in order to have enough unknown coefficients to solve.

``````(%i5) pade (t, 5, 5);
5                4                 3                  2
(%o5) [- (520256329 x  - 96719020632 x  - 489651410240 x  - 1619100813312 x
5                 4
- 2176885157888 x - 2386516803584)/(47041365435 x  + 381702613848 x
3                  2
+ 1360678489152 x  + 2856700692480 x  + 3370143559680 x + 2386516803584)]``````

`powerseries (expr, x, a)`
Returns the general form of the power series expansion for `expr` in the variable `x` about the point `a` (which may be `inf` for infinity):

``````           inf
====
\               n
>    b  (x - a)
/      n
====
n = 0``````

If powerseries is unable to expand `expr`, `taylor` may give the first several terms of the series.

When `verbose` is `true`, `powerseries` prints progress messages.

``````(%i6) verbose: true\$

(%i7) powerseries (log(sin(x)/x), x, 0);
trigreduce: failed to expand.

sin(x)
log(------)
x

trigreduce: try again after applying rule:
d   sin(x)
/ -- (------)
sin(x)    [ dx    x
log(------) = I ----------- dx
x       ]   sin(x)
/   ------
x

powerseries: first simplification returned
x
/
[  csc(g19154) sin(g19154) - g19154 cos(g19154) csc(g19154)
- I  -------------------------------------------------------- dg19154
]                           g19154
/
0

powerseries: first simplification returned
g19154 cot(g19154) - 1
- ----------------------
g19154

powerseries: attempt rational function expansion of
1
------
g19154
inf
====        i2  2 i2 - 1             2 i2
\      (- 1)   2         bern(2 i2) x
(%o7)               >     ----------------------------------
/                  i2 (2 i2)!
====
i2 = 1``````

La reference da un’espressione finale diversa 😐

`psexpand`
Default value: `false`.

When `psexpand` is `true`, an extended rational function expression is displayed fully expanded. The switch `ratexpand` has the same effect.

When `psexpand` is `false`, a multivariate expression is displayed just as in the rational function package.

When `psexpand` is `multi`, then terms with the same total degree in the variables are grouped together.

`revert (expr, x)`
`revert2 (expr, x, n)`
These functions return the reversion of `expr`, a Taylor series about zero in the variable `x`. `revert` returns a polynomial of degree equal to the highest power in `expr`. `revert2` returns a polynomial of degree `n`, which may be greater than, equal to, or less than the degree of `expr`.

`load ("revert")` loads these functions.

``````(%i1) load ("revert")\$

(%i2) t: taylor (exp(x) - 1, x, 0, 6);
2    3    4    5     6
x    x    x    x     x
(%o2)/T/             x + -- + -- + -- + --- + --- + . . .
2    6    24   120   720
(%i3) revert (t, x);
6       5       4       3       2
10 x  - 12 x  + 15 x  - 20 x  + 30 x  - 60 x
(%o3)/R/        - --------------------------------------------
60
(%i4) ratexpand (%);
6     5    4    3    2
x     x    x    x    x
(%o4)                   (- --) + -- - -- + -- - -- + x
6     5    4    3    2
(%i5) taylor (log(x+1), x, 0, 6);
2    3    4    5    6
x    x    x    x    x
(%o5)/T/              x - -- + -- - -- + -- - -- + . . .
2    3    4    5    6
(%i6) ratsimp (revert (t, x) - taylor (log(x+1), x, 0, 6));
(%o6)                                  0
(%i7) revert2 (t, x, 4);
4     3    2
x     x    x
(%o7)                        (- --) + -- - -- + x
4     3    2``````

Posta un commento o usa questo indirizzo per il trackback.