Lagrange, Newton, Interpolation, Python, Mathematics.
for j in range(1,n): for i in range(n-j): fdd[i][j] = (fdd[i+1][j-1] - fdd[i][j-1])/(x[i+j]-x[i]) #just printing dd here fdd_table = pd.DataFrame(fdd) print(fdd_table) #interpolating xi xterm = 1 yint[0] = fdd[0][0] for order in range(1, n): xterm = xterm * (xi - x[order-1]) yint2 = yint[order-1] +