Problem with expand in lagrange interpolation



On Thu, Jun 14, 2007 at 02:20:23PM -0400, Stavros Macrakis wrote:
> On 6/14/07, Daniel Lakeland <dlakelan at street-artists.org> wrote:
> >
> >I spent a little time last night rewriting the lagrange routine's
> >computation of the polynomial to use the newton divided differences
> >form.
> >
> 
> I'm not sure I understand.  The interpolation polynomial (of degree n-1) on
> n points is unique. There is a variety of ways of rewriting that polynomial
> for various purposes and I don't see why you'd want the lagrange routine to
> output anything other than the lagrange form.

This is a good point. However, it was my assumption that the naming of
the routine was essentially accidental. The point is that the routine
returns a global polynomial interpolatant, as opposed to the cubic
splines or linear interpolation that the other routines in the file
do.

so perhaps we could have a single routine that returns whatever form
is requested:

polyinterpol(data,form,var)... where form selects the various forms.

the error checking code is essentially the same in all cases, so it
makes sense to have a single function.



-- 
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan