Professional Documents
Culture Documents
Solution
SECTION A
(i) Find the quadratic interpolating polynomial from the given data:
x: 0 1 2
f(x): 1 3 -1
2
Ans. -3x + 5x + 1
(ii) Using divided differences, find f(1) from the following data:
x: -4 -1 0
f(x:) 1245 33 5
-4 1245
-404
-1 33 94
-28
0 5
Using Newtons divided diiference formula
f(x) = f(x0) + (x- x0)[x0, x1] +(x x0)(x- x1)[x0, x1, x2] +..
(iii) Let f (x) = ln(1 + x), x0 = 1 and x1 = 1.1. Find the bounds on error
for linear
interpolation.
Solution:
The error bound in a
linear
interpolation is given by
Ans. 0.0003125.
(vi) Using the Gram-Schmidt or thogonalization process, compute the first two
orthogonal polynomials which are orthogonal on [0, 1] with respect to the weight
function W(x) = 1.
Solution: To find the orthogonal polynomials:
SECTION B
(i) Find the piecewise linear interpolating polynomials from the data given below
x: 0 1 2 3
f(x) : 1 2 5 10
Solution:
(i) In the interval [0,1], we have
SECTION C
(i) Obtain the cubic spline approximation from the following data:
x: 0 1 2
f(x): -1 3 29
with M0 = 0 = M2. Hence interpolate at x = 0.5, 1.5
Solution: Let the required straight line be f(x) = c 0 + c1x and quadratic
polynomial be y = c0 + c1x +c2x2. Here n=5
The normal equations for a straight line are:
1 14 14 14 1 1 1
2 27 54 108 4 8 16
3 40 120 360 9 27 81
Substituting the values from table in normal equations for straight lines and quadratic polynomials ,
we get
204 = 5c0 + 15 c1
748 = 15c0 + 55 c1
Solving these, we get c0 = 0 and c1= 13.6
Hence, the required straight line is f(x) = 13.6 x
And 204 = 5c0 + 15 c1 +55 c2 .
748 = 15c0 + 55 c1 + 225 c2 .
3062 = 55c0 + 225 c1 + 979 c2 .
c0 = 1, c1 = 12.7428, c2 = 0.1428
Hence the required quadratic polynomial is 1 + 12.7428 x + 0.1428 x2.
************