Formula
Lagrange's formula
|
1. Find equation using Lagrange's formula
`f(x) = ((x - x_1)(x - x_2)...(x - x_n))/((x_0 - x_1)(x_0 - x_2)...(x_0 - x_n)) xx y_0 + ((x - x_0)(x - x_2)...(x - x_n))/((x_1 - x_0)(x_1 - x_2)...(x_1 - x_n)) xx y_1` `+ ((x - x_0)(x - x_1)(x - x_3)...(x - x_n))/((x_2 - x_0)(x_2 - x_1)(x_2 - x_3)...(x_2 - x_n)) xx y_2 + ... + ((x - x_0)(x - x_1)...(x - x_(n-1)))/((x_n - x_0)(x_n - x_1)...(x_n - x_(n-1))) xx y_n`
2. Now, differentiate f(x) with respect to x to get f'(x) and f''(x)
3. Now, substitute value of `x` in f'(x) and f''(x)
|
Examples
1. Using Lagrange's formula to find solution
x = 5
Solution:
The value of table for `x` and `y`
Lagrange's Interpolating Polynomial
Lagrange's formula is
`f(x) = ((x - x_1)(x - x_2)(x - x_3))/((x_0 - x_1)(x_0 - x_2)(x_0 - x_3)) xx y_0 + ((x - x_0)(x - x_2)(x - x_3))/((x_1 - x_0)(x_1 - x_2)(x_1 - x_3)) xx y_1 + ((x - x_0)(x - x_1)(x - x_3))/((x_2 - x_0)(x_2 - x_1)(x_2 - x_3)) xx y_2 + ((x - x_0)(x - x_1)(x - x_2))/((x_3 - x_0)(x_3 - x_1)(x_3 - x_2)) xx y_3`
`f(x) = ((x -4)(x -9)(x -10))/((2 -4)(2 -9)(2 -10)) xx 4 + ((x -2)(x -9)(x -10))/((4 -2)(4 -9)(4 -10)) xx 56 + ((x -2)(x -4)(x -10))/((9 -2)(9 -4)(9 -10)) xx 711 + ((x -2)(x -4)(x -9))/((10 -2)(10 -4)(10 -9)) xx 980`
`f(x) = ((x -4)(x -9)(x -10))/((-2)(-7)(-8)) xx 4 + ((x -2)(x -9)(x -10))/((2)(-5)(-6)) xx 56 + ((x -2)(x -4)(x -10))/((7)(5)(-1)) xx 711 + ((x -2)(x -4)(x -9))/((8)(6)(1)) xx 980`
`f(x) = (x^3-23x^2+166x-360)/(-112) xx 4 + (x^3-21x^2+128x-180)/(60) xx 56 + (x^3-16x^2+68x-80)/(-35) xx 711 + (x^3-15x^2+62x-72)/(48) xx 980`
`f(x) = (x^3-23x^2+166x-360) xx -0.0357 + (x^3-21x^2+128x-180) xx 0.9333 + (x^3-16x^2+68x-80) xx -20.3143 + (x^3-15x^2+62x-72) xx 20.4167`
`f(x) = (-+0.82x^2-5.93x+12.86) + (0.93x^3-19.6x^2+119.47x-168) + (-20.31x^3+325.03x^2-1381.37x+1625.14) + (20.42x^3-306.25x^2+1265.83x-1470)`
`f(x) = x^3-2x `
Now, differentiate with x
`f'(x)=3x^2-2`
`f''(x)=6x`
Now, substitute `x=5`
`f'(5)=3 xx 5^2-2=73`
`f''(5)=6 xx 5=30`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then