Lagrange Interpolation Calculator

Lagrange polynomials are used for polynomial interpolation and numerical analysis. This is a free online Lagrange interpolation calculator to find out the Lagrange polynomials for the given x and y values.

x
y
Value of corresponding to x
P(x)=

Lagrange polynomials are used for polynomial interpolation and numerical analysis. This is a free online Lagrange interpolation calculator to find out the Lagrange polynomials for the given x and y values.

Code to add this calci to your website Expand embed code Minimize embed code

Formula used:

Where, x and y are the co-ordinates

Lagrange polynomial is the polynomial of the lowest degree that assumes at each value of the corresponding value. While applying the Lagrange interpolation for a given set of points with unequal values, the functions coincide at each point. They are used in many applications, the important ones are Newton–Cotes method of numerical integration and Shamir's secret sharing scheme in cryptography. Use this online Lagrange interpolation calculator to find the polynomial value for a given set of distinct points x and y corresponding to the value of x.

Example

Find P(x) based on the Lagrange interpolation for given x values 1,2,7 y values 2,3,4 and corresponding x value = 2

Given,
x1 = 1 , x2 = 2 , x3 = 7 , y1 = 2 , y2 = 3 , y3 = 4 , x = 2

Formula
y1( x - x2 ) ( x - x3 ) / ( x1 - x2 ) ( x1- x3 ) +
y 2 ( x - x1 ) ( x - x3 ) / ( x2 - x1 )( x 2- x3 ) +
y3 ( x - x1) ( x - x2 ) / ( x3 - x1) ( x3 - x 2 )

Solution
2 ( 2 - 2 ) ( 2 - 7 ) / ( 1 - 2 ) ( 1- 7 ) + 3 ( 2 - 1 ) ( 2 - 7 ) / ( 2 - 1 )( 2- 7 ) + 4 (2 - 1 ) (2 - 2 ) / (7 - 1 ) (7 - 2 )
= 0 + 3 + 0
P(x) = 3

english Calculators and Converters