Sei sulla pagina 1di 10

Prof. OP Dogra ( 9876486598) www.mathematicsondemand.

com 1

Interpolation with unequal intervals : Lagranges Interpolation formula

Q1. The function ( ) x f y = is given at the point ( ) ( ) ( ) ( ) 9 , 10 & 1 , 9 , 1 , 8 , 3 , 7 . Find the value
of y for x = 9.5 using Lagranges interpolation formula.
Sol: 10 9 8 7 = x
( ) 9 1 1 3 = = x f y
10 , 9 , 8 , 7
3 2 1 0
= = = = x x x x
( ) ( ) ( ) ( ) 9 , 1 , 1 , 3
3 2 1 0
= = = = x f x f x f x f

Using Lagranges formula.
( )
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( )
( ) ( ) ( )
( )
1
3 1 2 1 0 1
3 2 0
0
3 0 2 0 1 0
3 2 1
x f
x x x x x x
x x x x x x
x f
x x x x x x
x x x x x x
x f


+


=

( ) ( ) ( )
( ) ( )( )
( )
( ) ( ) ( )
( ) ( )( )
( )
3
2 3 1 3 0 3
2 1 0
2
3 2 1 2 0 2
3 1 0
x f
x x x x x x
x x x x x x
x f
x x x x x x
x x x x x x


+


+

Putting x = 9.5


( )
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( )
( ) ( ) ( )
( ) 1
10 8 9 8 7 8
10 5 . 9 9 5 . 9 7 5 . 9
3
10 7 9 7 8 7
10 5 . 9 9 5 . 9 8 5 . 9
5 . 9


+


= f

( ) ( ) ( )
( ) ( )( )
( ) 1
10 9 8 9 7 9
10 5 . 9 8 5 . 9 7 5 . 9


+
( ) ( ) ( )
( ) ( ) ( )
( ) 9
9 10 8 10 7 10
9 5 . 9 8 5 . 9 7 5 . 9


+
=
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) 1 1 2
5 . 5 . 1 5 . 2
2 1 1
5 . 5 . 5 . 2
3
3 2 1
5 . 5 . 5 . 1


+
+

+

( ) ( ) ( )
( )
( ) 9
2 3
5 . 5 . 1 5 . 2
+

( )( ) ( ) ( ) ( ) ( )
( )( ) ( ) 5 . 1 75 . 5 . 2
2
75 . 5 . 2
2
25 . 5 . 2
2
25 . 5 . 1
+ +
= .1875 - .3125 + .9375 + 2.8125 = 3.625 Ans.

Q2. x y sin = is tabulated below.

2 4
0
t t
= x
0 . 1 70711 . 0 sin = = x y
Using Lagranges interpolation formula.
|
.
|

\
|
6
sin
t
Find
Sol:
2 4
0
2 1 0
t t
= = = x x x

Prof. OP Dogra ( 9876486598) www.mathematicsondemand.com 2

( ) ( ) ( ) 0 . 1 70711 . 0
2 1 0
= = = x f x f x f
( ) ( ) 7071 .
2 4
0
4
2 6
0
6
0 .
2
0
4
0
2 6 4 6
6
|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

+
|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

=
|
.
|

\
|
=
t t t
t t t
t t
t t t t
t
f x f ( ) 1
4 2
0
2
4 6
0
6
|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

+
t t t
t t t


( ) ( ) 1
4 2
12 6
70711 .
4 4
3 6
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|

|
.
|

\
|
+
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
=
t t
t t
t t
t t
( ) 51743 .
9
1
70711 .
18
16
= =

Q3. Given that 0 , 248 0 , 0 , 18
6 5 3 1 0
= = = = = u u u u u
13104
9
= u . Find the form of the function, assuming it to be a poly in x.

Sol: Since 6 , 3 , 1 , 0 = = x when u , 6 , 3 , 1 x x x are factor
( ) ( ) ( ) ( ) ( ) i x Q x x x x f Let = ) ( 6 3 1
f(x) has six values (given) we can fit a polynomial of 5
th
degree
Q(x) will be of degree 2.
( )
( )
( ) ( ) ( ) 6 3 1
=
x x x
x f
x Q ..(2), ( )
( )
( ) ( ) ( )
1
18
18
6 0 3 0 1 0
0
0 =

=

=
f
Q
( )
( )
( ) ( ) ( ) ( ) ( )
31
1 2 4
248
6 5 3 5 1 5
5
5 =

=

=
f
Q
( )
( )
( )( ) ( ) ( ) ( )
91
3 6 8
13104
6 9 3 9 1 9
9
9 = =

=
f
Q
9 , 5 , 0
2 1 0
= = = x x x Here
( ) ( ) ( ) 91 , 31 , 1
2 1 0
= = = x Q x Q x Q
Using Lagranges formula

( )
( ) ( )
( ) ( )
( )
( ) ( )
( ) ( )
( )
( ) ( )
( ) ( )
( )
2
1 2 0 2
1 0
1
2 1 0 1
2 0
0
2 0 1 0
2 1
x Q
x x x x
x x x x
x Q
x x x x
x x x x
x Q
x x x x
x x x x
x Q


+


+


=


( ) ( )
( ) ( )
( )
( ) ( )
( ) ( )
( )
( ) ( )
( ) ( )
( ) 91
5 9 0 9
5 0
31
9 5 0 5
9 0
1
9 0 5 0
9 5


+


+


=
x x x x x x


( ) ( )
36
5 91
20
9 31
45
45 14
2 2 2
x x x x x x
+

+
=

180
2275 455 2511 279 180 56 4
2 2 2
x x x x x x + + +
= 1
2
+ + = x x

Prof. OP Dogra ( 9876486598) www.mathematicsondemand.com 3

( ) ( ) ( ) ( ) ( ) ( )
2
1 1 3 6 1 from f x x x x x x = + +

Q4. Given that ( ) ( ) ( ) ( ) 4 8 , 5 7 , 5 2 , 4 1 = = = = f f f f find the value of ( ) 6 f and
also the value of x for which x f ( ) is max. or min.
Hint::- 8 , 7 , 2 , 1
3 2 1 0
= = = = x x x x
( ) ( ) ( ) ( ) 4 , 5 , 5 , 4
3 2 1 0
= = = = x f x f x f x f
Using formula & get ( ) ( ) 16 9
6
1
2
+ + = x x x f , For max or minima
( ) ( ) ( )
3
1
6
2
' ' & 9 2
6
1
' =

= + = x f x x f
( ) ve x f = ' ' ( )
2
9
0 ' = = x x f at Max
Q5. By means of Lagranges formula prove that
( ) ( ) ( )
(

+ =
3 1 1 3 1 1 0
2
1
2
1
8
1
2
1
y y y y y y y
Sol: Here argument are -3 , -1 , 1 , 3.
3 , 1 , 1 , 3
3 2 1 0
= = = = x x x x Let

( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
1
3 3 1 1 3 1
3 1 3
3
3 3 1 3 1 3
3 1 1

+ +
+
+

+
+
= y
x x x
y
x x x
x
y

( ) ( )( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) 1
1 3 1 3 3 3
1 1 3
3 1 1 1 3 1
3 1 3
3 1

+ +
+ +
+
+ +
+ +
+ y
x x x
y
x x x

For finding
0
y we put x = 0 in (1)

3 1 1 3 0
48
3
16
9
16
9
48
3
y y y y y + +

=

| |
3 1 1 3
9 9
16
1
16
1
y y y y + + =


| |
3 1 1 1 1 3
8 8
16
1
16
1
y y y y y y + + + + =


Take RHS and Multiply , we get the same result

3 1 1 3 1 1
16
1
16
1
16
1
16
1
2
1
2
1

+ + + y y y y y y = R.H.S
Q6 Write down the Lagranges Polynomial passing the ( ) ( )
1 1 0 0
, , , f x f x
( ) , ,
2 2
f x Hence express
( ) ( ) ( )
as
x x x
x x
3 2 1
1 3
2

+ +
a sum of partial fractions.
Sol: By Lagranges formula
( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
2
1 2 0 2
1 0
1
2 1 0 1
2 0
0
2 0 1 0
2 1
f
x x x x
x x x x
f
x x x x
x x x x
f
x x x x
x x x x
x f


+


+


=
We consider ( ) 1 3
2
+ + = x x x f given values of x = 1 , 2 , 3

Prof. OP Dogra ( 9876486598) www.mathematicsondemand.com 4

( ) 31 15 5 :
3 2 1 :
x f
x Table

( )
( )( )
( ) ( )
( )
( ) ( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) 31
2 3 1 3
2 1
3 2 1 2
15 3 1
5
3 1 2 1
3 2


+


+


=
x x x x x x
x f
( ) ( ) ( ) ( ) ( ) ( ) 2 1
2
31
3 1 15 3 2
2
5
+ = x x x x x x
divide both sides by ( ) ( ) ( ) 3 2 1 x x x

( ) ( ) ( ) ( ) ( ) ( ) 3 2
31
2
15
1 2
5
3 2 1
1 3
2

=

+ +
x x x x x x
x x

Q7. Using Lagranges formula find a polynomial which passes through the points
( ) ( ) ( ) ( ) 12 , 4 , 6 , 3 , 0 , 1 , 12 , 0 Ans. 12 18 7
2 3
+ x x x
Q8. Using Lagranges interpolation formula find the value of y corresponding to 10 = x from the
following table:
11 9 6 5 : x
( ) 16 14 13 12 : x f Ans.
3
44

Q9. Given the values 17 13 11 7 5 : x
( ) 5202 2366 1452 392 150 : x f
Compute ( ) 9 f using Lagranges formula Ans. 810
Q10. Using Lagranges interpolation formula find the form of the function ( ) x y from the following
table:
4 3 1 0 : x
24 12 0 12 : y Ans : ) 12 5 )( 5 (
2
+ x x x
Q11. Apply Lagranges formula to find ( ) 5 f given that
( ) ( ) ( ) ( ) ( ) 128 7 , 16 4 , 8 3 , 4 2 , 2 1 = = = = = f f f f f and explain why the result differs
from
5
2 . Ans .

Q12. Applying Lagranges formula, find a cubic polynomial which approximates the following data.
3 2 1 2 : x
( ) 5 3 8 12 : x y
Ans. 9 . 3
60
241
20
3
15
2
3
+ + x x
x

Q13. Using Lagranges interpolation formula, express the function
2 2
3
2 3
2
+
+
x x x
x x
as sum of partial
fraction. Ans.
( ) ( ) 2
1
1 2
1
1 2
1

+
+

x x x


Prof. OP Dogra ( 9876486598) www.mathematicsondemand.com 5
Q14. Express the function
( ) ( )( ) ( ) 6 4 1 1
1 6
2
+ +
+ +
x x x x
x x
as sum of partial fractions.
Ans.
( ) ( ) ( ) ( ) 4
41
1 21
4
1 25
2
6 350
1

x x x x


Q15. Using Lagranges formula express the function
( )( )( ) 3 2 1
13 10
2

+
x x x
x x
as the sum of partial fractions.
Ans.
3
4
2
3
1
2

+
x x x


Q16 Determine by Lagranges formula the % number of criminals under 35 years.
Under 25 years 52.0
Under 30 years 67.3
Under 40 years 84.1
Under 50 years 94.4
Sol: Hint
Here 50 , 40 , 30 , 25
3 2 1 0
= = = = x x x x
4 . 94 , 1 . 84 , 3 . 67 , 52
3 2 1 0
= = = = f f f f
use Lagranges formula & point above values for General & put x = 35 (for under 35
years)
Ans. ( ) 4 . 77 35 = f
Q17 By mean of Lagranges formula , prove that ( ) ( )
5 3 3 5 3 1
2 . 0 3 . 0

+ = y y y y y y

Q18. By means of Lagranges formula, prove that
( ) ( ) ( )
4 2 5 1 6 0 3
75 . 0 3 . 0 05 . 0 y y y y y y y + + + + =

Q19. If
9 3 2 1
.......... , , , y y y y are consecutive terms of a series then prove that
( ) ( ) ( ) ( )
9 1 8 2 7 3 6 4 5
70
1
35
4
5
2
5
4
y y y y y y y y y + + + + + =









Prof. OP Dogra ( 9876486598) www.mathematicsondemand.com 6

Hermite interpolation formula

Q1 Determine the Hermite poly of degree 4 which fits the following data & hence find
approximation values of ( ) 5 . 1 f
2 1 0 = x
( ) 0 1 0 = x f
( ) 0 0 0 ' = x f
Sol:
( ) ( ) ( )
( ) ( ) ( )
( ) i
x f x f x f
x f x f x f
x x x

= = =
= = =
= = =
0 ' , 0 ' , 0 '
0 , 1 , 0
2 , 1 , 0
2 1 0
2 1 0
2 1 0

Here n = 2
By Formula we get:
P(x) = ( ) ( ) | | ( ) | | ( ) ( ) ( ) | | ( ) ( ) ( )
1
2
1 1
'
1 1 0
2
0 0
'
0 0
2 1 2 1 x f x l x l x x x f x l x l x x +
( ) ( ) | | ( ) | | ( ) ( ) ( ) | | ( )
0
' 2
0 0 2
2
2 2
'
2 2
2 1 x f x l x x x f x l x l x x + +
( ) ( ) | | ( ) ( ) ( ) | | ( ) ( ) 2 '
2
2
2 2 1
' 2
1 1
+ + x f x l x x x f x l x x

Putting the values from (1) and (2)

( ) ( ) ( ) | | ( ) | | ( ) 3 ' 1 2 1
2
1 1 1 1
= x l x l x x P

( )
( ) ( )
( ) ( )
( ) ( )
( ) ( ) 1
2
2 1 0 1
2 0
2
2 1 0 1
2 0
1

=


=


=
x x x x
x x x x
x x x x
x l

( )
2
1
2 x x x l =
( ) x x l 2 2
'
1
= or ( ) 0 2 2 1
'
1
= = l
from (3) ( ) ( ) | | | | ( )
2
2
2
2
2 2 0 . 1 2 1 x x x x x x P = = (2)

Put x=1.5 , in Eq
n
(2)
( ) ( ) | | ( ) | | ( ) ( ) ( ) | | ( )

=
+

=
=
n
i
i i i i i
x f x l x x
i
x f
n
i
x
i
l x l
i
x x x P
0
2
'
0
2
) ( ' 2 1


Prof. OP Dogra ( 9876486598) www.mathematicsondemand.com 7

f(1.5)=[2(1.5)-2.25]
2
=[3-2.25]
2
=[.75]
2
=.5625

Q2. For the following data
1 5 . = x
( ) 1 4 = x f
( ) 2 16 ' = x f
Find the Hermite interpolation polynomial fitting the data.
Sol: 1 5 .
1 0
= = x x
( ) ( ) 1 4
1 0
= = x f x f
( ) ( ) 2 ' 16 '
1 0
= = x f x f
( )
( )
( )
( )
x x
x x
x x
x x
x l 2 2 2 2
2
1
1
1 5 .
1
1 0
1
0
= + =

=
( ) 1 2
2
1
2
1
5 . 1
5 .
0 1
0
1
=

= x
x
x
x x
x x
x l , ( ) ( ) 2 ' , 2 '
1 0
= = x l x l
( ) ( ) 2 , 2 '
1
'
1 0 0
= = x l x l

Now by Hermite interpolation polynomial
( ) ( ) ( ) | | ( ) | | ( ) ( ) ( ) | | ( )
=
+
=
=
n
i
i
x f x
i
l
i
x x
i
x f
n
i
x
i
l
i
x
i
l
i
x x x P
0
'
2
0
2
' 2 1

( ) ( ) | | ( ) | | ( ) ( ) ( ) | | ( ) | | ( )
1
2
1 1
'
1 1 0
2
0 0
'
0 0
2 1 2 1 x f x l x l x x x f x l x l x x + =
( ) ( ) ( ) ( ) ( ) ( ) | | ( )
1
' 2
1 1
' 2
0 0
x f x l x x x f x l x x + +
( ) ( ) ( ) ( ) | | | | ( ) 1 1 2 2 1 2 1 4 2 2 2
2
1
2 1
2 2
+
(


|
.
|

\
|
= x x x x
| | ( ) ( ) ( ) ( ) 2 1 2 1 16 2 2
2
1
2
+
|
.
|

\
|
+
2
x x x x
| | | || | ( ) ( ) 16 2 2
2
1 2
1 2 4 4 1 4 . 2 2 2
2
1 2
2 1
2 2 2

+ +
(


|
.
|

\
|

+ x
x
x x x
x
( ) ( ) ( ) 2 1 2 1
2
+ x x
( ) ( ) ( ) ( ) ( ) ( ) 16 1 4 .
2
1 2
1 2 4 5 4 . 1 4 . 2 4 1
2 2 2
x
x
x x x x

+ + =
( ) ( )
2
1 2 1 2 x x


Prof. OP Dogra ( 9876486598) www.mathematicsondemand.com 8



( ) ( ) ( ) ( )
( ) ( ) ( )( )
2 2
2 2
1 2 1 2 1 1 2 32
4 5 1 2 1 4 1 16

+ =
x x x x
x x x x

| | | | ( ) ( ) ( ) ( ) x x x x x x x x x 2 1 1 2 32 4 5 4 1 4 1 4 2 1 16
2 2 2
+ + + =
( ) ( ) x x x 4 1 4 1 2
2
+

3 2 2 2 3
16 20 5 20 32 16 16 128 64 64 x x x x x x x x + + + + =

| |
| | x x x x x
x x x x x x x
4 1 4 4 4 2
2 4 2 1 2 32 16 4
2 2 3
2 2 3 2
+ +
+ + +

After solving we get 23 66 68 24
2 3
+ + = x x x

Q3. A switching path between parallel rail road tracks is to be a cubic polynomial running
the position (0,0) , (4,2) and tangents to the lines y = 0 , y = 2. Using Hermitts
Method. Find the polynomial given.
4 0 = x , ( ) 2 0 = x f
( ) 0 0 ' = x f
Sol: 4 , 0
1 0
= = x x , ( ) ( ) 2 0
1 0
= = x f x f
( ) ( ) 0 0
1
'
0
'
= = x f x f
( )
( )
4
1
4 0
4
1 0
1
0
x x
x x
x x
x =

= , ( )
4 0 4
0
0 1
0
1
x x
x x
x x
x =

=
( ) ( )
4
1
,
4
1
'
'
1 0
=

x x
( ) ( ) ( ) | | ( ) | | ( )
( ) ( ) | | ( )
=
+

=
=
n
i
i
x f x
i
l
i
x x
i
x f
n
i
x
i
l
i
x
i
l
i
x x x P
0
'
2
0
2
' 2 1

( ) ( ) | | ( ) | | ( )
0
2
0 0
'
0 0
2 1 x f x x x x =
( ) ( ) | | ( ) | | ( )
1
2
1 1
'
1 1
2 1 x f x x x x +
( ) ( ) | | ( ) ( ) ( ) | | ( )
1
' 2
1 1
' 2
0 0
x f x x x x f x x x + +
( ) ( ) ( ) 2
4 4
1
. 4 2 1 0 .
4
1
4
1
. 0 2 1
2 2
(

+
(

=
x
x
x
x

Prof. OP Dogra ( 9876486598) www.mathematicsondemand.com 9
( ) ( ) 0 .
4
4 0 .
4
1 0
2 2
(

+
(

+
x
x
x
x
8
.
2
4
1 0
2
x x
(


+ =


( )
( )
2 2
2
6
16
1
16
16
8
.
2
4 2
x x x
x x x
=

=
|
.
|

\
|
+
=
Q4. A function ( ) x f satisfies the following conditions ( ) ( ) 1 0 , 1 0
'
= = f f
( ) ( ) 0 1 , 0 1
'
= = f f use Hermite interpolation to approximate ( ) x f by a polynomial
Also evaluate the Max. value of ( ) x f in [0 , 1].
Sol: 1 , 0
1 0
= = x x , ( ) ( ) 0 , 1
1 0
= = x f x f , ( ) ( ) 0 , 1
1
'
0
'
= = x f x f
( )
( )
x
x
x =

= 1
1 0
1
0
, ( )
( )
x
x
x =

=
0 1
0
1

( ) ( ) 1 , 1
'
1
'
0
= = x x , ( ) ( ) ( ) 1 , 1 , 1
1
'
1 0
'
1 0
'
0
= = = x x x
by using formula
( ) ( ) ( ) | | ( ) | | ( )
0
2
0 0
'
0
0 2 1 x f x x x x P =
( ) ( ) | | ( ) | | ( )
1
2
1 1
'
1
1 2 1 x f x x x +
( ) ( ) | | ( ) ( ) ( ) | | ( )
1
' 2
1
' 2
0
1 0 x f x x x f x x + +
( ) | | ( ) ( )( ) | | 0 . 1 1 2 1 1 . 1 1 2 1
2 2
x x x x + =
( ) ( ) ( ) 0 . 1 1 1
2 2
x x x x + +
( ) ( ) ( )
2 2
1 0 2 1 2 1 x x x x x + + + + =
| | x x x x x x x x 2 1 4 2 2 2 1
2 2 3 2
+ + + + + =
2 3 2 3
2 1 3 2 x x x x x + + + =
( ) 1 5 3
2 3
+ + = x x x x P
Now to find Max. value of ( ) | | 1 , 0 in x f
( ) 1 10 9
2 '
+ = x x x P , ( ) 10 18
' '
= x x P
Put ( ) get we x P 0
'
= ` 0 1 9 9 0 1 10 9
2 2
= + = + x x x x x
( ) ( ) 0 1 1 1 9 = x x x or ( ) ( )
9
1
, 1 0 1 9 1 = = x x x
at ( )
''
1 18
, 10 72
9 9
x P x x ve = = + = = =
9
1
= x at Max &
Max value is

243
256
9
1
=
|
.
|

\
|
P .


Prof. OP Dogra ( 9876486598) www.mathematicsondemand.com 10

Potrebbero piacerti anche