ratrecon - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

ratrecon

rational function reconstruction

 Calling Sequence ratrecon(u, m, x, N, D)

Parameters

 u, m - polynomials in x x - name N, D - (optional) non-negative integers

Description

 • The purpose of this routine is to reconstruct a rational function $\frac{n}{d}$ in x from its image $u\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}m$ where u and m are polynomials in ${F}_{x}$, and $F$ is a field of characteristic 0. Given positive integers N and D, ratrecon returns the unique rational function $r=\frac{n}{d}$ if it exists satisfying $r=u\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}m$, $\mathrm{degree}\left(n,x\right)\le N$, $\mathrm{degree}\left(d,x\right)\le \mathrm{D}$, and $\mathrm{lcoeff}\left(d,x\right)=1$. Otherwise ratrecon returns FAIL, indicating that no such polynomials n and d exist.  The rational function r exists and is unique up to multiplication by a constant in $F$ provided the following conditions hold:

$N+\mathrm{D}<\mathrm{degree}\left(m,x\right)$

${\mathrm{deg}}_{x}\left(\mathrm{GCD}\left(d,m\right)\right)=0$

 • If the integers N and D are not specified, they both default to be the integer $\mathrm{floor}\left(\frac{\left(\mathrm{degree}\left(m,x\right)-1\right)}{2}\right)\right)$.
 • Note, in order to use this routine to reconstruct a rational function $r=\frac{n}{d}$ from u satisfying $r=u\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}m$, the modulus m being used must be chosen to be relatively prime to d. Otherwise the reconstruction returns FAIL.
 • The special case of $m={x}^{k}$ corresponds to computing the N,D Pade approximate to the series u of order $\mathrm{O}\left({x}^{k}\right)$.
 • For the special case of $N=0$, the polynomial $\frac{d}{n}$ is the inverse of u in $\frac{{F}_{x}}{m}$ provided u and m are relatively prime.

Examples

 > $s≔\mathrm{convert}\left(\mathrm{series}\left(\mathrm{exp}\left(x\right),x\right),\mathrm{polynom}\right)$
 ${s}{≔}{1}{+}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}\frac{{1}}{{24}}{}{{x}}^{{4}}{+}\frac{{1}}{{120}}{}{{x}}^{{5}}$ (1)
 > $\mathrm{ratrecon}\left(s,{x}^{6},x,3,2\right)$
 $\frac{{20}{+}\frac{{1}}{{3}}{}{{x}}^{{3}}{+}{3}{}{{x}}^{{2}}{+}{12}{}{x}}{{{x}}^{{2}}{-}{8}{}{x}{+}{20}}$ (2)
 > $\mathrm{ratrecon}\left(s,{x}^{6},x,2,3\right)$
 $\frac{{-}{3}{}{{x}}^{{2}}{-}{24}{}{x}{-}{60}}{{{x}}^{{3}}{-}{9}{}{{x}}^{{2}}{+}{36}{}{x}{-}{60}}$ (3)
 > $\mathrm{ratrecon}\left(s,{x}^{6},x,3,3\right)$
 > $\mathrm{ratrecon}\left({x}^{2}+1,{x}^{3},x,1,1\right)$
 ${\mathrm{FAIL}}$ (4)
 > $r≔\mathrm{ratrecon}\left(x-1,{x}^{3}-2,x,0,2\right)$
 ${r}{≔}\frac{{1}}{{{x}}^{{2}}{+}{x}{+}{1}}$ (5)
 > $\mathrm{rem}\left(\frac{x-1}{r},{x}^{3}-2,x\right)$
 ${1}$ (6)