Newton Divided Difference



Yes, I know about lagrange, but I was answering the OP question!  Just for
the record, here's divided differences done with Neville's algorithm:

neville(X,Y):=block([n:length(X),p],
  p:zeromatrix(n,n),
  for i:1 thru n do p[i,i]:float(Y[i]),
  for i:1 thru n-1 do (
    for j:i+1 thru n do

p[j-i,j]:expand(((x-X[j])*p[j-i,j-1]-(x-X[j-i])*p[j-i+1,j])/(X[j-i]-X[j]))
      ),
  return(p[1,n])
  )$

-Alasdair


On Sat, Aug 30, 2008 at 9:46 PM, Richard Fateman <fateman at cs.berkeley.edu>wrote:

>  load("interpol");
> lagrange ([[x0,f(x0)],  [x1, f(x1)], .....]);
>
> the result from lagrange interpolation and newton divided difference
> interpolation is algebraically equivalent.
>
>
>
>
>  ------------------------------
> *From:* maxima-bounces at math.utexas.edu [mailto:
> maxima-bounces at math.utexas.edu] *On Behalf Of *Angelique Sta maria
> *Sent:* Friday, August 29, 2008 6:15 PM
> *To:* maxima help
> *Subject:* [Maxima] Newton Divided Difference
>
>
>
> How will you implement this in Maxima?
>
> Need your help. Thank you.
>
>
>
>  ------------------------------
>  Al  ways-on security tools provide safer ways to connect and share
> anywhere. Find out more. Windows Live<http://get.live.com/familysafety/overview>;
>
>
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>


-- 
Blog: http://amca01.wordpress.com