We have 4 points, so the Lagrange polynomial will be of degree 3. The basic Lagrange polynomials are:
L0(x)=(1−1.5)(1−2)(1−2.5)(x−1.5)(x−2)(x−2.5)
L1(x)=(1.5−1)(1.5−2)(1.5−2.5)(x−1)(x−2)(x−2.5)
L2(x)=(2−1)(2−1.5)(2−2.5)(x−1)(x−1.5)(x−2.5)
L3(x)=(2.5−1)(2.5−1.5)(2.5−2)(x−1)(x−1.5)(x−2)
P(x)=5L0(x)+11L1(x)+19L2(x)+29L3(x)
P(x)=−320(x−1.5)(x−2)(x−2.5)
+44(x−1)(x−2)(x−2.5)
−76(x−1)(x−1.5)(x−2.5)
+3116(x−1)(x−1.5)(x−2)
=−320x3+40x2−3235x+50
+44x3−242x2+418x−220
−76x3+380x2−589x+282
3116x3−40x2+174x−116The approximation for the pth derivative of some function can be found by taking the pth derivative of a polynomial approximation of the function
.
P′(x)=276x−3226
P′′(x)=276
Comments
Leave a comment