Home > Numerical methods calculators > Numerical Differentiation using Lagrange's formula example

5. Lagrange's formula (Numerical Differentiation) example ( Enter your problem )
  1. Formula & Example-1
  2. Example-2
Other related methods
  1. Newton's Forward Difference formula
  2. Newton's Backward Difference formula
  3. Newton's Divided Difference formula
  4. Lagrange's formula
  5. Stirling's formula
  6. Bessel's formula

1. Formula & Example-1
(Previous example)
5. Stirling's formula
(Next method)

2. Example-2





2. Using Lagrange's formula to find solution
xf(x)
04
13
424
539

x = 2


Solution:
The value of table for `x` and `y`

x0145
y432439

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 -1)(x -4)(x -5))/((0 -1)(0 -4)(0 -5)) xx 4 + ((x -0)(x -4)(x -5))/((1 -0)(1 -4)(1 -5)) xx 3 + ((x -0)(x -1)(x -5))/((4 -0)(4 -1)(4 -5)) xx 24 + ((x -0)(x -1)(x -4))/((5 -0)(5 -1)(5 -4)) xx 39`

`f(x) = ((x -1)(x -4)(x -5))/((-1)(-4)(-5)) xx 4 + ((x -0)(x -4)(x -5))/((1)(-3)(-4)) xx 3 + ((x -0)(x -1)(x -5))/((4)(3)(-1)) xx 24 + ((x -0)(x -1)(x -4))/((5)(4)(1)) xx 39`

`f(x) = (x^3-10x^2+29x-20)/(-20) xx 4 + (x^3-9x^2+20x)/(12) xx 3 + (x^3-6x^2+5x)/(-12) xx 24 + (x^3-5x^2+4x)/(20) xx 39`

`f(x) = (x^3-10x^2+29x-20) xx -0.2 + (x^3-9x^2+20x) xx 0.25 + (x^3-6x^2+5x) xx -2 + (x^3-5x^2+4x) xx 1.95`

`f(x) = (-0.2x^3+2x^2-5.8x+4) + (0.25x^3-2.25x^2+5x) + (-2x^3+12x^2-10x) + (1.95x^3-9.75x^2+7.8x)`

`f(x) = 2x^2-3x+4 `

Now, differentiate with x
`f'(x)=4x-3`

`f''(x)=4`

Now, substitute `x=2`

`f'(2)=4 xx 2-3=5`

`f''(2)=4=4`


This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here



1. Formula & Example-1
(Previous example)
5. Stirling's formula
(Next method)





Share this solution or page with your friends.


 
Copyright © 2024. All rights reserved. Terms, Privacy
 
 

.