# Lagrange Interpolation Formula

Last Updated : 26 Aug, 2023

Lagrange Interpolation Formula finds a polynomial called Lagrange Polynomial that takes on certain values at an arbitrary point. It is an nth-degree polynomial expression of the function f(x). The interpolation method is used to find the new data points within the range of a discrete set of known data points.

In this article, we will learn about, Lagrange Interpolation, Lagrange Interpolation Formula, Proof for Lagrange Interpolation Formula, Examples based on Lagrange Interpolation Formula, and others in detail.

## What is Lagrange Interpolation?

Lagrange Interpolation is a way of finding the value of any function at any given point when the function is not given. We use other points on the function to get the value of the function at any required point.

Suppose we have a function y = f(x) in which substituting the values of x gives different values of y. And we are given two points (x1, y1) and (x2, y2) on the curve then the value of y at x = a(constant) is calculated using Lagrange Interpolation Formula.

## Lagrange Interpolation Formula

Given few real values x1, x2, x3, …, xn and y1, y2, y3, …, yn and there will be a polynomial P with real coefficients satisfying the conditions P(xi) = yi, âˆ€ i = {1, 2, 3, …, n} and degree of polynomial P must be less than the count of real values i.e., degree(P) < n.

## Lagrange Interpolation Formula for nth Order

The Lagrange Interpolation formula for nth degree polynomial is given below:

Lagrange Interpolation Formula for the nth order is,

### Lagrange First Order Interpolation Formula

If the Degree of the polynomial is 1 then it is called the First Order Polynomial. Lagrange Interpolation Formula for 1st order polynomials is,

### Lagrange Second Order Interpolation Formula

If the Degree of the polynomial is 2 then it is called Second Order Polynomial. Lagrange Interpolation Formula for 2nd order polynomials is,

## Proof of Lagrange Theorem

Let’s consider a nth-degree polynomial of the given form,

f(x) = A0(x – x1)(x – x2)(x – x3)…(x – xn) + A1(x – x1)(x – x2)(x – x3)…(x – xn) + … + A(n-1)(x – x1)(x – x2)(x – x3)…(x – xn)

Substitute observations xi to get Ai

Put x = x0 then we get A0

f(x0) = y0 = A0(x0 – x1)(x0 – x2)(x0 – x3)…(x0 – xn)

A0 = y0/(x0 – x1)(x0 – x2)(x0 – x3)…(x0 – xn)

By substituting x = x1 we get A1

f(x1) = y1 = A1(x1 – x0)(x1 – x2)(x1 – x3)…(x1 – xn)

A1 = y1/(x1 – x0)(x1 – x2)(x1 – x3)…(x1 – xn)

Similarly, by substituting x = xn we get An

f(xn) = yn = An(xn – x0)(xn – x1)(xn – x2)…(xn – xn-1)

An = yn/(xn – x0)(xn – x1)(xn – x2)…(xn – xn-1)

If we substitute all values of Ai in function f(x) where i = 1, 2, 3, …n then we get Lagrange Interpolation Formula as,

## Properties of Lagrange Interpolation Formula

Various properties of the Lagrange Interpolation Formula are discussed below,

•  This formula is used to find the value of the function at any point even when the function itself is not given.
• It is used even if the points given are not evenly spaced.
• It gives the value of the depennt variable for any independent variable belong to any function and thus is used in Numeracial Analysis for finding the values of the function, etc.

## Uses of Lagrange Interpolation Formula

Various uses of the Lagrange Interpolation Formula are discussed below,

• It is used to find the value of the dependent variable at any particular independent variable even if the function itself is not given.
• It is used in image scaling.
• It is used in AI modeling.
• It is used to teach NLPs, etc.

## Examples Using Lagrange Interpolation Formula

Let’s look into a few sample questions on Lagrange Interpolation Formula.

Example 1: Find the value of y at x = 2 for the given set of points (1, 2),(3, 4)

Solution:

Given,

• (x0, y0) = (1, 2)
• (x1, y1) = (3, 4)

First order Lagrange Interpolation Formula is,

At x = 2

y = (-2/-2) + (4/2)

y = 1 + 2 = 3

The value of y at x = 2 is 3

Example 2: Find the value of y at x = 5 for the given set of points (9, 2), (3, 10)

Solution:

Given,

• (x0, y0) = (9, 2)
• (x1, y1) = (3, 10)

First order Lagrange Interpolation Formula is,

At x = 5

y = (4/6) + (-40/-6)

y = (2/3) + (20/3)

y = 22/3 = 7.33

The value of y at x = 5 is 7.33

Example 3: Find the value of y at x = 1 for the given set of points (1, 6), (3, 4), (2, 5)

Solution:

Given,

• (x0, y0) = (1, 6)
• (x1, y1) = (3, 4)
• (x2, y2) = (2, 5)

Second Order Lagrange Interpolation Formula is,

At x = 1

y = (12/2) + 0 + 0

y = 6

The value of y at x = 1 is 6

Example 4: Find the value of y at x = 10 for the given set of points (9, 6), (3, 5), (1, 12)

Solution:

Given,

• (x0, y0) = (9, 6)
• (x1, y1) = (3, 5)
• (x2, y2) = (1, 12)

Second Order Lagrange Interpolation Formula is,

At x = 10

y = (63/8) + (-15/4) + (21/4)

y = (63-30 + 42)/8

y = 75/8 = 9.375

The value of y at x = 10 is 9.375

Example 5: Find the value of y at x = 7 for the given set of points (1, 10), (2, 4), (3, 4), (5, 7)

Solution:

Given,

• (x0, y0) = (1, 10)
• (x1, y1) = (2, 4)
• (x2, y2) = (3, 4)
• (x3, y3) = (5, 7)

Third Order Lagrange Interpolation Formula is,

At x = 7

y = -50 + 64 – 60 + 35

y = 99 – 110 = -11

The value of y at x = 7 is -11

Example 6: Find the value of y at x = 10 for the given set of points (5, 12), (6, 13), (7, 14), (8, 15)

Solution:

Given,

• (x0, y0) = (5, 12)
• (x1, y1) = (6, 13)
• (x2, y2) = (7, 14)
• (x3, y3) = (8, 15)

Third Order Lagrange Interpolation Formula is,

At x = 10,

y = -48 + 195 – 280 + 150

y = 17

The value of y at x = 10 is 17

Example 7: Find the value of y at x = 0 for the given set of points (-2, 5),(1, 7)

Solution:

Given,

• (x0, y0) = (-2, 5)
• (x1, y1) = (1, 7)

First Order Lagrange Interpolation Formula is,

At x = 0,

y = (5/3) + (14/3)

y = 19/3 = 6.33

The value of y at x = 0 is 6.33

## FAQs on Lagrange Interpolation Formula

### 1. What is Lagrange Interpolation Formula?

Lagrange Interpolation Formula is a formula that is used to find the value of the dependent variable of the function for any independent variable even though the function itself is not given.

### 2. What are the Applications of Lagrange Interpolation Formula?

Lagranges Formula has various application in modern Mathematics and Data Sciences,

• It is used to AI model Traning.
• It is used in Image Processing.
• It is used in Graphing 3-D and higher curves, etc.

### 3. What is First Order Lagrange Interpolation Formula?

The First Order Lagranges Interpolation Formula is,

f(x) = (x – x1)/(x0 – x1)Ã—f0 + (x – x0)/(x1 – x0)Ã—f1

### 4. What is Second Order Lagrange Interpolation Formula?

The Second Order Lagranges Interpolation Formula is,

f(x) = [(x – x1)(x – x2)/(x0 – x1)(x0 – x2)]Ã—f0 + [(x – x0)(x – x2)/(x1 – x0)(x1 – x2)]Ã—f1 + [(x – x0)(x – x1)/(x2 – x0)(x2 – x2)]Ã—f0

Previous
Next