Professional Documents
Culture Documents
Unit IN T E R PO LA T iO N A ND
P O LYNO M iA L APPR O X iM A T iON
v Divided differences
v Hermite Interpolation
Part-A
Short Questions with Solutions
Q1. Let f(x) = ex (0 ≤ x ≤ 2), approximate f(0.25) using linear interpolation with x0 = 0 and x1 = 0.5.
Answer : Model Paper-1, Q3
⇒ L0(x) = x––00.5.5
x–x
L1(x) = x – x0
1 0
x–0
= 0.5 – 0
⇒ L1(x) = 0x.5
f(x0) = f(0) = e0 = 1
⇒ P1(x) = 1.2974424x + 1
P1(0.25) = 1.297442(0.25) + 1
⇒ P1(0.25) = 1.32436
P1(0.25) is an approximation of f(0.25).
= 0x.5––11
⇒ L0(x) = –x 0–.15
x–x
L1(x) = x – x0
1 0
= 1x –– 00..55
⇒ L1(x) = x 0–.50.5
⇒ P1(0.75) = 2.1835
P1(0.75) is an approximation of f(0.75).
(x – 1) (x – 2)
= (0 – 1) (0 – 2)
( x – 1 ) ( x – 2)
⇒ L0(x) = 2
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 89
Mathematics Paper-VII Numerical Analysis
(x – x ) (x – x )
L1(x) = (x – x0) (x – x2 )
1 0 1 2
(x – 0) (x – 2)
= (1 – 0) (1 – 2)
x (x – 2)
⇒ L1(x) = –1
(x – x ) (x – x )
L2(x) = (x – x0) (x – x1 )
2 0 2 1
( x – 0) ( x – 1 )
= (2 – 0) (2 – 1)
x ( x – 1)
⇒ L2(x) = 2
Substituting the corresponding values in equation (1),
(x – 1) (x – 2) x (x – 2) x ( x – 1)
P2(x) = 2 (1) + –1 (2.718281) + 2 (7.38905)
Given,
f(1) = 0.6931, f(1.3) = 0.7885
From Neville’s method, Q1,1 is given as,
(x – x0) Q1,0 – (x – x1) Q0,0
Q1,1(x) = x1 – x0
Here,
x0 = 1, x1 = 1.3
Q0,0 = 0.6931 and Q1,0 = 0.7885.
(1.5 – 1) (0.7885) – (1.5 – 1.3) (0.6931)
⇒ Q1,1 (1.5) = 1.3 – 1
(0.5) (0.7885) – (0.2) (0.6931)
= 0.3
= 0.8521
Given that,
P0, 1(x) = x + 1
P1, 2(x) = 3x – 1
P1, 2, 3(1.5) = 4
For xj = j, j = 0,1 , 2, 3
x0 = 0, x1 = 1, x2 = 2, x3 = 3.
P0, 1(1.5) = 1.5 + 1 ⇒ P0, 1(1.5) = 2.5
P1, 2(1.5) = 3(1.5) – 1 ⇒ P1, 2(1.5) = 3.5
(x – x0) P1, 2 (x) – (x – x2) P0, 1 (x)
P0, 1, 2(x) = x2 – x0
x f(x)
– 0.1 5.30000
0.0 2.00000
0.2 3.19000
0.3 1.00000
Given,
= 2.00000 – 5.30000
0.0 + 0.1
f [x0, x1] = – 33
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 91
Mathematics Paper-VII Numerical Analysis
The remaining first divided differences can be calculated as shown in the table.
x f(x) First divided difference Second divided difference Third divided difference
– 0.1 5,30000
f(x0, x1)
– 33 f(x0, x1, x2)
0.0 2.00000 129.8333
f(x1, x2) f(x0, x1, x2, x3)
5.95 –556.6665
f(x0, x1, x2, x3)
0.2 3.19000 –92.8333
f(x2, x3)
– 21.9
0.3 1.00000
Table
The second divided difference corresponding to x0, x1, x2 is given as,
f [x1, x2] – f [x0, x1]
f [x0, x1, x2] = x2 – x0
5.95 – (–33)
= 0.2 + 0.1
= 129.8333
f [x2, x3] – f [x1, x2]
f [x1, x2, x3] =
x3 – x1
= –21 .9 – 5.95
0.8 – 0.0 = – 92.8333
The third divided difference can be calculated as,
f [x1, x2, x3] – f [x0, x1, x2]
f [x0, x1, x2, x3] =
x3 – x0
= – 92.8333 – 129.8333
0.3 + 0.1
f [x0, x1, x2, x3] = – 556.6665.
According to Newton’s divided difference formula,
n
⇒ p3(x) = f [x0] + f[x0, x1] (x – x0) + f[x0, x1, x2] (x – x0) (x – x1) + f[x0, x1, x2, x3] (x – x0) (x – x1) (x – x2) ... (1)
Substituting the corresponding values in equation (1),
p3(x) = 5.30000 + (– 33) (x – (– 0.1)) + 129.833 (x – (– 0.1)) (x – 0) – 556.66 (x – (– 0.1)) (x – 0) (x – 0.2)
= 5.3 – 33(x + 0.1) + 129.833(x + 0.1) (x) – 556.66 (x + 0.1) (x) (x – 0.2)
\ p3(x) = 5.3 – 33(x + 0.1) + 129.833(x) (x + 0.1) – 556.66 (x) (x + 0.1) (x – 0.2).
Q7. Use Newton’s forward difference formula to construct intepolating polynomial of degree one, two and
J –1 N
three for the following data. Approximate the specified value using each of the polynomials f KK 3 OO if
f(– 0.75) = – 0.07181250, f(– 0.5) = – 0.02475000, f(– 0.25) = 0.33493750, f(0) = 1.10100000. L P
Answer :
Given that,
x0 = – 0.75, x1 = – 0.5, x2 = – 0.25, x3 = 0
f(x0) = – 0.07181250, f(x1) = – 0.02475000, f(x2) = 0.33493750, f(x3) = 1.10100000
And h = 0.25
92 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
According to Newton’s forward difference formula,
First divided difference corresponding to x0, x1 is,
= Df(x0) = 1h [f(x0) – f(x0)]
x f(x) First divided difference Second divided difference Third divided difference
– 0.75 – 0.07181250
Df(x0)
1.18825
D2f(x0)
– 0.5 – 0.02475000 1.002
Df(x1) D3f(x0)
1.43875 22
D2f(x1)
– 0.25 0.33493750 6.502
Df(x2)
3.06425
0.0 1.10100000
Table
Second divided difference corresponding to x0, x1, x2 is,
D2f(x0) = 1h [Df(x1) – Df(x0)]
3.06425 ∇ f(xn)
2
∇f(xn)
0 1.10100000
Table
94 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
The second divided difference corresponding to xn, xn–1, xn–2 is,
4 f (xn) – 4 f (xn – 1)
∇2 f(xn) = h
= 3.064250.–251.43875
⇒ ∇2 f(xn) = 6.502
The remaining second divided differences are shown in the table, which are calculated in the same manner.
The third divided difference corresponding to xn, xn–1, xn–2, xn–3 is given as,
4 2 f (xn) – 4 2 f (xn–1)
∇3 f(xn) = h
= 6.5020.–255.002
\ ∇3 f(xn) = 6.
According to Newton’s backward difference formula,
The interpolating polynomial of degree one is given as,
P1(x) = f(xn) + hs ∇ f(xn) ... (1)
Where,
–1
s =
x – xn
= 3 –0 = –4
h 0.25 3
s (s + 1) (s + 2)
⇒ P3(x) = P2(x) + (0.25)3 (6) 6
Substituting the corresponding values in equation (3),
J N J N J NJ N J N
P3 KK –34 OO = P2 KK –34 OO + (0.25)3 KK –34 OO KK –34 + 1OO KK –34 + 2OO
L P L P L PL P L P
= 0.1698889 + 0.00462962
J N
⇒ f KK –31 OO = 0.1745185
L P
x f(x) f'(x)
0 1.00000 2.00000
0.5 2.71828 5.43656
(b) Using the polynomial constructed in (a), approximate f(0.43) and calculate the absolute error for
the function f(x) = e2x.
Answer :
Given data is,
x f(x) f ' (x)
0 1.00000 2.00000
0.5 2.71828 5.43656
The values are,
x0 = z0 = z1 = 0; x1 = z2 = z3 = 0.5
f(x0) = Q0,0 = Q1,0 = 1.00000
f(x1) = Q2,0 = Q3,0 = 2.71828
f '(x0) = Q1,1 = 2.00000
f '(x1) = Q3,1 = 5.43656
Q2,0 – Q1,0 2.71828 – 1.00000
Q2,1 = z2 – z1 = 0.5 – 0 = 3.43656
Q2,1 – Q1,1 3.43656 – 2.00000
Q2,2 = z2 – z0 = 0.5 – 0 = 2.87312
Q3,1 – Q2,1 5.43656 – 3.43656
Q3,2 = z3 – z1 = 0.5 – 0 =4
Q3,2 – Q2,2 4 – 2.87312
Q3,3 = z3 – z0 = 0.5 – 0 = 2.25376
z
z0 = 0 1.00000
2.00000
z1 = 0 1.00000 2.87312
3.43656 2.25376
z2 = 0.5 2.71828 4.00000
5.43656
z3 = 05 2.71828
The approximation of Hermite interpolating polynomial is given as,
x f(x) f'(x)
x0 = 1 f(x0) = 0.765789 f'(x0) = 1.531579
x1 = 1.05 f(x1) = 0.835431 f'(x1) = 1.242214
Table
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 97
Mathematics Paper-VII Numerical Analysis
According to Hermite method,
z0 = z1 = x0 = 1
z2 = z3 = x1 = 1.05
Q0,0 = f(x0) = 0.765789
Q1,0 = f(x0) = 0.765789
Q2,0 = f(x1) = 0.835431
Q3,0 = f(x1) = 0.835431
Q1,1 = f'(x0) = 1.531579
Q3,1 = f'(x1) = 1.242214
And
Qi,j – 1 – Qi – 1, j – 1
Qi,j = zi – zi – j
Q2,0 – Q1,0 0.835431 – 0.765789
Q2,1 = z2 – z1 = 1.05 – 1 = 1.39284
Q2,1 – Q1,1 1.39284 – 1.531579
Q2,2 = z2 – z0 = 1.05 – 1 = – 2.77478
Q3,1 – Q2,1 1.242214 – 1.39284
Q3,2 = z3 – z1 = 1.05 – 1 = – 3.01252
Q3,2 – Q2,2 – 3.01252 – (– 2.77478)
Q3,3 = z3 – z0 = 1.05 – 1 = – 4.7548
x f(x)
8.3 17.56492
8.6 18.50515
Answer :
Given,
x0 = 8.3, x1 = 8.6
f(x0) = 17.56492, f(x1) = 18.50515.
Let s(x) be a cubic polynomial and it is denoted by sj(x).
The equation for the natural cubic spline is,
sj(x) = aj + bj(x – xj) + cj(x – xj)2 + dj(x – xj)3 ... (1)
For j = 0
S0(x) = a0 + b0(x – x0) + c0(x – x0)2 + d0(x – x0)3
⇒ S0(x) = a0 + b0(x – 8.3) + c0(x – 8.3)2 + d0(x – 8.3)3 ... (2)
98 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
For n = 1
hi = xi + 1 – xj
Where,
i = 0, 1, 2 - - - -
⇒ h0 = x0 + 1 – x0
⇒ h0 = x 1 – x0
⇒ h0 = 8.6 – 8.3
\ h0 = 0.3
The vector equation is given as,
Ax = b
Where,
A is the matrix of (n + 1) × (n + 1)
b, x are vectors.
SR1 0WV
A = SSS WWW
0 1
T X2× 2
SR1 0WV
A = SSS WWW
0 1
T X
b = [0]
x = [c0]
RS1 0VW
SSS WWW [c0] = [0]
0 1
T X
⇒ c0 = 0
h
b0 = h1 (a1 – a0) – 30 (c1 + 2c0 )
0
= 3 (01.3) (– 0)
\ d0 = 0
Substituting the corresponding values in equation (2),
S0(x) = 17.56492 + 3.1341(x – 8.3) + 0.00000 (x – 8.3)2 + 0.00000 (x – 8.3)3
\ S0(x) = 17.56492 + 3.1341(x – 8.3).
Q12. Construct the clamped cubic spline for the following data.
x f(x) f'(x)
8.3 17.56492 3.116256
8.6 18.50515 3.151762
Answer :
Given data,
x0 = 8.3, f(x0) = 17.56492, x1 = 8.6, f(x1) = 18.50515.
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 99
Mathematics Paper-VII Numerical Analysis
Cubic spline polynomial is given as,
S0(x) = a0 + b0(x – x0) + c0(x – x0)2 + d0(x – x0)3
S0(x) = a0 + b0(x – 8.3) + c0(x – 8.3)2 + d0(x – 8.3)2 ... (1)
The cubic spline must agree with the data at nodes,
(i) S(8.3) = f(8.3)
Substituting x = 8.3 in equation (1),
a0 + 0 + 0 + 0 = 17.56492
\ a0 = 17.56492 ... (2)
(ii) S(8.6) = f(8.6)
Substituting x = 8.6 in equation (1),
a0 + b0(8.6 – 8.3) + c0(8.6 – 8.3)2 + d0(8.6 – 8.3)3 = 18.50515
⇒ a0 + 0.3b0 + 0.09 c0 + 0.027 d0 = 18.50515
⇒ 17.56492 + 0.3b0 + 0.09 c0 + 0.027 d0 = 18.50515
\ 0.3b0 + 0.09 c0 + 0.027 d0 = 0.940230 ... (3)
Clamped Boundary Conditions
(ii) S'(x0) = f'(x0), (iv) S'(xn) = f'(xn)
(iii) S'(x0) = f'(x0)
S'(8.3) = f'(8.3)
S'(x) = b0 + 2 c0 (x – 8.3) + 3d0(x – 8.3)2
⇒ S'(8.3) = b0 + 2 c0 (0) + 3d0(0)
⇒ S'(8.3) = b0 = f ' (8.3)
\ b0 = 3.116256 ... (4)
(iv) S'(xn) = f'(xn)
⇒ S'(x1) = f'(x1)
⇒ S'(x) = b0 + 2 c0 (x – 8.3) + 3d0(x – 8.3)2
⇒ S'(8.6) = b0 + 2 c0 (8.6 – 8.3) + 3d0(8.6 – 8.3)2
\ S'(8.6) = b0 + 0.6 c0 + 0.27 d0
\ b0 + 0.6 c0 + 0.27 d0 = 3.151762 ... (5)
From equations (3) and (5),
0.3(3.116256) + 0.09 c0 + 0.027 d0 = 0.940230 ... (6)
3.116256 + 0.6 c0 + 0.27 d0 = 3.151762 ... (7)
Solving equations (6) and (7),
c0 = 0.06008666
d0 = – 0.00202222
Substituting the corresponding values in equation (1),
S0(x) = 17.56492 + 3.116256 (x – 8.3) + 0.06008666(x – 8.3)2 – 0.0020222 (x – 8.3)3
Part-b
Essay Questions with Solutions
= / f (x ) L
k n, k (x)
k =0
Where,
k = 0, 1, 2, 3 ........ n.
(x – x ) (x – x ) ........ (x – x ) ...... (x – x )
Ln,k(x) = (x – x 0) (x – x1 ) ....... (x – xk + 1 ) ...... (x – xn )
1 0 k 1 k k+1 k n
n (x – x )
\ Ln,k(x) = p (x – xi )
i=0 k i
i!k
Q14. For the given functions f(x), let x0 = 0, x1 = 0.6, x2 = 0.9. Construct interpolation polynomials of degree
at most one and at most two to approximate f(0.45), and find absolute error.
(a) f(x) = 1+x
(b) f(x) = tanx
Answer : Model Paper-1, Q10(a)
x0 = 0, x1 = 0.6, x2 = 0.9
f(x0) = 1 + 0 = 1
x–x
L0(x) = x – x1 = 0x –– 00..66
0 1
L0(x) = 0.60.–6 x
x–x
L1(x) = x – x0
1 0
= 0x.6––00
= 0x.6
P1(0.45) = 0.441518(0.45) + 1
\ P1(0.45) = 1.1986831
(x – 0.6) (x – 0.9)
= 0.54
(x – x ) (x – x )
L1(x) = (x – x0) (x – x2 )
1 0 1 2
(x – 0) (x – 0.9)
= (0.6 – 0) (0.6 – 0.9)
x (x – 0.9)
L1(x) = – 0.18
(x – x0) (x – x1)
L2(x) = (x – x ) (x – x )
2 0 2 1
(x – 0) (x – 0.6)
= (0.9 – 0) (0.9 – 0.6)
x (x – 0.6)
L2(x) = 0.27
Substituting the corresponding values in equation (2),
(x – 0.6) (x – 0.9) x (x – 0.9) x (x – 0.6)
P2(x) = 0.54 (1) + – 0.18 (1.264911) + 0.27 (1.378404)
= 1.85185 [x2 – 1.5x + 0.54] – 7.027283 [x2 – 0.9x] + 5.1052000 [x2 – 0.6x]
= x2 [1.85185 – 7.027283 + 5.1052000 ] – x[– 2.77777 + 6.3245547 – 3.0631200] + 1
P2(x) = – 0.070233 x2 + 0.4836647x + 1
P2(0.45) = – 0.070233 (0.45)2 + 0.4836647 (0.45) + 1
P2(0.45) = 1.2034269
Absolute error is given as,
|f(0.45) – P2(0.45)| = |1.204153 – 1.2034269| = 0.0007261.
\ Absolute error = 0.0007261.
102 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
(b) f(x) = tan x
Given function is,
f(x) = tan x
x0 = 0, x1 = 0.6, x2 = 0.9
f(x0) = f(0) = tan 0 = 0
f(x1) = f(0.6) = tan (0.6) = 0.6841368
f(x2) = f(0.9) = tan (0.9) = 1.2601582
The interpolating polynomial of degree at most 1 is given as,
= 0x –– 00..66
⇒ L0(x) = 0.60.–6 x
x–x
L1(x) = x – x0
1 0
x–0
= 0.6 – 0
⇒ L1(x) = 0x.6
= 1.1402280 x
\ P1(x) = 1.1402280 x
= |0.4830551 – 0.5131026|
= 0.0300475.
The interpolating polynomial of degree atmost two is given as,
P2(x) = L0(x) f(x0) + L1(x) f(x1) + L2(x) f(x2) ... (2)
(x – x ) (x – x ) (x – 0.6) (x – 0.9)
L0(x) = (x – x1) (x – x2 ) = (0 – 0.6) (0 – 0.9)
0 1 0 2
(x – 0.6) (x – 0.9)
= 0.54
(x – x ) (x – x ) (x – 0) (x – 0.9)
L1(x) = (x – x0) (x – x2 ) = (0.6 – 0) (0.6 – 0.9)
1 0 1 2
x (x – 0.9)
= – 0.18
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 103
Mathematics Paper-VII Numerical Analysis
(x – x ) (x – x )
L2(x) = (x – x0) (x – x1 )
2 0 2 1
(x – 0) (x – 0.6)
= (0.9 – 0) (0.9 – 0.6)
x (x – 0.6)
= 0.27
Substituting the corresponding values in equation (2),
(x – 0.6) (x – 0.9) x (x – 0.9) x (x – 0.6)
P2(x) = 0.54 (0) + – 0.18 (0.6841368) + 0.27 (1.2601582)
= 0 – 3.8007600 x (x – 0.9) + 4.6672526 x (x – 0.6)
= – 3.8007600 x2 + 3.4206840 x + 4.6672526 x2 – 2.8003516x
= 0.8664926 x2 + 0.6203324 x
\ P2(x) = 0.8664926 x2 + 0.6203324 x
P2(0.45) = 0.8664926 (0.45)2 + 0.6203324 (0.45)
= 0.4546143
f (0.45) = tan(0.45) = 0.4830551
Absolute error = |f(0.45) – P2(0.45)|
= |0.4830551 – 0.4546143|
= |0.0284408|
\ Absolute error = 0.0284408
Q15. For the given functions f(x), let x0 = 1, x1 = 1.25, x2 = 1.6. Construct interpolation polynomials of degree
at most one and at most two to approximate f(1.4), and find absolute error, error bound.
(a) f(x) = e2x – x.
(b) f(x) = 3
x–1
Answer :
(a) f(x) = e2x – x
Given function is,
f(x) = e2x – x ... (1)
And
x0 = 1, x1 = 1.25, x2 = 1.6
f(x0) = f(1) = e2(1) –1 = 6.389056
f(x1) = f(1.25) = e2(1.25) –1 = 2.4903429
f(x2) = f(1.6) = e(1.6) –1 = 3.9530324
The interpolating polynomial of degree one is given as,
P1(x) = L0(x) f(x0) + f(x1) L1 (x) ... (2)
x–x
L0(x) = x – x1
0 1
= 1x –– 11..25
25
= x––01.25
.25
x–x
L1(x) = x – x0
1 0
= 1.x25– –1 1 = 0x.25
–1
(x – 1.25) (x – 1.6)
⇒ L0(x) = 0.15
(x – x ) (x – x )
L1(x) = (x – x0) (x – x2 )
1 0 1 2
(x – 1) (x – 1.6) (x – 1) (x – 1.6)
= (1.25 – 1) (1.25 – 1.6) = (0.25) (– 0.35)
(x – 1) (x – 1.6)
⇒ L1(x) = – 0.0875
(x – x ) (x – x )
L2(x) = (x – x0) (x – x1 )
2 0 2 1
(x – 1) (x – 1.25) (x – 1) (x – 1.25)
= (1.6 – 1) (1.6 – 1.25) = (0.6) (0.35)
(x – 1) (x – 1.25)
⇒ L2(x) = 0.21
Substituting the corresponding values in equation (3),
RS (x – 1.25) (x – 1.6) VW RS (x – 1) (x – 1.6) VW RS (x – 1) (x – 1.25) VW
P2(x) = 6.389056 SS 0.15
WW + 2.4903429 SS W
– 0.0875 W + 3.9530324
SS
0.21
WW
T X T X T X
= 42.593706 [x2 – 2.85 x + 2] – 28.46106 [x2 – 2.6 x + 1.6] + 18.82396 [x2 – 2.25 x + 1.25]
= x2 [42.593706 – 28.46106 + 18.82396] + x[ – 121.39206 + 73.99875 – 42.35391]
+ 85.187412 – 45.537696 + 23.52995
P2(x) = 32.956606 x2 – 89.74722 x + 63.179666
⇒ P2(1.4) = 32.956606(1.4)2 – 89.74722(1.4) + 63.179666
= 2.12850576
Absolute error is given as,
|f(1.4) – P2(1.4)| = |15.0446467 – 2.12850576|
= 12.91614094.
The error bound formula of degree 1 is given as,
| f 2 (x (x)) |
Error bound = 2! |(x – x0) (x – x1)| ... (4)
f'(x) = 2e2x – 1.
f2(x) = f''(x) = 4e2x
⇒ f 2(ξ(x)) = 4e2(ξ(x))
As (ξ(x)) is strictly increasing on [1, 1.25].
⇒ Max |f 2(ξ(x))|(1,1.25) = Max |4 e2(ξ(x))|(1,1.25)
= Max [|4 e2(1)|, |4 e2(1.25)|]
= Max [29,556224, 48.729975]
= 48.729975
ξ(x) = 1.25
Substituting the corresponding values in equation (4),
2 (1.25)
Error bound = 4e 2! |(1.4 – 1) (1.4 – 1.25)|
^48.729975h
= | 2 (1.4 – 1) (1.4 – 1.25)|
= 1.4689925.
The error bound formula of degree 2 is given as,
f 3 (x (x))
Error bound = 3! (x – x0) (x – x1) (x – x2) ... (5)
f(x) = e2x – x
f'(x) = 2e2x – 1
f''(x) = 4e2x
f'''(x) = 8e2x
⇒ f 3(ξ(x)) = 8e2(ξ(x))
As (ξ(x)) is strictly increasing function on [1, 1.6].
⇒ ξ(x) = 1.6
Substituting the corresponding values in equation (5),
2 (1.6)
Error bound = 8e3! (x – 1) (x – 1.25) (x – 1.6)
At x = 1.4.
\ Error bound = 34 e3.2 (1.4 – 1) (1.4 – 1.25) (1.4 – 1.6)
= 0.3925204.
(b) f(x) = 3
x–1
Given function is,
f(x) = 3
x –1
= (x – 1)1/3 ... (1)
x0 = 1, x1 = 1.25, x2 = 1.6
f(x0) = f(1) = (1 – 1)1/3 = 0
f(x1) = f(1.25) = (1.25 –1)1/3 = 0.6299605
f(x2) = f(1.6) = (1.6 –1)1/3 = 0.8434326
106 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
The interpolating polynomial of degree one is given as,
f(1.4) = 3
1.4 – 1 = 0.7368063
= 0.2711305
(x – 1) (x – 1.6)
= (1.25 – 1) (1.25 – 1.6)
(x – 1) (x – 1.6)
⇒ L1(x) = – 0.0875
(x – x ) (x – x )
L2(x) = (x – x0) (x – x1 )
2 0 2 1
(x – 1) (x – 1.25)
= (1.6 – 1) (1.6 – 1.25)
(x – 1) (x – 1.25)
⇒ L2(x) = 0.21
Substituting the corresponding values in equation (3),
SR (x – 1) (x – 1.6) WV R V
SSS (x – 1) (x – 1.25) WWW
P2(x) = 0 + 0.6299605 SS – 0.0875 WW + 0.8434326 0.21
T X T X
= – 7.199548[(x – 1) (x – 1.6)] + 4.0163457 [(x – 1) (x – 1.25)]
= – 7.199548[x2 – 2.6x + 1.6] + 4.0163457 [x2 – 2.25x + 1.25]
= x2[– 7.199548 + 4.0163457] + x[18.7188248 – 9.0367778] – 11.5192768 + 5.0204321
P2(x) = – 3.1832023 x2 + 9.682047x – 6.4988447.
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 107
Mathematics Paper-VII Numerical Analysis
P2(1.4) = – 3.1832023(1.4) + 9.682047(1.4) – 6.4988447.
2
= 0.816944592.
= 0.0801383
Error Bound
The error bound formula of degree 1 is given as,
f 2 (x (x))
Error bound = 2! (x – x0) (x – x1) ... (4)
f(x) = (x – 1)1/3
f'(x) = 13 (x – 1)–2/3
f'(x) = 13 (x – 1)–2/3
f '''(x) = 10
27 (x –1)
–8/3
f '''(ξ(x)) = 10
27 (ξ(x) –1)
–8/3
⇒ Max [| 10
27 (ξ(x) –1) |]
–8/3
⇒ Max [| 10 –8/3 10
27 (1 –1) |, | 27 (1.6 –1) |] = Max [0, 1.44621]
–8/3
\ ξ(x) = 1.6
Substituting the corresponding values in equation (5),
10
27 (1.6 – 1) –8/3
= 3! (x – 1) (x – 1.25) (x – 1.6)
= |0.2410358 (1.4 – 1) (1.4 – 1.25) (1.4 – 1.6)|
\ Error bound = 0.00289243.
Q16. Use the following values and four digit rounding arithmetic to construct a third Lagrange polynomial
approximation to f(1.09) and the function being approximated as f(x) = log10(tanx). Find the bound for
the error in the approximation.
f(1.00) = 0.1924, f(1.05) = 0.2414, f(1.10) = 0.2933, f(1.15) = 0.3492
Answer :
Given data is,
f(1.00) = 0.1924; f(1.05) = 0.2414
f(1.10) = 0.2933; f(1.15) = 0.3492
The interpolating polynomial of degree 3 is given as,
P3(x) = L0(x) f(x0) + L1(x)f(x1) + L2(x) f(x2) + L3(x)f(x3) ... (1)
(x – x ) (x – x ) ( x – x )
L0(x) = (x – x 1) (x – x2 ) (x – 3x )
0 1 0 2 0 3
= – 256.5333333 (x3 – 3.3x2+3.6275 x – 1.3283) + 965.6000 (x3 – 3.25x2 + 3.5150 x – 1.2650) – 1173.2000 (x3 – 3.2x2
+ 3.4075x – 1.2075) + 465.60 (x3 – 3.15 x2 + 3.3050 x – 1.1550)
= – 256.5333333 x3 + 846.5599999 x2 + 930.5746665 x + 340.7532266 + 965.60x3 – 3138.20 x2 + 3394.0840 x –
1221.4840 – 1173.2x3 + 3754.24x2 –3997.6790 x+1416.6390+465.60 x3 – 1466.64 x2 + 1538.8080 x – 537.7680
= 1.4667 x3 – 4.0400 x2 + 4.6383 x – 1.8598.
\ P3(x) = 1.4667 x3 – 4.04 x2 + 4.6383 x – 1.8598
P3(1.09) = 1.4667 (1.09)3 – 4.04 (1.09)2 + 4.6383(1.09) – 1.8598
⇒ P3(1.09) = 0.2954
f(1.09) = log10 (tan(1.09)) = 0.2826
Actual eror = |P(1.09) – f(1.09)|
= |0.2954 – 0.2826|
= |0.0128|
= 0.0128
Error Bound
The error bound formula of degree 3 is given as,
f 4 (x (x))
Error bound = 4! (x – x0) (x – x1) (x – x2) (x – x3) ... (2)
f(x) = log10 (tanx)
ln (tan x)
f(x) = ln 10
2
⇒ f'(x) = ln110 sec
tan x
x
Jd N Jd N
1 tan x KK dx (sec 2 x)OO – sec 2 x KK dx (tan x)OO
f''(x) = ln 10 L P L P
tan 2 x
RS 2 V
SS tan x.2 sec x (sec x. tan x) – sec x. sec x WWW
2
= ln110 S W
tan 2 x
T X
SRS 2 sec 2 x tan 2 x – sec 4 x WVW
= ln110 SS WW
tan 2 x
T X
SRS sec 4 x WV
= ln110 SS2 sec x – tan 2 x WWW
2
T X
SRS d d JK sec 4 x NOWV
f'''(x) = ln110 SS2. dx (sec x) – dx KK tan 2 x OOWWW
2
T L PX
RS RS VV
SS SS tan 2 x. d (sec 4 x) – sec 4 x d (tan 2 x) WWWWWW
= ln110 SS2 (2 sec x) . sec x tan x – SS
S S
dx dx WWWW
WW
(tan 2 x) 2
T T XX
110 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
SRS SR tan 2 x (4 sec3 x) . sec x tan x – sec 4 x (2 tan x) . sec 2 x WVWWVW
= ln110 SS4 sec 2 x tan x – SSS WWWW
tan 4 x
T T XX
SRS SRS 4 tan3 sec 4 x –2 tan x sec6 x WVWWVW
= ln110 SS4 sec x tan x – SS
2
WWWW
tan 4 x
T T XX
RS 4 6 V W
= ln110 SS4 sec 2 x tan x –
S
4 sec x 2
tan x + tan3 x WW
sec x W
T X
RS d RS sec 4 x VW RS sec6 x VWVW
fIV(x) = ln110 SS4. (sec x tan x) – 4. SS
S dx
2 d W S
dx T tan x WX + 2 SS tan3 x WWWW
WW
T T XX
SRS SRS d d WV
SS tan x. dx (sec x) – sec x. dx (tan x) WWW
4 4
SS RS 2 .d V
W
= ln110 SS4. SSsec x dx (tan x) + tan x. dx (sec x)WW – 4 SS
d 2
WW + 2
T X (tan x) 2
T T X
SRS 3 d d 3 W
VWV
SS tan x. dx (sec x) – sec x. dx (tan x) WWWWWW
6 6
SS WWWW
(tan3 x) 2
T XX
RS R x – sec 4 x. sec 2 x VWW +
SS4. 6sec 2 x. sec 2 x + tan x.2 sec x. sec x tan x@ – 4 SSS tan x.4 sec x. sec x tan
3
= ln110 S S WW 2
tan 2 x
T T X
SRS tan3 x.6 sec5 x. sec x tan x – sec6 x.3 tan 2 x. sec 2 x WVWWVW
SS WWWW
tan6 x
T XX
SRS R 4 sec 4 x tan 2 x – sec6 x WV SR 6 sec6 x tan 4 x – 3 tan 2 x sec8 x WVWV
SS4. 6sec x + 2 sec x tan x@ – 4 SSS
S
= ln110 4 2 2 WW + 2 SS
W S
WWWW
WW
tan 2 x tan6 x
T T X T XX
RS 4 2 6 6 4 2 8 VW
= ln110 SS4 sec 4 x + 8 sec 2 x tan 2 x –
S
16 sec x tan x +
4 sec x +
12 sec x tan x
–
6 tan x sec x WW
W
tan 2 x tan 2 x tan6 x tan6 x
T X
RS 6 6 8 V W
= ln110 SS4 sec x + 8 sec x tan x – 16 sec x +
4 2 2 4 4 sec x + 12 sec x
–
6 sec x W
S tan 2 x tan 2 x tan 4 x WW
T X
RS 6
x 6 sec x WW 8 V
= ln110 SS8 sec 2 x tan 2 x – 12 sec 4 x + 16 sec –
S tan 2 x tan 4 x WW
T X
RS 8 2 2
cos 4 x VWW
= ln110 SS 2 . sin x 12 16 cos
S cos x cos 2 x – cos 4 x + cos 4 x . sin 2 x – cos 4 x . sin 4 x WW
x 6
T X
RS 8 sin 2 x VW
= ln110 SS 12 16
S cos 2 x – cos 4 x + cos 4 x sin 2 x – cos 4 x sin 4 x WW
6 W
T X
SRS 1 SRS 6 WVWV
= ln110 16
SS cos 4 x SS8 sin x – 12 + sin 2 x – sin 4 x WWWWWW
2
T T XX
R
SS VW
f 4(ξ(x)) = ln110 1
S8 sin 2
( x ( x )) – 12 + 16
–
6 W
cos (x (x)) S 4
sin (x (x)) sin (x (x)) WW
2 4
T X
= 81.50829256
Substituting the corresponding values in equation (2),
Error bound = 81.50829256
24 (1.09 – 1.00) (1.09 – 1.05) (1.09 – 1.10) (1.09 – 1.15)
= 3.396178857 |0.000002160|
= 0.000007336
\ Error bound = 0.000007336
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 111
Mathematics Paper-VII Numerical Analysis
Q17. (a) Approximate the value of f(0.43) using the Lagrang's interpolating polynomials of degree one, two
and three if f(0) = 1, f(0.25) = 1.64872, f(0.5) = 2.71828, f(0.75) = 4.48169.
(b) Also find the error bound for the function f(x) = e2x and compare the bound to the actual error for
the cases n = 1, n = 2.
Answer :
Given data is,
f(0) = 1,
f(0.25) = 1.64872,
f(0.5) = 2.71828
f(0.75) = 4.48169
The interpolating polynomial of degree 1 is given as,
= 0x –– 00..25
25
⇒ L0(x) = x––00.25
.25
x–x
L1(x) = x – x0
1 0
= 0.x25– –0 0
= 0.x25
Substituting the corresponding values in equation (1),
P1(x) = x––00.25
.25
(1) + 0.x25 (1.64872)
= – 4(x – 0.25) + 6.59488 x
= – 4x + 1 + 6.59488 x
⇒ P1(x) = 2.5948800 x + 1
The interpolating polynomial of degree 2 is given as,
P2(x) = L0(x) f(x0) + L1(x)f(x1) + L2(x) f(x2) ... (2)
(x – x ) (x – x )
L0(x) = (x – x1) (x – x2 )
0 1 0 2
(x – 0) (x – 0.5) x (x – 0.5)
= (0.25 – 0) (0.25 – 0.5) = – 0.0625
(x – x ) (x – x )
L2(x) = (x – x0) (x – x1 )
2 0 2 1
(x – 0) (x – 0.25)
= (0.5 – 0) (0.5 – 0.25)
x (x – 0.25)
= 0.125
112 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
Substituting the corresponding values in equation (2),
(x – 0.25) (x – 0.5) x (x – 0.5) x (x – 0.25)
P2(x) = 0.125 (1) + – 0.0625 (1.64872) + 0.125 (2.71828)
= 8(x2 – 0.25) (x – 0.5) – 26.37952x (x – 0.5) + 21.74624 x (x – 0.25)
= 8[x2 – 0.75x + 0.125] – 26.37952x2 + 13.18976x + 21.74624 x2 – 5.4365600 x
= 8x2 – 6x + 1 – 4.63328 x2 + 7.7532 x
= 3.36672 x2 + 1.7532 x + 1
\ P2(x) = 3.36672 x2 + 1.7532 x + 1
The interpolating polynomial of degree 3 is given as,
P3(x) = L0(x) f(x0) + L1(x)f(x1) + L2(x) f(x2) + L3(x)f(x3) ... (3)
(x – x ) (x – x ) ( x – x )
L0(x) = (x – x 1) (x – x2 ) (x – 3x )
0 1 0 2 0 3
(x – 0) (x – 0.5) (x – 0.75)
= (0.25 – 0) (0.25 – 0.5) (0.25 – 0.75)
x (x – 0.5) (x – 0.75)
= 0.03125
(x – x0) (x – x1) (x – x3)
L2(x) = (x – x ) (x – x ) (x – x )
2 0 2 1 2 3
(x – 0) (x – 0.25) (x – 0.75)
= (0.5 – 0) (0.5 – 0.25) (0.5 – 0.75)
x (x – 0.25) (x – 0.75)
= – 0.03125
(x – x0) (x – x1) (x – x2)
L3(x) = (x – x ) (x – x ) (x – x )
3 0 3 1 3 2
(x – 0) (x – 0.25) (x – 0.5)
= (0.75 – 0) (0.75 – 0.25) (0.75 – 0.5)
x (x – 0.25) (x – 0.5)
= 0.09375
Substituting the corresponding values in equation (3),
(x – 0.25) (x – 0.5) (x – 0.75) x (x – 0.5) (x – 0.75) x (x – 0.25) (x – 0.75)
P3(x) = – 0.09375 (1) + 0.03125 (1.64872) + – 0.03125 (2.71828)
x (x – 0.25) (x – 0.5)
+ 0.09375 (4.48189)
= – 10.6666667 (x – 0.25) (x – 0.5) (x – 0.75) + 52.75904 x(x – 0.5) (x – 0.75) – 86.98496 x (x – 0.25)
(x – 0.75) + 47.8068267x (x – 0.25) (x – 0.5)
= – 10.6666667(x3 – 1.5 x2 + 0.6875 x – 0.09375) + 52.75904 (x3 – 1.25 x2 + 0.375 x)
– 86.98496 (x3 – x2 + 0.1875 x) + 47.8068267 (x3 – 0.75 x2 + 0.125x)
= – 10.6666667 x3 + 16 x2 – 7.3333334 x + 1 + 52.75904 x3 – 65.9488 x2 + 19.78464 x – 86.98496 x3
+ 86.98496 x2 – 16.30968 x + 47.8068267 x3 – 35.85512 x2 + 5.9758533 x
= 2.91424 x3 + 1.18104 x2 + 2.1174799 x + 1
\ P3(x) = 2.19424 x3 + 1.18104 x2 + 2.1174799 x + 1.
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 113
Mathematics Paper-VII Numerical Analysis
(b)
The error bound formula of degree 1 is given as,
| f 2 (x (x)) |
Error bound = 2! |(x – x0) (x – x1)| ... (4)
f(x) = e 2x
f'(x) = 2e2x
f''(x) = f 2(x) = 4e2x
f 2(ξ(x)) = 4e2(ξ(x))
As (ξ(x)) is strictly increasing on [0, 0.25];
Max|f 2(ξ(x))|(0, 0.25) = |4e2(ξ(x))|(0, 0.25) = 6.5948851.
Substituting the corresponding values in equation (4),
Error bound = 6.5948851
2! |(0.43 – 0) (0.43 – 0.25)|
= 6.5948851 2 |(0.43)(0.18)|
= (3.2974426) (0.0774)
= 0.2552221
\ At n = 1, Error bound = 0.2552221.
The error bound formula of degree 2 is given as
| f 3 (x (x)) |
Error bound = 3! |(x – x0) (x – x1) (x – x2)| ... (5)
f(x) = e2x
f'(x) = 2e2x
f 2(x) = f ''(x) = 4e2x
f 3(x) = f '''(x) = 8e2x
f 3(ξ(x)) = 8e2(ξ(x))
As (ξ(x)) is strictly increasing function on [0, 0.5]
Max|f 3(ξ(x))|(0, 0.5) = Max|8e2(ξ(x))|(0, 0.5) = 21.7462546
Substituting the corresponding values in equation (5),
Error bound|x = 0.43 = 21.7462546
6 |(0.43 – 0) (0.43 – 0.25) (0.43 – 0.5)|
= (3.6243758) | – 0.0054180|
= (3.6243758) (0.0054180)
= 0.0196369
f(0.43) = e2(0.43) = 2.3631607
⇒ f(0.43) = 2.3631607
P1(0.43) = 2.59488 (0.43) + 1
⇒ P1(0.43) = 2.1157984
Absolute error|n = 1 = |f(0.43) – P1(0.43)|
= |2.3631607 – 2.1157984|
= 0.2473623
P2(0.43) = 3.36672(0.43)2 + 1.7532(0.43) + 1
⇒ P2(0.43) = 2.3763825
114 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
Absolute error|n = 2 = |f(0.43) – P2(0.43)|
= |2.3631607 – 2.3763825|
= | – 0.0132218|
\ Absolute error = 0.0132218.
x–x
L1(x) = x – x0 = 0x.2––00.1.1 = x––00.1.1
1 0
⇒ f(0.18) = – 0.5081235
P1(0.18) = – 2.7074748 (0.18) – 0.0193024
⇒ P1(0.18) = – 0.5066479
Absolute error = |f(0.18) – P1(0.18)|
= | – 0.5081235 – (– 0.5066479) |
= | – 0.0014756 |
= 0.0014756
P2(0.18) = 0.876255(0.18)2 – 2.9703513(0.18) – 0.0017773
⇒ P2(0.18) = – 0.5080499
Absolute error = |f(0.18) – P2(0.18)|
= | – 0.5081235 – ( – 0.5080499) |
= | – 0.5081235 + 0.5080499 |
= | – 0.0000736 |
\ Absolute error = 0.0000736
n Error bound Absolute error
1 0.0015521 0.0014756
2 0.0001109 0.0000736
x1 Q1, 0 Q1, 1
x2 Q2, 0 Q2,1 Q2,2
Table
118 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
Q20. Use Neville’s method to obtain the approximations for Lagrange interpolating polynomials of degrees
one, two and three to approximate f(8.4) if f(8.1) = 16.94410, f(8.3) = 17.56492, f(8.6) = 18.50515, f(8.7) =
18.82091.
Answer : Model Paper-2, Q10(a)
⇒ Q1,1(8.4) = 17.8753300
(x – x1) Q2, 0 – (x – x2) Q1, 0
Q2,1(x) = x2 – x1
(x – 8.3) 18.50515 – (x – 8.6) 17.56492
= 8.6 – 8.3
+
= 18.50515x – 153.59274500–.317.56492x 151.0583120
= 0.9402300x0.–3 2.5344330
= 0.315760 x0.–10.8650210
⇒ Q3,1(8.4) = 17.8736300
The best linear approximation is considered as Q2,1, as 8.4 lies between 8.3 and 8.6.
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 119
Mathematics Paper-VII Numerical Analysis
The second degree approximation is given as,
(x – x0) Q2, 1 – (x – x2) Q1, 1
Q2,2(x) = x2 – x0
(x – 8.1) 17.878330 – (x – 8.6) 17.8753300
= 8.6 – 8.1
+
= 17.878330x – 144.81447300.–5 17.87533x 153.7278380
= 0.003 x –08.5.9133650
0.003 (8.4) – 8.9133650
Q2,2(8.4) = 0.5
⇒ Q2,2(8.4) = 17.8771300
(x – x1) Q3, 1 – (x – x3) Q2, 1
Q3,2(x) = x3 – x2
(x – 8.3) 17.8736300 – (x – 8.7) 17.878330
= 8.7 – 8.3
– 17.878330 + 155.5414710
= 17.8736300x – 148.3511290
0.4
+
= – 0.00470x0.47.1903420
– 0.00470 (8.4) + 7.1903420
Q3,2(8.4) = 0.4
⇒ Q3,2(8.4) = 17.8771550
The best quadratic approximation is considered as Q3,2 as 8.4 is near to 8.3.
The third degree approximation is given as,
(x – x0) Q3, 2 – (x – x3) Q2, 2
Q3,3(x) = x3 – x0
(x – 8.1) 17.8771550 – (x – 8.7) 17.8771300
= 8.7 – 8.1
17.877155x – 144.8049555 – 17.8771300 x + 155.5310310
= 0.6
0.000025x + 10.7260755
= 0.6
0.000025 (8.4) + 10.7260755
Q3,3(8.4) = 0.6
⇒ Q3,3(8.4) = 17.8771425
Q21. Use Neville’s method to obtain the approximations for Lagrange interpolating polynomials of degrees
one, two and three to approximate f(0.25) if f(0.1) = –0.62049958, f(0.2) = – 0.28398668, f(0.3) = 0.00660095,
f(0.4) = 0.24842440.
Answer :
Given data is,
f(0.1) = – 0.62049958, f(0.2) = – 0.28398668
f(0.3) = – 0.00660095, f(0.4) = – 0.24842440
120 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
The first degree approximation is given as,
(x – x0) Q1, 0 – (x – x1) Q0, 0
Q1,1(x) = x1 – x0
(x – 0.1) (– 0.28398668) – (x – 0.2) (– 0.62049958)
Q1,1(x) = 0.2 – 0.1
+ +
= – 0.28398668x 0.028398670.1 0.62049958x – 0.12409992
= – 0.022962580x.2– 0.02084980
Q22. Use Neville’s method to obtain the approximations for Lagrange interpolating polynomials of degrees
one, two and three to approximate f(0.43) if f(0) = 1, f(0.25) = 1.64872, f(0.5) = 2.71828, f(0.75) = 4.48169.
Answer :
Given data is,
f(0) = 1, f(0.25) = 1.64872
f(0.5) = 2.71828, f(0.75) = 4.48169
The first degree approximation is given as,
(x – x0) Q1, 0 – (x – x1) Q0, 0
Q1,1(x) = x1 – x0
(x – 0) (1.64872) – (x – 0.25) (1)
Q1,1(x) = 0.25 – 0
0 – x + 0.25
= 1.64872x 0–.25
x + 0.25
= 0.64872 0.25
x + 0.25
\ Q1,1(x) = 0.64872
0.25
122 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
0.64872 (0.43) + 0.25
Q1,1(0.43) = 0.25
⇒ Q1,1(0.43) = 2.11579840
(x – x1) Q2, 0 – (x – x2) Q1, 0
Q2,1(x) = x2 – x1
(x – 0.25) 2.71828 – (x – 0.5) 1.64872
= 0.5 – 0.25
+
= 2.71828 x – 0.679570.–251.64872 x 0.82436
+
= 1.069560x.250.14479
+
\ Q2,1(x) = 1.069560x.250.14479
= 1.76341x0.–250.202135
⇒ Q3,3(0.43) = 2.36060474
h h f[xn – 1, xn] f [x n – 1 , x n ] – f [x n – 2 , x n – 1 ]
xn – xn – 2
f [x n ] – f [x n – 1 ]
xn – xn – 1
xn f[xn]
Table
Step 6
The divided difference interpolating polynomial is given as,
Pn(x) = f[x0] + f[x0, x1] (x – x0) + f[x0, x1, x2] (x – x0) (x – x1) + f[x0, x1, x2, x3] (x – x0) (x – x1) (x – x2) + - - - - - +
f[x0,- - xn] (x – x0) (x – x1) - - - - - - - (x – xn – 1).
Q24. Write the steps involved in order to construct forward difference table.
Answer :
Forward Difference
Step 1
The step-size (h) for the forward difference table can be calculated as,
h = xi + 1 – xi.
Where,
i = 0, 1, 2 .......
Step 2
The first divided difference of ‘f’ with respect to xi and xi + 1 is given as,
f [xi + 1] – f [xi]
f[xi, xi + 1] = xi + 1 – xi
Where,
i = 0, 1,........
Step 3
The second divided difference of f with respect to xi, xi + 1, xi + 2 is given as,
f [xi + 1, xi + 2] – f [xi, xi + 1]
f[xi, xi + 1, xi + 2] = xi + 21 – xi
Step 4
The process is continued until the desired nth divided difference is obtained.
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 125
Mathematics Paper-VII Numerical Analysis
Step 5
The forward difference table can be tabulated as shown below.
Value Value First difference Df Second difference D2f - - - - nth difference - - - - - Dnf
of x of f(x)
x0 f(x0)
f (x1) – f (x 0)
Df0 = h
x1 f(x1) D f1 – D f0
D2 f0 = h
f (x 2) – f (x1) D n–1 f1 – D n–1 f0
Df1 = h - - - Dnf0 = h
x2 f(x2) D f2 – D f1
D2 f1 = h
x3 f[x3] f (x 3) – f (x 2)
Df2 = h
xn f(xn)
Table
Step 6
The forward interpolating polynomial can be given as,
Value Value First difference (∇f) Second difference nth difference (∇nf)
of x of f(x) (∇2f)
x0 f(x0)
f (x1) – f (x 0)
∇f1 = h
x1 f(x1) 4 f2 – 4 f1
∇ 2 f2 = h
f (x 2) – f (x1)
∇f1 = h
x2 f(x2)
(4 n–1 fn – 4 n–1 fn – 1)
∇nfn = h
Table
Step 6
The backward interpolating polynomial is given as,
= 17.56492 – 16.94410
8.3 – 8.1
\ f[x0, x1] = 3.1041.
The remaining first divided differences are found in the same manner.
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 127
Mathematics Paper-VII Numerical Analysis
i xi f(xi) f(xi – 1, xi) f(xi –2, xi –1, xi) f(xi–3, xi–2, xi –1, xi)
0 8.1 16.94410 f(x0, x1)
3.1041
1 8.3 17.56492 f(x0, x1, x2)
f(x1, x2) 0.03566 f(x0, x1, x2, x3)
3.12193 0.0891916
2 8.6 18.50515 f(x1, x2, x3)
f(x2, x3) 0.089175
3.1576
3 8.7 18.82091
Given,
x0 = 0.1, x1 = 0.2, x2 = 0.3, x4 = 0.4.
f(x0) = – 0.62049958, f(x1) = – 0.28398668, f(x3) = 0.00660095, f(x4) = 0.24842440.
128 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
According to Newton's divided difference formula,
The first divided difference corresponding to x0, x1 is,
f[x0, x1] = Df(x0) = 1h [f(x1) – f(x0)] = 1h Df(x0)
Df(x0) = f[x0, x1] = 01.1 [– 0.28495668 – (– 0.62049958)]
⇒ Df(x0) = 3.365129.
The remaining first divided difference are found in same manner.
i xi f(xi) f(xi – 1, xi) f(xi –2, xi –1, xi) f(xi–3, xi–2, xi –1, xi)
0 0.1 – 0.62049958
Df(x0)
3.365129
D2 f(x0)
1 0.2 – 0.28398668 – 4.592527
Df(x1) D3f(x0)
2.9058763 – 2.83891
2 0.3 0.00660095 – 4.876418
Df(x2) D2f(x1)
2.4182345
3 0.4 0.24842440
Table
The second divided difference corresponding to x0, x1, x2 is,
Df (x1) – Df (x0)
D2 f(x0) = f[x0, x1, x2] =
h
= 2.9058763 – 3.365129
0.3 – 0.1
⇒ f[x0, x1, x2] = D2 f(x0) = – 4.592527
The remaining second divided differences are shown in the table.
Third divided difference corresponding to x0, x1, x2, x3 is,
D 2 f (x1) – D 2 f (x0)
D3 f(x0) = f[x0, x1, x2, x3] = h
– 2.4382209 – (– 2.2962635)
= 0.3 – 0.2
⇒ f[x0, x1, x2, x3] = D3 f(x0) = – 2.83891
According to Newton’s forward difference formula, interpolation of first degree polynomial is,
p1(x) = f(x0) + s.h. D f(x0) ... (1)
Where,
h = 0.1
x–x
s = h 0 = 0.250.–1 0.1 = 1.5
Substituting the corresponding values in equation (1),
p1(0.25) = – 0.62049958 + (1.5) (0.1) [3.365129]
⇒ p1(0.25) = – 0.1157302.
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 129
Mathematics Paper-VII Numerical Analysis
Interpolation of second degree polynomial is,
s (s – 1) h 2 [D 2 f (x0)]
p2(x) = f1(s) + 2! ... (2)
Substituting the corresponding values in equation (2),
(1.5) (1.5 – 1) (0.1) 2 [– 4.592527]
p2(0.25) = – 0.1157302 + 2!
⇒ p2(0.25) = – 0.1329522
Interpolation of third degree polynomial is,
s (s – 1) (s – 2) (h 3 [D 3 f (x0)])
p3(0.25) = p2(s) + 3!
(1.5) (1.5 – 1) (1.5 – 2) (0.1) 3
= – 0.1329522 + 6 [–2.83891]
p3(0.25) = – 0.13277474
\ p1(0.25) = – 0.1157302
p2(0.25) = – 0.1329522
p3(0.25) = – 0.13277474.
Q28. Use the Newton backward difference formula to construct interpolating polynomials of degree one,
two, three for the data f(0.25) if f(0.1) = – 0.62049958, f(0.2) = – 0.28398668, f(0.3) = 0.00660095, f(0.4) =
0.24842440. Approximate the specified value using the polynomial.
Answer :
Given,
x0 = 0.1, x1 = 0.2, x2 = 0.3, x3 = 0.4, x4 = 0.25
f(x0) = – 0.62049958, f(x1) = – 0.28398668, f(x2) = 0.00660095, f(x3) = 0.24842440.
h = 0.1
The first divided difference corresponding to xn and xn – 1 is,
f [xn] – f [xn – 1]
∇f(xn) =
h
= 0.248424400–.10.00660095
= 2.4182345.
Table
130 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
The second divided difference corresponding to xn, xn–1, xn–2 is given as,
4 f (xn) – 4 f (xn–1)
∇2 f(xn) = h = 0.241823450.–1 2.9058763
\ ∇2 f(xn) = – 4.876418.
The remaining second divided differences are shown in the table.
The third divided difference corresponding to xn, xn–1, xn–2, xn–3 is given as,
4 2 f (xn) – 4 2 f (xn–1) – 4.876418 – (– 4.592527)
∇3 f(xn) = h = 0.1
∇3 f(xn) = – 2.83891.
Newton’s backward difference formula is given as,
n JK –sNO
pn(x) = f(xn) + / (–1) k KK OO ∇ kf(xn) ... (1)
k=1
Lk P
The interpolating polynomial of degree one is given as,
p1(x) = f[xn] + h.s ∇ f(xn) ... (2)
Substituting the corresponding values in equation (2).
⇒ p1(x) = 0.24842440 + s(0.24182345)
Where,
x – xn
s = h = 0.250.–1 0.4 = – 1.5
\ p1( – 1.5) = 0.24842440 + (– 1.5) (0.24182345)
f(0.25) = 0.24842440 – 0.36273517
\ f(0.25) = – 0.11431077.
The interpolating polynomial of degree two is given as,
s (s + 1)
p2(x) = p1(s) + h2 ∇2 f(xn) 2! ... (3)
Substituting the corresponding values in equation (3),
J s (s + 1) N
p2(x) = 0.24842440 + 0.24182345 s + (0.1)2 ( – 4.876418) KK 2! OO
L P
J – 1.5 (– 1.5 + 1) ON
⇒ p2 (–1.5) = 0.24842440 + 0.24182345 (– 1.5) – 0.04876418 KK 2
O
L P
= 0.2484244 – 0.362735175 – 0.01828656
f(0.25) = p2 (–1.5) = – 0.132597335.
The interpolating polynomial of degree three is given as,
s (s + 1) (s + 2)
p3(x) = p2(s) + h3 ∇3 f(xn) 3! ... (4)
Substituting the corresponding values in equation (4),
s (s + 1) (s + 2)
p3(s) = p2(s) + (0.1)3 (2.83891) 6
Substituting s = –1.5 in the above equation,
J (– 1.5) (–1.5 + 1) (–1.5 + 2) NO
⇒ p3 (–1.5) = p2 (–1.5) – 0.002838 KK 6
O
L P
⇒ p3 (–1.5) = – 0.132597335 – 0.002838 (0.0625)
\ f (0.25) = – 0.13277471.
\ p1 (–1.5) = f(0.25) = – 0.11431077
p2 (–1.5) = f(0.25) = – 0.132597335
p3 (–1.5) = f(0.25) = – 0.13277471
Table
Second divided difference corresponding to x0, x1, x2 is,
f [x0, x2] – f [x1, x0]
f [x0, x1, x2] = x2 – x0 = 1.35210.–41.107
⇒ f[x0, x1, x2] = 0.61275.
Remaining values of the second divided difference are shown in the table.
Third divided difference corresponding to x0, x1, x2, x3 is,
f [x1, x2, x3] – f [x2, x1, x0]
f [x0, x1, x2, x3] = x3 – x0 = 0.61275 – 0.7485
0.6 – 0
⇒ f [x0, x1, x2, x3] = 0.22625.
132 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
Remaining values of third divided difference are shown in the table.
Fourth divided difference corresponding to x0, x1, x2, x3, x4 is,
f [x1, x2, x3, x4] – f [x3, x2, x1, x0]
f[x0, x1, x2, x3, x4] = x4 – x0
Where,
x = 0.43
x – x0
s = h = 0.430.–2 0.4 = 0.15
⇒ s = 0.15.
Substituting the corresponding values in equation (1),
(0.15) (0.2) (0.15) ((0.15) 2 –1) (0.2) 3
p(0.43) = 1.49182 + 2 [1.3521 + 1.6515] + (0.15]2
(0.2) 2
[0.7485] + 2
(0.22615 + 0.275833) + (0.15)2 (0.15)2 – 1) (0.2) + (0.061979)
⇒ p(0.43) = 1.537251
\ p(0.43) = 1.53725.
z2 Q2, 0 Q2, 1
z3 Q3, 0 Q3, 1 Q3, 2 Q2n+1, 2n+1
Step 4
The Hermite interpolating polynomial is given as,
H(x) = Q0, 0 + Q1, 1 (x – x0) + Q2, 2 (x – x0)2 + Q3, 3 (x – x0)2 (x – x1) + Q4, 4 (x – x0)2 (x – x1)2
+ Q5, 5 (x – x0)2 (x – x1)2 (x – x2) - - - - - -
Q31. Use Hermite interpolation to construct an approximating polynomial for the following.
(a) x f(x) f'(x)
0.8 0.22363362 2.1691753
1.0 0.65809197 2.0466965
(b) Use the polynomial to approximate the value of ‘x’ in f(x) = sin(ex – 2) approximate f(0.9). Find the
absolute error.
Answer : Model Paper-2, Q10(b)
(a) Given,
x0 = 0.8, x1 = 1.0
f(x0) = 0.22363362, f(x1) = 0.65809197
f '(x0) = 2.1691753, f '(x1) = 2.0466965.
According to Hermite interpolation,
Qi,j – 1 – Qi – 1, j – 1
Qi,j = zi – zi – j ... (1)
z0 = z1 = x0 = 0.8
z2 = z3 = x1 = 1.0
Q0,0 = f(x0) = 0.22363362
Q1,0 = f(x0) = 0.22363362
Q2,0 = f(x1) = 0.65809197
Q3,0 = f(x1) = 0.65809197
Q1,1 = f '(x0) = 2.1691753
Q3,1 = f '(x1) = 2.0466965
134 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
From equation (1),
Q2,0 – Q1,0 0.65809197 – 0.22363362
Q2,1 = z2 – z1 = 1.0 – 0.8 = 2.17229175.
Q2,2–1 – Q2–1, 2–1 Q2,1 – Q1,1
Q2,2 = z2 – z2–2 = z – z = 2.17229175 – 2.1691753
1.0 – 0.8 = 0.01558225
2 0
Table
According to Hermite’s interpolation formula,
H3(x) = Q0,0 + Q1,1 (x – x0) + Q2,2 (x – x0)2 + Q3,3 (x – x0)2 (x – x1) ... (2)
Substituting the corresponding values in equation (2).
H3(x) = 0.22363362 + 2.1691753 (x – 0.8) + 0.01558225 (x – 0.8)2 – 3.2177925 (x – 0.8)2 (x – 1.0).
(b) Given function is,
f(x) = sin(ex – 2)
f' (x) = cos(ex – 2) (ex)
⇒ f' (x) = ex cos(ex – 2)
f(x0) = f(0.8) = sin(e0.8 – 2) = 0.2236336
f(x1) = f(1.0) = sin(e1.0 – 2) = 0.65809196
f '(x0) = f ' (0.8) = e0.8 cos(e0.8 – 2) = 2.16917527
f '(x1) = f '(1.0) = e1.0 cos(e1.0 – 2) = 2.04669647
Hermite interpolating polynomial is,
H3(x) = 0.22363362 + 2.1691753 (x – 0.8) + 0.01558225 (x – 0.8)2 – 3.2177925 (x – 0.8)2 (x – 1.0).
Substituting x = 0.9 in the above equation,
H3(0.9) = 0.22363362 + 2.1691753 (0.9 – 0.8) + 0.01558225 (0.9 – 0.8)2 – 3.2177925 (0.9 – 0.8)2 (0.9 – 1.0).
\ H3(0.9) = 0.443924765
\ H3(0.9) is the approximate to f(x).
f(x) = sin(ex – 2)
⇒ f(0.9) = sin(e0.9 – 2)
= 0.44359243.
\ f(0.9) = 0.44359243 is the actual error value to f(x).
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 135
Mathematics Paper-VII Numerical Analysis
Absolute error is given as,
|f(0.9) – H3(0.9)| = |0.44359243 – 0.443924765|
= | – 3.32326229 × 10–4|
= 0.000332326
\ Absolute error = 0.000332326
Q32. Use the following values and five digit rounding arithmetic to construct the Hermite interpolating
polynomial to approximate sin 0.34.
x sinx Dx(sin x) = cos x
0.30 0.29552 0.95534
0.32 0.31457 0.94924
0.35 0.34290 0.93937
Answer : Model Paper-1, Q10(b)
Given,
x0 = 0.30, x1 = 0.32, x2 = 0.35
f(x0) = 0.29552, f(x1) = 0.31457, f(x3) = 0.34290
f '(x0) = 0.95534, f '(x1) = 0.94924, f '(x1) = 0.93937
According to Hermite interpolation,
Qi, j – 1 – Qi –1, j – 1
Qi,j = zi – zi – j ... (1)
z0 = z1 = x0 = 0.30
z2 = z3 = x1 = 0.32
z4 = z5 = x2 = 0.35
z f(z) First divided Second divided Third divided Fourth divided Fifth divided
difference difference difference difference difference
x0 = z0 = 0.3 Q0,0 = 0.29552
Q1,1= 0.95534
x0 = z1 = 0.3 Q1,0 = 0.29552 Q2,2 = – 0.142
Q2,1 = 0.9525 Q3,3 = – 1.05
x1= z2 = 0.32 Q2,0 = 0.31457 Q3,2 = –0.163 Q4,4 =20.776
Q3,1= 0.94924 Q4,3= – 0.01112 Q5,5= –436.232
x1= z3 = 0.32 Q3,0= 0.31457 Q4,2 = –0.163556 Q5,4= –1.0356
Q4,1= 0.9443333 Q5,3 = –0.0629
x2= z4 = 0.35 Q4,0 = 0.34290 Q5,2 = – 0.165443
Q5,1 = 0.93937
x2= z5 = 0.35 Q5,0 = 0.34290
Table
According to Hermite interpolation,
H5(x) = Q0,0 + Q1,1 (x – x0) + Q2,2 (x – x0)2 + Q3,3 (x – x0)2 (x – x1)+ Q4,4 (x – x0)2 (x – x1)2
+ Q5,5 (x – x0)2 (x – x1)2 (x – x2).
Substituting the corresponding values in the above equation,
H5(x) = 0.29552 + 0.95534(x – 0.3) + ( – 0.142) (x – 0.3)2 + ( – 1.05) (x – 0.3)2 (x – 0.32)
+ 20.776 (x – 0.3)2 (x – 0.32)2 + (– 436.232) (x – 0.3)2 (x – 0.32)2 (x – 0.35)
Substituting, x = 0.34 in the above equation,
H5(0.34) = 0.29552 + 0.95534 (0.34 – 0.3) – 0.142(0.34 – 0.3)2 – 1.05 (0.34 – 0.3)2 (0.34 – 0.32)
+ 20.776(0.34 – 0.3)2 (0.34 – 0.32)2 – 436.232(0.34 – 0.3)2 (0.34 – 0.32)2 (0.34 – 0.35).
\ H5(0.34) = 0.33348888
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 137
Mathematics Paper-VII Numerical Analysis
Q33. Use Hermite interpolation to construct an approximating polynomial for the following data.
(a) x f(x) f’(x)
8.3 17.56492 3.116256
8.6 18.50515 3.151762
(b) Use the polynomial for the given value of ‘x’ to approximate f(x) = xlnx and calculate the absolute
error f(8.4) with the function.
Answer :
(a) Given,
x0 = 8.3, x1 = 8.6
f(x0) = 17.56492, f(x1) = 18.50515
f '(x0) = 3.116256, f '(x1) = 3.151762
According to Hermite interpolation,
Qi,j – 1 – Qi – 1, j – 1
Qi,j = zi – zi – j ... (1)
And,
z0 = z1 = x0 = 8.3
z2 = z3 = x1 = 8.6
Q0,0 = f(x0) = 17.56492
Q1,0 = f(x0) = 17.56492
Q2,0 = f(x1) = 18.50515
Q3,0 = f(x1) = 18.50515
Q1,1 = f '(x0) = 3.11625600
Q3,1 = f '(x1) = 3.151762
From equation (1),
Q2,1–1 – Q2–1, 1–1 Q2,0 – Q1,0
Q2,1 = z2 – z2–1 = z – z = 18.50515 – 17.56492
8.6 – 8.3 = 3.1341
2 1
f(x) = x ln x
J N
f ' (x) = x KK 12 OO + ln (x)
L P
⇒ f ' (x) = x + ln (x)
Let,
x0 = 8.3, x1 = 8.6
f(x0) = 8.3 ln (8.3) = 17.56492
f(x1) = 8.6 ln (8.6) = 18.50515
f ' (x0) = 1 + ln (8.3) = 3116256
f '(x1) = 1 + ln (8.6) = 3.151762
Hermite interpolating polynomial corresponding to the above values is,
H3(x) = 17.56492 + 3.116256 (x – 8.3) + 0.05948 (x – 8.3)2 – 0.002022222 (x – 8.3)2 (x – 8.6) ... (3)
Substituting x = 8.4 in equation (3),
⇒ H3(8.4) = 17.56492 + 3.116256 (8.4 – 8.3) + 0.05948 (8.4 – 8.3)2 – 0.002022222 (8.4 – 8.3)2 (8.4 – 8.6).
\ H3(8.4) = 17.8771244.
Actual Value
f(x) = x ln x
f(8.4) = (8.4) ln (8.4)
⇒ f(8.4) = 17.87714633
Absolute error = |f(8.4) – H3(8.4)|
= | 17.87714633 – 17.8771244|
= 0.000022
\ Absolute error = 0.000022.
0 0 0 1
c j+1 – c j
dj = 3h
j
Step 5
Substitute the corresponding values in the natural cubic spline polynomial in order to obtain the required result.
Q35. Construct the clamped cubic spline for the following data and the fact f '(0.1) = – 2.8004996 and f'(0.3)
= – 2.9734038.
x f(x)
0.1 – 0.29004996
0.2 – 0.56079734
0.3 – 0.81401972
Answer : Model Paper-3, Q10(b)
x f(x)
– 0.5 – 0.0247500
– 0.25 0.3349375
0 1.1010000
J 1N J 1N
(b) Using the cubic spline constructed in the part a, approximate f KK– 3 OO and f' KK– 3 OO for f(x) = x3 +
4.001 x2 + 4.002 x + 1.101 and calculate the actual error. L P L P
Answer :
Given,
x0 = – 0.5, x1 = – 0.25, x2 = 0
f(x0) = – 0.0247500, f(x1) = 0.3349375, f(x2) = 1.1010000
142 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
Let, S(x) be a cubic polynomial and it is denoted by Sj(x).
According to natural cubic spline,
Sj(x) = aj + bj (x – xj) + cj (x – xj)2 + dj (x – xj)3 ... (1)
Where,
j = 0, 1, 2 ....... n – 1.
For j = 0,
S0(x) = a0 + b0 (x – x0) + c0(x – x0)2 + d0 (x – x0)3 ... (2)
For j = 1,
S1(x) = a1 + b1 (x – x1) + c1(x – x1)2 + d1(x – x1)3 ... (3)
hi = xi + 1 – xi , i = 0, 1, 2 ........ n – 1
⇒ h0 = x0+1 – x0
= x1 – x0
= – 0.25 – (– 0.5)
⇒ h0 = 0.25
And
h1 = x1 + 1 – x1
= x2 – x1
= 0 – (– 0.25)
⇒ h1 = 0.25
The vector equation is given as,
Ax = b
Where,
RS V
SS1 0 0 WW
A = SSh0 2 (h0 + h1) h1WWW
SS W
S0 0 1 WW 3 × 3
T X
RS V
SS 1 0 0 WW
⇒ A = SS0.25 2 (0.5) 0.25WWW
SS W
S 0 0 1 WW 3 × 3
T X
RS 0 VW
SS WW
SS 3 3 WW
b = SS h1 2 ( a – a 1) – ( a
h0 1 0 WW – a )
SS 0 WW
T X 2 ×1
RS VW
SS 0 WW
SS 3 3 WW
⇒ b = SS 0.25 ( 1 . 10100000 – 0 . 3349375 ) – 0.25 ( 0. 33493751 – 0 .0247500 ) WW
SS 0 WW
T X
RS VW
SS 0 W
⇒ b = SS9.19275 –4.31625WWW
SS WW
S 0 W
T X
RS VW
SS 0 WW
⇒ b = SS4.8765WW
SS W
S 0 WW
T X
SIA PUBLISHERS and DISTRIBUTORS PVT. LTD. 143
Mathematics Paper-VII Numerical Analysis
RSc VW
SS 0WW
x = SSc1WW
SS WW
Sc2W
T X
Where c2 = 0
RS V R V RS V
SS 1 0 0 WW SSc0WW SS 0 WWW
W S W
⇒ SS0.25 1 0.25WW SSc1WW = SS4.8765WW
SS W S W SS W
S 0 0.25 0 WW3×3 SS0 WW 3×1 S 0 WW
T X T X T X
RS VW RS V
SS c0 + 0 + 0 WW SS 0 WWW
⇒ SS0.25 c0 + c1 + 0WW = SS4.8765WW
SS WW SS W
S 0 W S 0 WW
T X T X
c0 = 0.000000
0.25 c0 + c1 = 4.87650000
⇒ c1 = 4.87650000
Solving for b and d values.
h
b0 = h1 (a1 – a0) – 30 (c1 + 2c0)
0
= 3.06425000 – 0.81275000
⇒ b1 = 2.25150000
= 3 (01.25) (4.87650000 – 0)
\ d0 = 6.50200000
= 3 (01.25) (– 4.87650000)
\ d1 = – 6.50200000
Substituting the corresponding values in equation (2),
S0(x) = – 0.0247500 + 1.03237500 (x – (– 0.5)) + 0.00000 + 6.50200000 (x – ( – 0.5))3.
\ S0(x) = – 0.0247500 + 1.03237500 (x + 0.5) + 6.50200000 (x + 0.5)3.
Substituting the corresponding values in equation (3),
S1(x) = 0.3349375 + 2.25150000 (x – (– 0.25)) + 4.87650000 (x – (– 0.25)2 – 6.50200000 (x + 0.25)3
\ S1(x) = 0.3349375 + 2.25150000 ( – x + 0.5)) + 4.87650000 (x + 0.25)2 – 6.50200000 (x + 0.05)3
144 SIA PUBLISHERS and DISTRIBUTORS PVT. LTD.
UNIT-2: Interpolation and Polynomial Approximation Mathematics Paper-VII
(b) Given function is,
f(x) = x3 + 4.001 x2 + 4.002x + 1.101
J N J N3 JK –1 NO 2 JK –1 NO
⇒ f KK –31 OO = KK –31 OO + 4.001 K 3 O + 4.002 K 3 O + 1.101
L P L P L P L P
J N
⇒ f KK –31 OO = 0.1745185
L P
f '(x) = 3x2 + 8.002 x + 4.002
J N J N2 JK –1 NO
⇒ f ' KK –31 OO = 3 KK –31 OO + 8.002 K 3 O + 4.002
L P L P L P
J N
\ f ' KK –31 OO = 1.668
L P
J N J N J N3
S0 KK –31 OO = – 0.0247500 + 1.03237500 KK –31 + 0.5OO + 6.50200000 KK –31 + 0.5OO
L P L P L P
J N
S0 KK –31 OO = 0.17741435
L P
J N
\ S0 KK –31 OO = 0.17741435 is the approximate to f(x).
L P
Absolute error is given as,
J –1 N J –1 N
f KK 3 OO – S0 KK 3 OO = |0.1745185 – 0.17741435|
L P L P
= | – 2.895 × 10–3|
J –1 N J –1 N
⇒ f KK 3 OO – S0 KK 3 OO = 2.895 × 10–3.
L P L P
J N
\ f KK –31 OO = 0.17451852 is the actual f(x).
L P
Internal Assessment
Objective type
I. Multiple Choice Questions
1. In linear interpolation, the polynomial of degree at most n passes through _____ points. [ ]
(a) n (b) n+1
(c) n/2 (d) n(n + 1)
2. p0,1,2 = _____ [ ]
1 1
(a) x 2 – x 0 [(x – x0)p1,2 – (x – x2)p0,1] (b) x 2 – x 0 [(x – x0)p1,2 + (x – x2)p0,1]
1 1
(c) x 2 + x 0 [(x – x0)p1,2 – (x – x0)p0,1] (d) x 2 – x 0 [(x – x0)p1,2 + (x – x0)p0,1]
3. The Lagrange's error formula causes the errors to exceed the theoritical error estimate due to assumption of –––.
[ ]
(a) Four-digit arithmetic (b) Infinite-digit arithmetic
(c) Floating point arithmetic (d) All of the above
–1
4. Approximation of f (x) using iterated interpolation is called [ ]
(a) Iterated inverse interpolation (b) Lagranges interpolation
(c) Spline interpolation (d) All of these
5. The coefficients of Newton forward difference form of the interpolating polynomical are tabulated along the _____
in the table [ ]
(a) First row (b) First column
(c) Diagonal (d) None of the above
6. Newton’s backward difference formula is [ ]
_ ks i ∇k f(x ) _ ks i ∇k f(x )
n n
/ mi + n
(a) (b) n / m i + n
i=0 i=0
/ mi (n + 1)
(c) (d) None of the above
i=0
n n
n n
(c)
H2n+1(x) = / f ' (x ) H j n,j (x) – / f (x ) H|
j n,j (x)
j=0 j=0
n n
(d)
H2n+1(x) = / f ' (x ) H j n,j (x) + / f (x ) H|
j n,j (x)
j=0 j=0
5M max
(c) 384 0 # j # n – 1 (xj+1 – xj)
4
(d) None of the above
10. From the properties of clamped spline interpolant ‘S’ for function ‘f’, defined at [a, b] then [ ]
h h
(a) f '(a) = h1 (a1 + a0) + 30 (2c0 + c1) (b) f '(a) = h1 (a1 – a0) + 30 (2c0 + c1)
0 0
h h
f '(a) = h1 (a1 + a0) – 30 (2c0 + c1)
(c) (d) f '(a) = h1 (a1 – a0) – 30 (2c0 + c1)
0 0
KEY
I. Multiple Choice Questions
1. (b) 2. (a) 3. (b) 4. (a) 5. (c)
6. (d) 7. (a) 8. (b) 9. (c) 10. (d)
f n + 1 (x (x))
3. (n + 1) ! (x – x0) (x – x1) ...... (x – xn)
4. zero
5. Neville’s method
6. pn(x) = a0 + a1(x – x0) + a2(x – x0) (x – x1) + ....... + an(x – x0) ....... (x – xn – 1)
7. f[xi] = f(xi)
8. –0.4837057
9. ∇pn = pn – pn–1
10. Osculating
Answer :
(x – x0) Q1,0 – (x – x1) Q0,0 Q9. What is the value of ‘b’ in the vector equation
Q1,1(x) = x1 – x0
used in the Natural Spline?
(x – 1.0) (0.6200860) – (x – 1.3) (0.7651977)
= 1.3 – 1.0 Answer :