numapprox

Parameters

 f - expression representing the function to be approximated x - the variable appearing in f a - the finite point about which to expand in a series m, n - desired degree of numerator and denominator, respectively

Description

 • The function pade computes a Pade approximation of degree $m,n$ for the function $f$ with respect to the variable $x$.
 • Specifically, $f$ is expanded in a Taylor (or Laurent) series about the point $x=a$ (if $a$ is not specified then the expansion is about the point $x=0$), to order $m+n+1$, and then the Pade rational approximation is computed.
 • The $m,n$ Pade approximation is defined to be the rational function $\frac{p\left(x\right)}{q\left(x\right)}$ with $\mathrm{deg}\left(p\left(x\right)\right)\le m$ and $\mathrm{deg}\left(q\left(x\right)\right)\le n$ such that the Taylor (or Laurent) series expansion of $\frac{p\left(x\right)}{q\left(x\right)}$ has maximal initial agreement with the series expansion of $f$. In normal cases, the series expansion agrees through the term of degree $m+n$.
 • If the order of the lowest order term in the Laurent series is a negative integer $v$ and $n+v<0$, then no rational approximation with a denominator of degree at most $n$ can exist, and an error is raised. If $v>m\ge 0$, the return value is $0$.
 • If the third argument is simply an integer $m$, then the Taylor (or Laurent) polynomial of (relative) degree $m$ is computed.
 • Various levels of user information will be displayed during the computation if infolevel[pade] is assigned values between $1$ and $3$.
 • The command with(numapprox,pade) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{numapprox}\right):$
 > $\mathrm{pade}\left(\mathrm{exp}\left(x\right),x,\left[3,3\right]\right)$
 $\frac{\frac{{1}}{{10}}{}{{x}}^{{2}}{+}\frac{{1}}{{2}}{}{x}{+}{1}{+}\frac{{1}}{{120}}{}{{x}}^{{3}}}{\frac{{1}}{{10}}{}{{x}}^{{2}}{-}\frac{{1}}{{2}}{}{x}{+}{1}{-}\frac{{1}}{{120}}{}{{x}}^{{3}}}$ (1)
 > $\mathrm{pade}\left(\frac{1}{x\mathrm{sin}\left(x\right)},x=0,\left[4,6\right]\right)$
 $\frac{{1}{+}\frac{{13}}{{396}}{}{{x}}^{{2}}{+}\frac{{5}}{{11088}}{}{{x}}^{{4}}}{\frac{{551}}{{166320}}{}{{x}}^{{6}}{-}\frac{{53}}{{396}}{}{{x}}^{{4}}{+}{{x}}^{{2}}}$ (2)
 > $\mathrm{pade}\left(\mathrm{\Gamma }\left(x\right),x=1,\left[1,1\right]\right)$
 $\frac{{\mathrm{\gamma }}{+}\left({-}\frac{{{\mathrm{\gamma }}}^{{2}}}{{2}}{+}\frac{{{\mathrm{\pi }}}^{{2}}}{{12}}\right){}\left({x}{-}{1}\right)}{{\mathrm{\gamma }}{+}\left(\frac{{{\mathrm{\pi }}}^{{2}}}{{12}}{+}\frac{{{\mathrm{\gamma }}}^{{2}}}{{2}}\right){}\left({x}{-}{1}\right)}$ (3)
 > $\mathrm{pade}\left(\mathrm{cos}\left(x\right),x,\left[3,4\right]\right)$
 $\frac{{1}{-}\frac{{61}{}{{x}}^{{2}}}{{150}}}{\frac{{7}}{{75}}{}{{x}}^{{2}}{+}{1}{+}\frac{{1}}{{200}}{}{{x}}^{{4}}}$ (4)
 > $\mathrm{pade}\left(\mathrm{cos}\left(x\right),x,7\right)$
 ${1}{-}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{24}}{}{{x}}^{{4}}{-}\frac{{1}}{{720}}{}{{x}}^{{6}}$ (5)
 > $\mathrm{pade}\left(\frac{\mathrm{exp}\left(x\right)}{{x}^{3}},x,\left[4,0\right]\right)$
 > $\mathrm{pade}\left(\frac{\mathrm{exp}\left(x\right)}{{x}^{3}},x,4\right)$
 $\frac{{1}}{{{x}}^{{3}}}{+}\frac{{1}}{{{x}}^{{2}}}{+}\frac{{1}}{{2}{}{x}}{+}\frac{{1}}{{6}}{+}\frac{{x}}{{24}}$ (6)
 > $\mathrm{pade}\left(\mathrm{exp}\left({x}^{3}\right)-1,x,\left[2,5\right]\right)$
 ${0}$ (7)