1 | initial version |
Here is what I get with sage 8.7.beta2. This seems tobe correct. Which version of sage are you using ?
sage: x = QQ[['x']].0
sage: f = x.cos()
sage: f.pade(2,4)
(-244/3*x^2 + 200)/(x^4 + 56/3*x^2 + 200)
sage: f.pade(2,4)(x)
1 - 1/2*x^2 + 1/24*x^4 - 1/720*x^6 - 17/216000*x^8 + 463/32400000*x^10 - 9139/9720000000*x^12 + 23771/1458000000000*x^14 + 1390687/437400000000000*x^16 - 24818093/65610000000000000*x^18 + O(x^20)
sage: f
1 - 1/2*x^2 + 1/24*x^4 - 1/720*x^6 + 1/40320*x^8 - 1/3628800*x^10 + 1/479001600*x^12 - 1/87178291200*x^14 + 1/20922789888000*x^16 - 1/6402373705728000*x^18 + O(x^20)
2 | No.2 Revision |
Here is what I get with sage 8.7.beta2. This seems tobe to be correct. Which version of sage are you using ?
sage: x = QQ[['x']].0
sage: f = x.cos()
sage: f.pade(2,4)
(-244/3*x^2 + 200)/(x^4 + 56/3*x^2 + 200)
sage: f.pade(2,4)(x)
1 - 1/2*x^2 + 1/24*x^4 - 1/720*x^6 - 17/216000*x^8 + 463/32400000*x^10 - 9139/9720000000*x^12 + 23771/1458000000000*x^14 + 1390687/437400000000000*x^16 - 24818093/65610000000000000*x^18 + O(x^20)
sage: f
1 - 1/2*x^2 + 1/24*x^4 - 1/720*x^6 + 1/40320*x^8 - 1/3628800*x^10 + 1/479001600*x^12 - 1/87178291200*x^14 + 1/20922789888000*x^16 - 1/6402373705728000*x^18 + O(x^20)