Using Lagrange’s formula, find the values of
(i) y5 if y1 = 4, y3 = 120, y4 = 340, y5 = 2544
(ii) y0 if y–30 = 30, y–12 = 34, y3 = 38, y18 = 42.
(i) y5 if y1 = 4, y3 = 120, y4 = 340, y5 = 2544
Answer y5=2544
y5 if y1 = 4, y3 = 120, y4 = 340, y6 = 2544
Here the intervals are unequal.
By Lagrange’s interpolation formula we have
"y=f(x)=\\dfrac{(x-x_1)(x-x_2)(x-x_3)}{(x_0-x_1)(x_0-x_2)(x_0-x_3)}\\times y_0""+\\dfrac{(x-x_0)(x-x_2)(x-x_3)}{(x_1-x_0)(x_1-x_2)(x_1-x_3)}\\times y_1"
"+\\dfrac{(x-x_0)(x-x_1)(x-x_3)}{(x_2-x_0)(x_2-x_1)(x_2-x_3)}\\times y_2"
"+\\dfrac{(x-x_0)(x-x_1)(x-x_2)}{(x_3-x_0)(x_3-x_1)(x_3-x_2)}\\times y_3"
Put "x=5"
"f(5)=\\dfrac{(5-3)(5-4)(5-6)}{(1-3)(1-4)(1-6)}\\times 4""+\\dfrac{(5-1)(5-4)(5-6)}{(3-1)(3-4)(3-6)}\\times 120""+\\dfrac{(5-1)(5-3)(5-6)}{(4-1)(4-3)(4-6)}\\times 340"
"+\\dfrac{(5-1)(5-3)(5-4)}{(6-1)(6-3)(6-4)}\\times 2544"
"=1052"
"y5=1052"
(ii)
Here the intervals are unequal.
By Lagrange’s interpolation formula we have
"y=f(x)=\\dfrac{(x-x_1)(x-x_2)(x-x_3)}{(x_0-x_1)(x_0-x_2)(x_0-x_3)}\\times y_0""+\\dfrac{(x-x_0)(x-x_2)(x-x_3)}{(x_1-x_0)(x_1-x_2)(x_1-x_3)}\\times y_1"
"+\\dfrac{(x-x_0)(x-x_1)(x-x_3)}{(x_2-x_0)(x_2-x_1)(x_2-x_3)}\\times y_2"
"+\\dfrac{(x-x_0)(x-x_1)(x-x_2)}{(x_3-x_0)(x_3-x_1)(x_3-x_2)}\\times y_3"
Put "x=0"
"f(0)=\\dfrac{(0+12)(0-3)(0-18)}{(-30+12)(-30-3)(-30-18)}\\times 30""+\\dfrac{(0+30)(0-3)(0-18)}{(-12+30)(-12-3)(-12-18)}\\times 34"
"+\\dfrac{(0+30)(0+12)(0-18)}{(3+30)(3+12)(3-18)}\\times 38"
"+\\dfrac{(0+30)(0+12)(0-3)}{(18+30)(18+12)(18-3)}\\times 42"
"=\\dfrac{409}{11}"
"y_0=\\dfrac{409}{11}"
Comments
Leave a comment