Newtons backward Difference formula -sastry 3.6
#Newtons backwardDiffernce formula -sastry 3.6 xpoints=[15,20,25,30,35,40] ypoints=[.2588190,0.3420201,0.4226183,0.5,0.573576,0.6427876] n=len(xpoints) z=[0] d1=z*(n-1) d2=z*(n-2) d3=z*(n-3) d4=z*(n-4) d5=z*(n-5) x=float(input('enter data point for interpolation')) h=xpoints[1]-xpoints[0] for i in range(0,n-1): d1[i]=ypoints[i+1]-ypoints[i] for i in range(0,n-2): d2[i]=d1[i+1]-d1[i] for i in range(0,n-3): d3[i]=d2[i+1]-d2[i] for i in range(0,n-4): d4[i]=d3[i+1]-d3[i] for i in range(0,n-5): d5[i]=d4[i+1]-d4[i] print('Table of first order differences \n', d1) print('\n Table of second order differences \n',d2) print('\n Table of third order differences \n',d3) print('\n Table of fourth order differences \n',d4) print('\n Table of fifth order differences \n',d5) p=(x-xpoints[0])/h print ('p=',p) print ('h=',h) yvalue=ypoints[0]+p*d1[0]+(p*(p-1)*d2[0])/2+(p*(p-1)*(p-2)*d3[0])/6 yvalue1=yvalue+(p*(p-1)*(p-2