# rationalInterpolation(List,List,Ring) -- numerically interpolate rational functions

## Synopsis

• Function: rationalInterpolation
• Usage:
(n,d) = rationalInterpolation(pts, vals, R)
• Inputs:
• pts, a list, of one-row matrices corresponding to points at which the rational function was evaluated
• vals, a list, of numbers corresponding to evaluations of the rational function
• R, a ring, the polynomial ring in which the numerator and denominator are sought
• Optional inputs:
• Tolerance => ..., default value .000001, optional argument for numerical tolernace
• Outputs:
• n, , the numerator of the rational function
• d, , the denominator of the rational function

## Description

Given a list 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 method first tries to find polynomials $g,h$ of degree 0; if this fails, it tries to find $g,h$ of degree 1 and so on. This procedure stops when there are not enough points to compute the next degree, in which case an error will be thrown.

 i1 : R = CC[x] o1 = R o1 : PolynomialRing i2 : pts = {point{{0}},point{{1}},point{{2}}, point{{3}}, point{{4}}} o2 = {{0}, {1}, {2}, {3}, {4}} o2 : List i3 : vals = {-1, 1/2, 1, 5/4, 7/5} 1 5 7 o3 = {-1, -, 1, -, -} 2 4 5 o3 : List i4 : rationalInterpolation(pts, vals, R) -- warning: experimental computation over inexact field begun -- results not reliable (one warning given per session) o4 = (2x - 1, 1x + 1) o4 : Sequence