Given a set of points $pts = \{p_1,\dots,p_k\}$ and values $vals = \{v_1,\dots,v_k\}$, attempts to find a rational function $f = g/h$, such that $f(p_i) = v_i$. The polynomials $g$ and $h$ have monomial support numBasis and denBasis respectively.
i1 : R = CC[x,y] o1 = R o1 : PolynomialRing |
i2 : pts = {point{{1,0}}, point{{0,1}}, point{{1,1}}, point{{-1,-1}}, point{{-1,0}}} o2 = {{1, 0}, {0, 1}, {1, 1}, {-1, -1}, {-1, 0}} o2 : List |
i3 : vals = {1, 0, 1/2, -1/2, -1} 1 1 o3 = {1, 0, -, - -, -1} 2 2 o3 : List |
i4 : numBasis = matrix{{x,y}} o4 = | x y | 1 2 o4 : Matrix R <--- R |
i5 : denBasis = matrix{{x^2,y^2}} o5 = | x2 y2 | 1 2 o5 : Matrix R <--- R |
i6 : rationalInterpolation(pts, vals, numBasis, denBasis) 2 2 o6 = (1x, 1x + y ) o6 : Sequence |
The output corresponds to the function $x / (x^2 + y^2)$. If no fitting rational function is found, the method returns an error.
The method rationalInterpolation(List,List,Ring) can be used to choose monomial supports automatically.
The method uses the first point to remove $0/0$ rational functions. Because of this, the first entry of val should be non-zero.
The object rationalInterpolation is a method function with options.