Professional Documents
Culture Documents
PRESENTED BY :-
NAME – V SAI MANASA
REG.NO - 210101120040
SEC - A
BRANCH :-COMPUTER SCIENCE AND ENGINEERING
• Determine the unequal interval: The interval can be defined by its endpoints, say
a and b, where a < b.
• Choose the interior point: Let x be the interior point, where a < x < b.
• Select the number of interpolation points: Determine the number of
interpolation points, n, that you want to use. The greater the number of points,
the more accurate the interpolation polynomial will be.
• Choose the interpolation points: Choose n points, {x0, x1, ..., xn-1}, where a <
x0 < x1 < ... < xn-1 < b. The interpolation points are typically chosen to be
evenly spaced, but they can also be chosen in other ways.
• Compute the Lagrange interpolation polynomial
• Evaluate the interpolation polynomial at x: Once you have computed the
Lagrange interpolation polynomial, simply evaluate it at x to get the value of the
function at the interior point.
Let's work through an example. Suppose we have the following four data points:
We want to find the value of the function f(x) at the point x0 = 2. Using the Lagrange
interpolation polynomial formula, we get: