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:
where order_size is a function such that,
|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).
Or (be carefull with the order of the arguments !) :
The order returned by taylor may be smaller than n if cancellations between numerator and denominator occur, for example
The output is only a 2nd-order series expansion :
Indeed the numerator and denominator valuation is 3, hence we loose 3 orders. To get order 4, we should ask n=7, input :
Output is a 4th-order series expansion :