pade returns a rationnal fraction P/Q such that degree(P)<p and P/Q=f (mod xn+1 ) or P/Q=f (mod N ).
In the first case, it means that P/Q and f have the same
Taylor expansion at 0 up to order n.
Input :
Or :
^
6,3)Output :
^
2+24*x+60)/(-x^
3+9*x^
2-36*x+60)To verify input :
^
2+24*x+60)/(-x^
3+9*x^
2-36*x+60))Output :
^
2+1/6*x^
3+1/24*x^
4+1/120*x^
5+x^
6*order_size(x)
which is the 5th-order series expansion of exp(x) at x=0.
Input :
^
15+x+1)/(x^
12+1),x,12,3)Or :
^
15+x+1)/(x^
12+1),x,x^
13,3)Output :
Input :
^
15+x+1)/(x^
12+1),x,14,4)Or :
^
15+x+1)/(x^
12+1),x,x^
15,4)Output :
^
3-1)/(-x^
11+x^
10-x^
9+x^
8-x^
7+x^
6-x^
5+x^
4- x^
3-x^
2+x-1)To verify, input :
Output :
^
12-x^
13+2x^
15+x^
16*order_size(x)then input :
^
15+x+1)/(x^
12+1),x=0,15)Output :
^
12-x^
13+x^
15+x^
16*order_size(x)These two expressions have the same 14th-order series expansion at x=0.