#9794: Make easy wrapper for symbolic lagrange interpolation
---------------------------+------------------------------------------------
   Reporter:  kcrisman     |       Owner:  burcin  
       Type:  enhancement  |      Status:  new     
   Priority:  major        |   Milestone:  sage-4.6
  Component:  symbolics    |    Keywords:          
     Author:               |    Upstream:  N/A     
   Reviewer:               |      Merged:          
Work_issues:               |  
---------------------------+------------------------------------------------
 Currently, one has to do something like one of these.
 {{{
  > 1. There is no way to get a symbolic interpolated polynomial de novo
  > without going through polynomial rings, e.g. all these steps:
  >
  > pts = [(1,2),(2,3),(3,2),(4,3),(5,2),(6,3)]
  > R.<x>=QQ[]
  > f = R.lagrange_polynomial(pts)
  > SR(f)
  >
 Yes.  You could define your own function :) (see
 http://sage.cs.drake.edu/home/pub/2/, for example).  Also, mpmath and
 numpy/scipy can get numerical values for the coefficients, I believe.
 Maxima also can construct a lagrange polynomial (load the 'interpol'
 package)
 sage: maxima.load('interpol')
 "/home/jason/sage-4.4.2/local/share/maxima/5.20.1/share/numeric/interpol.ma
 c"
 sage: maxima.lagrange([[1,2],[3,4]])
 -x+2*(x-1)+3
 }}}
 That's too bad; we need to wrap this to make it very easy to get the
 interpolation from a list of points with one command from SR.

 One thing to discuss would be whether one would want an approximate one if
 the coefficients were floats/RR, or always to try for an exact one.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9794>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to