 Rational Interpolation - Maple Help

CurveFitting

 RationalInterpolation
 compute a rational interpolating function Calling Sequence RationalInterpolation(xydata, z, opts) RationalInterpolation(xdata, ydata, z, opts) Parameters

 xydata - list, Array, DataFrame, or Matrix of the form [[x0,y0], [x1,y1], ... , [xn,yn]] ; data points xdata - list, Array, DataSeries, or Vector of the form [x0, x1, ..., xn]; independent values ydata - list, Array, DataSeries, or Vector of the form [y0, y1, ..., yn]; dependent values z - name or numeric value opts - (optional) equation of the form method=methodtype or degrees=[d1, d2] Description

 • The RationalInterpolation routine computes a rational function $\frac{u}{v}$, where u and v are polynomials in variable z having degrees at most d1 and d2, respectively. The degrees d1 and d2 can be provided by using the degrees option.  Otherwise, default values of $\mathrm{d1}=⌊\frac{n}{2}⌋$ and $\mathrm{d2}=⌊\frac{n}{2}+\frac{1}{2}⌋$ are used, where $n$ is one less than the total number of data points. If z is a numerical value, then the value of the function at this point is returned.  The polynomials u and v satisfy $\mathrm{yk}v\left(\mathrm{xk}\right)-u\left(\mathrm{xk}\right)=0$ for $k=0,1,...,\mathrm{d1}+\mathrm{d2}$, where $\left\{\left(\mathrm{x0},\mathrm{y0}\right),\left(\mathrm{x1},\mathrm{y1}\right),...,\left(\mathrm{xn},\mathrm{yn}\right)\right\}$, $\mathrm{d1}+\mathrm{d2}\le n$, are the input points.  In most (but not all) cases, this is equivalent to finding a rational function in z having certain degree constraints that interpolate the given points.
 • The RationalInterpolation function can be called in two ways.
 The first form accepts a list, Array, or Matrix, $[[\mathrm{x0},\mathrm{y0}],[\mathrm{x1},\mathrm{y1}],...,[\mathrm{xn},\mathrm{yn}]]$, of data points.
 The second form accepts this input data as two lists, two Arrays, or two Vectors. In this form, the first set of data contains the independent values, $[\mathrm{x0},\mathrm{x1},...,\mathrm{xn}]$, and the second set of data contains the dependent values, $[\mathrm{y0},\mathrm{y1},...,\mathrm{yn}]$.  Each element must be of type algebraic and not of type float, as the routine requires exact data.  All the independent values must be distinct.
 • Sometimes the linearized equation gives polynomials u and v that satisfy it, but with at least one of the xk a common zero. In this case, the resulting rational function does not interpolate the point xk (called an "unattainable" point), since common factors are removed from the rational function.  In such cases, the routine finds the rational function that interpolates a maximum number of points with the given degree constraints.  The case where there are unattainable points is recognizable by the fact that the degrees of both the numerator and the denominator are less than the degree constraints.
 • Two methods are available: one that avoids singularities in the corresponding table of interpolants by a "look-around" procedure, and another that jumps singularities by a "look-ahead" procedure.  The second procedure uses a recursion similar to that used for subresultant computation.  Both algorithms are fraction-free. The method can be specified by including the method=methodtype option, where methodtype is either lookaround (the default "look-around" procedure) or subresultant (the "look-ahead" procedure).
 • This function is part of the CurveFitting package, and so it can be used in the form RationalInterpolation(..) only after executing the command with(CurveFitting).  However, it can always be accessed through the long form of the command by using CurveFitting[RationalInterpolation](..). Examples

 > $\mathrm{with}\left(\mathrm{CurveFitting}\right):$
 > $\mathrm{RationalInterpolation}\left(\left[\left[0,0\right],\left[1,3\right],\left[2,1\right],\left[3,3\right]\right],x\right)$
 ${-}\frac{{3}{}{x}}{{4}{}{{x}}^{{2}}{-}{17}{}{x}{+}{12}}$ (1)

It can be verified that, in the previous example, the result interpolates the given points.  In the next example, $x=4$ is an unattainable point.

 > $\mathrm{xpoints}≔\left[0,1,2,3,4,-1\right]:$$\mathrm{ypoints}≔\left[0,3,1,3,a,\frac{1}{11}\right]:$
 > $f≔\mathrm{RationalInterpolation}\left(\mathrm{xpoints},\mathrm{ypoints},x\right)$
 ${f}{≔}{-}\frac{{3}{}{x}}{{4}{}{{x}}^{{2}}{-}{17}{}{x}{+}{12}}$ (2)
 > $\left[\mathrm{seq}\left(\mathrm{normal}\left(\mathrm{eval}\left(f,x=\mathrm{xpoints}\left[i\right]\right)-\mathrm{ypoints}\left[i\right]\right),i=1..6\right)\right]$
 $\left[{0}{,}{0}{,}{0}{,}{0}{,}{-}\frac{{3}}{{2}}{-}{a}{,}{0}\right]$ (3) References

 Beckermann, B., and Labahn, G. "Fraction-free Computation of Matrix Rational Interpolants and Matrix GCDs." SIAM Journal on Matrix Analysis and Applications, Vol. 22, No. 1. (2000): 114-144.
 Beckermann, B., and Labahn, G. "Numeric and Symbolic Computation of Problems Defined by Structured Linear Systems." Reliable Computing, Vol. 6, No. 4. (2000): 365-390.