Previous Up Next

13.5.5  Padé expansion

The pade command finds a rational expression which agrees with a function up to a given order.

Examples

pade(exp(x),x,5,3)

or:

pade(exp(x),x,x^6,3)
     
−3 x2−24 x−60
x3−9 x2+36 x−60
          

To verify:

taylor((3*x^2+24*x+60)/(-x^3+9*x^2-36*x+60))
     
1+x+
x2
2
+
x3
6
+
x4
24
+
x5
120
+x6 order_size⎛
⎝
x⎞
⎠
          

which is the 5th-order series expansion of exp(x) at x=0.

pade((x^15+x+1)/(x^12+1),x,12,3)

or:

pade((x^15+x+1)/(x^12+1),x,x^13,3)
     
x+1           
pade((x^15+x+1)/(x^12+1),x,14,4)

or:

pade((x^15+x+1)/(x^12+1),x,x^15,4)
     
2 x3+1
x11−x10+x9−x8+x7−x6+x5−x4+x3+x2−x+1
          

To verify:

series(ans(),x=0,15)
     
1+x−x12−x13+2 x15+x16 order_size⎛
⎝
x⎞
⎠
          

Then:

series((x^15+x+1)/(x^12+1),x=0,15)
     
1+x−x12−x13+x15+x16 order_size⎛
⎝
x⎞
⎠
          

These two expressions have the same 14th-order series expansion at x=0.


Previous Up Next