Lab 8
Lab 8
The split difference of Newton Using the differences in the function values at each point, a
polynomial is created as an interpolation technique to approximate a group of data points.
It provides a flexible tool for curve fitting and function approximation by offering a
methodical approach to effective polynomial interpolation.
Algorithm
Set the division differences for the specified data points to zero. To approximate the values
of the function at desired places, compute the Newton interpolating polynomial. To
determine the related y estimates, evaluate the Newton interpolating polynomial for a
range of x values.
Advantages
Disadvantages
Less Visually Intuitive Expression: Compared to the Lagrange polynomial, the Newton
interpolating polynomial is less visually intuitive. Newton's method involves coefficients
that are not immediately associated with corresponding data points, which complicates the
interpretation and communication of the interpolation formula.
Unequal Spacing Dependency: The Runge's phenomenon refers to the fact that more
oscillations in the interpolated polynomial can result from uneven data point spacing,
which is a prerequisite for Newton's method. In these situations, lagrange interpolation
might provide more stability, which would make it a better option for data that is
irregularly distributed.
Code In [11]: plt.plot(x_range, newton_y, label='Newton Interpolation')
plt.scatter(x_values, y_values, color='red', label='Data Points (Lagrange)')
plt.plot(x_range, lagrange_y, linestyle='dotted',color='black', label='Lagrange
plt.scatter(x_interp, lagrange_interpolation(x_values, y_values, x_interp), colo