The taylor command finds Taylor expansions.
series is a synonym for taylor.
∀ r>0, |
| xr order_size(x) = 0 |
For regular series expansion, order_size is a bounded function, but for non regular series expansion, it might tend slowly to infinity, for example like a power of ln(x).
Example.
Input:
or:
or (be careful with the order of the arguments!):
or:
Output:
sin | ⎛ ⎝ | 1 | ⎞ ⎠ | +cos | ⎛ ⎝ | 1 | ⎞ ⎠ | ⎛ ⎝ | x−1 | ⎞ ⎠ | − |
| sin | ⎛ ⎝ | 1 | ⎞ ⎠ | ⎛ ⎝ | x−1 | ⎞ ⎠ | 2+ | ⎛ ⎝ | x−1 | ⎞ ⎠ | 3 order_size | ⎛ ⎝ | x−1 | ⎞ ⎠ |
Remark.
The order returned by taylor may
be smaller than n if cancellations between numerator and denominator
occur, for example consider
|
Input:
Output:
6− |
| x2+x3+ |
| x4+x6 order_size | ⎛ ⎝ | x | ⎞ ⎠ |
which is only a 2nd degree expansion.
Indeed the numerator and denominator valuation is 3, hence you lose 3
orders. To get order 4, you should use n=7.
Input:
Output:
6− |
| x2+x3+ |
| x4− |
| x6+x8 order_size | ⎛ ⎝ | x | ⎞ ⎠ |
a fourth degree expansion.
Examples.
| − | √ |
| ⎛ ⎜ ⎜ ⎝ | x− |
| ⎞ ⎟ ⎟ ⎠ | +2 | ⎛ ⎜ ⎜ ⎝ | x− |
| ⎞ ⎟ ⎟ ⎠ |
| + |
| √ |
| ⎛ ⎜ ⎜ ⎝ | x− |
| ⎞ ⎟ ⎟ ⎠ |
| − |
| ⎛ ⎜ ⎜ ⎝ | x− |
| ⎞ ⎟ ⎟ ⎠ |
| + | ⎛ ⎜ ⎜ ⎝ | x− |
| ⎞ ⎟ ⎟ ⎠ |
| order_size | ⎛ ⎜ ⎜ ⎝ | x− |
| ⎞ ⎟ ⎟ ⎠ |
| − |
| + |
| − |
| + | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
| order_size | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
2 | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
| +1+ |
| + |
| ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
| + | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
| order_size | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
2 | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
| +1+ |
| + |
| ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
| + |
| ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
| + | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
| order_size | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
−2 | ⎛ ⎜ ⎜ ⎝ | − |
| ⎞ ⎟ ⎟ ⎠ |
| +1+ |
| + |
| ⎛ ⎜ ⎜ ⎝ | − |
| ⎞ ⎟ ⎟ ⎠ |
| − |
| ⎛ ⎜ ⎜ ⎝ | − |
| ⎞ ⎟ ⎟ ⎠ |
| + | ⎛ ⎜ ⎜ ⎝ | − |
| ⎞ ⎟ ⎟ ⎠ |
| order_size | ⎛ ⎜ ⎜ ⎝ | − |
| ⎞ ⎟ ⎟ ⎠ |
e x−3− |
| e x−2+x−1 order_size | ⎛ ⎝ | x | ⎞ ⎠ |