taylor takes from one to four arguments :
Note that the syntax ...,x,n,a,...
(instead of ...,x=a,n,...) is also accepted.
taylor returns a polynomial in x-a, plus a remainder
of the form:
(x-a)^
n*order_size(x-a)
where order_size is a function such that,
∀ 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).
Input :
Or (be careful with the order of the arguments !) :
Output :
^
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
taylor( |
| ) |
Input :
^
3+sin(x)^
3/(x-sin(x)))The output is only a 2nd-order series expansion :
^2
+x^
3*order_size(x)
Indeed the numerator and denominator valuation is 3, hence we lose 3
orders. To get order 4, we should use n=7.
Input :
^
3+sin(x)^
3/(x-sin(x)),x=0,7)Output is a 4th-order series expansion :
^
2+x^
3+711/1400*x^
4+x^
5*order_size(x)