ratrecon
rational function reconstruction
Calling Sequence
Parameters
Description
Examples
ratrecon(u, m, x, N, D)
u, m
-
polynomials in x
x
name
N, D
(optional) non-negative integers
The purpose of this routine is to reconstruct a rational function nd in x from its image umodm where u and m are polynomials in Fx, and F is a field of characteristic 0. Given positive integers N and D, ratrecon returns the unique rational function r=nd if it exists satisfying r=umodm, degree⁡n,x≤N, degree⁡d,x≤D, and lcoeff⁡d,x=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+D<degree⁡m,x
degx⁡GCD⁡d,m=0
If the integers N and D are not specified, they both default to be the integer floordegree⁡m,x−12).
Note, in order to use this routine to reconstruct a rational function r=nd from u satisfying r=umodm, the modulus m being used must be chosen to be relatively prime to d. Otherwise the reconstruction returns FAIL.
The special case of m=xk corresponds to computing the N,D Pade approximate to the series u of order O⁡xk.
For the special case of N=0, the polynomial dn is the inverse of u in Fxm provided u and m are relatively prime.
s≔convert⁡series⁡exp⁡x,x,polynom
s≔1+x+12⁢x2+16⁢x3+124⁢x4+1120⁢x5
ratrecon⁡s,x6,x,3,2
20+13⁢x3+3⁢x2+12⁢xx2−8⁢x+20
ratrecon⁡s,x6,x,2,3
−3⁢x2−24⁢x−60x3−9⁢x2+36⁢x−60
ratrecon⁡s,x6,x,3,3
Error, (in ratrecon) degree bounds too big
ratrecon⁡x2+1,x3,x,1,1
FAIL
r≔ratrecon⁡x−1,x3−2,x,0,2
r≔1x2+x+1
rem⁡x−1r,x3−2,x
1
See Also
convert/ratpoly
gcdex
iratrecon
Ratrecon
Download Help Document