1. Trang chủ
  2. » Công Nghệ Thông Tin

A textbook of Computer Based Numerical and Statiscal Techniques part 25 ppsx

10 373 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 124,86 KB

Nội dung

Show that the maximum is obtained by Sol... Applying Lagrange’s formula, find a cubic polynomial which approximate the following data Sol... Hence the result... Find the unique polynomia

Trang 1

Example 1 Using Lagrange’s formula, find the value of

(i) y x if y 1 = 4, y 3 = 120, y 4 = 340, y 5 = 2544,

(ii) y 0 if y –30 = 30, y –12 = 34, y 3 = 38, y 18 = 42,

Sol (i) Here, x0 = 1, x1 = 3, x2 = 4, x3 = 5,

f(x0) = 4, f(x1) = 120, f(x2) = 340, f(x3) = 2544,

Now using Lagrange’s interpolation formula, we have

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

+

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

+

(1 3 1 4 1 53)( 4)( 5) 4 ( ( )(3 1 31)( 4 34)( )( 55) ) 120

( )( )( ) ( ( ) ( )( ) ( )( ) )

y x = f(x) = –1

6 (x – 3) (x – 4) (x – 5) + 30 (x – 1) (x – 4) (x – 5)

– 340

3 (x – 1) (x – 3) (x – 5) + 318 (x – 1) (x – 3) (x – 4)

(ii) Here, x0 = – 30, x1 = – 12, x2 = 3, x3 = 18,

y0 = 30, y1 = 34, y2 = 38, y3 = 42, Now from Lagrange’s interpolation formula, we have

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

+

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

+

(3 3030 3 12 3 18)( 12)( 18) 38 (18( 30 18 12 18 330)( )( 12)( )( 3) ) 42

y x = – 0.001052188 (x + 12) (x – 3) (x – 18) + 0.00419753 (x + 30) (x – 3) (x – 18)

– 0.005117845 (x + 30) (x + 12) (x – 18) + 0.001944444 (x + 30) (x + 12) (x – 3)

for x = 0

y0 = – 0.001052188 (12) (–3) (–18) + 0.00419753 (30) (–3) (–18)

– 0.005117895 (30) (12) (–18) + 0.001944444 (30) (12) (–3)

Trang 2

y0 = – 0.681817824 + 6.7999986 + 33.1636356 – 2.09999952

y0 = 39.9636546 – 2.781817344

y0 = 37.1818 Ans

Example 2 If y 0 , y 1 , y 2 , y 3 y 9 are consecutive terms of a series Prove that y 5 = 1

70

[56(y 4 + y 6 ) – 28 (y 3 + y 7 ) + 8 (y 2 + y 8 ) – (y 1 + y 9 )]

Sol Here, the arguments are 1, 2, 3, 9 so for these values Lagrange’s formula is given by

( 1)( 2)( 3)( 4)( 6)( 7)( 8) ( 9)

x

y

=

( 1) ( )( )( ) ( ) ( )( )( )1 2 31 5 6 7 8

y

2

2 1 1 2 4 5 6 7

y x

+

( −3 2 1) ( ) ( ) ( ) ( )( )( )−1 −33 −4 −5 −6

y

x + ( 4 3.2.1) ( ) ( ) ( ) ( )24 3 4 5

y

+

( 6 5.4.3.2) ( )( )( )6 1 2 3

y

x− − − − + ( 7)6.5.4.3.1( 2)( 1)7

y

x− − − + ( 8 7.6.5.4.2.1) 8 ( )1

y

( 9 8.7.6.5.3.2.1) 9 ( 1) ( 2)( 3)( 4)( 6)( 7)( 8)( 9)

x

+

=

( 1 10080)1( ) ( 2 1680)2( ) 720(3 3) 720(4 4) 720(6 6)

y

x

Now for y5, put x = 5

4 3 2 1 1 2 3 4 4 10080 3 1680 720 2

5

576

y

40320 5040 1440 720 720 1440 5040 40320

5

576

y

720 y +y −1440 yy + 5040 y +y − 40320 y +y

720 y +y −1440 y +y + 5040 y +y − 40320 yy

1

y5 = 1

70 [56 (y4 + y6) – 28 (y3 + y7) + 8 (y2 + y8) – (y1 + y9)]. Proved

Trang 3

Example 3 Find f(x) as a polynomial of x if

Sol Now from Lagrange’s interpolation formula,

(7 11 7)( 00 7)( 63 7)( 63) 1611

×

P(x) = 3

224 x(x – 3) (x – 6) (x – 7) +

6

126 (x + 1) (x – 3) (x – 6) (x – 7) + 39

144 (x + 1)x (x – 6) (x – 7) –

822

126 (x + 1)x (x – 3) (x – 7) +

1611

224 (x + 1)x (x – 6) (x – 3)

P(x) = 3

224 (x4 – 16x3 + 81x2 – 126x) +

39

144 (x4 – 12x3 + 29x2 + 42x)

+ 6

126 (x4 – 15x3 + 23x2 – 45x – 126) – 822

126 (x

4 – 9x3 + 11x2 + 21x) + 1611

224 (x

4 – 8x3 + 9x2 + 18x)

+ x2 3 81 39 29 23 6 822 11 9 1611

+ x− ×45 6126 −126 3224× +39 42144× −822 21126× −1611 18224× −6

P(x) = x4(1) + x3 (–3) + x2(5) – 6

P(x) = x4 – 3x 3 + 5x2 – 6 which is the required polynomial

Example 4 Value of f(x) are given at a, b, c Show that the maximum is obtained by

Sol Here, x0 = a, x1 = b, x2 = c,

f(x0) = f(a), f(x1) = f(b), f(x2) = f(c)

By applying Lagrange’s formula, we have

f(x) = ( )( )

(x a b b)(x a c c) f a( ) ( (x b a a b)( )(x c c) ) f b( ) ( (x c a x a c) ( ) ( b b) )f c( )

Trang 4

f(x) = ( )

For maximum, we have

f’(x) = 0

( )( ) ( ( )( ) ( ) ) ( ( )( ) ( ) )

= {2x – (b + c)} (b – c) f(a) + {2x – (a + c)} (c – a) f(b) + {2x – (a + b)}(a–b) f (c) = 0

= 2x [(b – c) f(a) + (c – a) f(b) + (a – b) f(c)] = (b2 – c 2 ) f(a) + (c2 – a2) f(b) + (a2 – b2) f(c)

(3 2 ≠ 0)

Example 5 Applying Lagrange’s formula, find a cubic polynomial which approximate the following

data

Sol Now, using Lagrange’s formula, we have

+

(222 2 1 2)( 1 )( 33)3 ( (32)(2 3 1 3 2)( 1)( )( 2) )5

+

5 xx + −x − 3xxx+ − 4xx− +4 x +xx− 

f(x) = – 1 3 3 2 241 3.9

15x −20x + 60 x

Example 6 (i) Determine by Lagrange’s formula, the percentage number of criminals under 35

years:

(ii) Find a Lagrange’s interpolating polynomial for the given data:

x 0 = 1, x 1 = 2.5, x 2 = 4, and x 3 = 5.5 f(x 0 ) = 4, f(x 1 ) = 7.5, f(x 2 ) = 13 and f(x 3 ) = 17.5 also, find the value of f(5)

Trang 5

Sol (i) Here x0 = 25, x1 = 30, x2 = 40 and x3 = 50

f(x0) = 52, f(x1) = 67.3, f(x 2 ) = 84.1 and f(x 3) = 94.4

By using Lagrange’s interpolation formula, we have

(25 30 2530)( 4040 25)( 5050) 52 (30( 25 3025) ( )( 4040 30) ( )( 5050) ) 67.3

(40 25 4030)( 2530)(405050) 84.1 (50( 25 5025)( )( 3030 50)( ) ( 4040) ) 94.4

Now for f(35), put x = 35

f(35) = ( ) ( ) ( )

( ) ( ) ( ) ( ) ( ) ( ( ) ( ) ( ) ) ( ) ( ) ( ( ) ( ) ( ) ) ( ) ( ) ( ) ( ) ( ) ( )

f(35) = – 10.5 + 50.475 + 42.05 + 4.72

f(35) = 77.405

(ii) By using Lagrange’s formula, we have

(1 2.5 1 4 1 5.52.5)( 4)( 5.5) 4 (2.5 1 2.5( 1)( ) ( 44 2.5)( )( 5.55.5) ) 7.5

4 1 4 2.5 4 5.5 5.5 1 5.5 2.5 5.5 4

Put x = 5

f(5) = ( )( )( )

( )( )( ) ( )( )( )

20.25−6.75+6.75+20.25 = 0.246913 – 2.2222 + 9.62962 + 8.641975

f(5) = 18.51850831 – 2.222222 = 16.296296. Ans

+ ( 13)

6.75

(x – 1) (x – 2.5) (x – 5.5) + 17.5

20.25 (x – 1) (x – 2.5) (x – 4)

P(x) = – 0.1481x3 + 1.5555x2 – 1.6666x + 4.2592

which is a required polynomial

At x = 5, f(x) = 16.3012 (Approx.)

Example 7 By means of Lagrange’s formula, show that

(i) y 0 = 1

2 (y 1 – y –1 ) –

1

Trang 6

(ii) y 3 = 0.05 (y 0 + y 6 ) – 0.3 (y 1 + y 5 ) + 0.75 (y 2 + y 4 )

(iii) y 1 = y 3 – 0.3 (y 5 – y –3 ) + 0.2 (y –3 – y –5 )

Sol (i) For the arguments – 3, –1, 1, 3, the Lagrange’s formula is

+

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

+

+

+

Putting x = 0 in (1), we get

y0 = –161 y–3 + 169 y -1 +169 y1 – 161 y3

= 1

2 (y1 + y–1) –1

8 ( 3 1) ( 1 3)

2 y y 2 yy

(ii) For the arguments 0, 1, 2, 4, 5, 6, the Lagrange’s formula is

( ) ( ) ( ) ( ) ( )

+

+

+

Putting x = 3 in (2), we get

y3 = 0.05 y0 – 0.3 y1 + 0.75 y2 + 0.75 y4 – 0.3 y5 + 0.05y6

y3 = 0.05 (y0 + y6) – 0.3 (y1 + y5) + 0.75 (y2 + y4)

(iii) For the arguments –5, –3, 3, 5, the Lagrange’s formula is

+

( ) ( )( ) 3 ( ( )( )( )( )( ) ) 5

+

Putting x = 1 in equation (3), we get

y1 = (–0.2) y–5 + 0.5 y–3 + y3 – 0.3y5

= y3 – 0.3 (y5 – y–3) + 0.2 (y–3 – y–5)

Trang 7

Example 8 Prove that Lagrange’s formula can be expressed in the

( )

( ) ( ) ( )

2 n n

2 n

2 n

2 n

P x | x x x

= 0

where P n (x) = f(x).

Sol Let P n (x) = a0 + a1x + a2x2 + a n x n (1)

Given that P n (x) = f(x)

Substitute x = x0, x1, x2, x n Successively in equation (2)

f(x0) = a0 + a1x0 + a2x2

0+ + a n x0n

f(x1) = a0 + a1x1 + a2x12 + + a n x1n

f(x n ) = a0 + a1x n + a2x2

n + + a n x n

n Now Eliminating a0, a1, a2 , a n from above equations, we get

( ) ( ) ( ) ( )

2 2

2

2

|

|

|

|

n n

n n

n

( ) ( ) ( ) ( )

2 2

2

2

n n

n n

n

= 0

Example 9 Four equidistant values u –1 , u 0 , u 1 and u 2 being given, a value is interpolated by Lagrange’s formula show that it may be written in the form.

u x = yu 0 + xu 1 + y y( 2 1)

3!

2 u –1 + x x( 2 1)

3!

2 u 0 where x + y = 1.

Sol ∆2u1= (E – 1)2 u–1 = (E2 – 2E + 1) u–1 = u1 – 2u0 + u–1

∆2u0 = (E2 – 2E + 1) u0 = u2 – 2u1 + u0

R.H.S = (1 – x) u0 + xu1 +( ) ( { )2 }

3!

(u1 – 2u0 + u–1)

+ ( 2 1)

3!

(u2 – 2u1 + u0) where y = 1 – x

2

6

u

Trang 8

Applying Lagrange’s formula for the arguments – 1, 0, 1 and 2.

( )( ) ( )

From (1) and (2), we observe that R.H.S = L.H.S

Hence the result

Example 10 Find the cubic Lagrange’s interpolating polynomial from the following data

( )

: 0 1 2 5 : 2 3 12 147

x

f x

Sol Here, ( )00 ( )11 ( )22 ( )33

Lagrange’s formula is

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

+

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

f(x) = ( ) ( ) ( )

( )( ) ( ) ( )

+

( )( )( ) ( ) ( ( )( )( ) ( )( ) ) ( )

= 1

5

(x – 1) (x – 2) + 3

4x (x – 2) (x – 5) – 2x (x – 1) (x – 5) +

49

20x (x – 1) (x – 2)

= – 1

5 (x

3 – 8x2 + 17x – 10) +3

4 (x

3 – 7x2 + 10) – 2 (x3 – 6x2 + 5x)

+ 49

20 (x

3 – 3x2 + 2x)

f(x) = x3 + x2 – x + 2

which is the required Lagrange’s interpolating polynomial

Example 11 The function y = f(x) is given at the points (7, 3), (8, 1), (9, 1) and (10, 9) Find

the value of y for x = 9.5 using Lagrange’s interpolation formula.

Sol We are given

( )

: 7 8 9 10 : 3 1 1 9

x

f x

Trang 9

Here, ( )00 ( )11 ( )22 ( )33

Lagrange’s interpolation formula is

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

+

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

+

( ) ( ) ( ) ( ) ( ( ) ( ) ( ) ( ) ( ) ) ( ) ( ( ) ( ) ( ) ( ) ( ) ) ( )

9

10 7 10 8 10 9

+

= – 1

2 (x – 8) (x – 9) (x – 10) +

1

2 (x – 7) (x – 9) (x – 10) –

1

2 (x – 7) (x – 8) (x – 10) + 3

2 (x – 7) (x – 8) (x – 9) .(1)

Putting x = 9.5 in eqn (1), we get

f (9.5) = –1

2 (9.5 – 8) (9.5 – 9) (9.5 – 10) +

1

2 (9.5 – 7) (9.5 – 9) (9.5 – 10) – 1

2 (9.5 – 7) (9.5 – 8) (9.5 – 10) +

3

2 (9.5 – 7) (9.5 – 8) (9.5 – 9)

= 3.625

Example 12 Find the unique polynomial P(x) of degree 2 such that:

Use Lagrange’s method of interpolation.

Lagrange’s interpolation formula is

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

(1 3 1 43)( 4) ( )1 ( (3 1 31)( )( 44) ) ( )27 ( (4 1 41)( )( 33) ) ( )64

= 1

6 (x

2 – 7x + 12) – 27

2 (x

2 – 5x + 4) + 64

3 (x

2 – 4x + 3)

= 8x2 – 19x + 12

Hence the required polynomial is,

P(x) = 8x2 – 19x + 12

Trang 10

PROBLEM SET 5.1

1 Using Lagrange’s interpolation formula, find y(10) from the following table.

: 5 6 9 11 : 12 13 14 16

X

2 Use Lagrange’s interpolation formula to fit a polynomial for the data

: 1 0 2 3 : 8 3 1 12

x

x u

Hence or otherwise find the value of u1 [Ans ux = 2x3 – 6x2 + 3x + 3, u1 = 2]

3 Compute the value of f(x) for x = 2.5 from the following data:

( ) : 1 2: 1 8 27 643 4

x

f x

4 If y(1) = – 3, y(3) = 9, y(4) = 30 and y(6) = 132, find the four point Lagrange’s interpolation polynomial which takes the same values as the function y at the given points.

[Ans x3 – 3x2 + 5x – 6]

5 Find the polynomial of degree three which takes the values given below:

: 0 1 2 4 : 1 1 2 5

x

4x

2 – 2

3x + 1]

6 Find f(x) by using Lagrange’s interpolation formula:

( )

: 659 705 729 804

x

f x

Also find maximum value of f(x) [Ans 151

24 x

3 – 249

8 x

2 + 721

12 x + 659]

[No real value of x exist for which f(x) is max.]

7 Given log10 654 = 2.8156, log10 658 = 2.8182, log10 659 = 2.8189 and log10 661 = 2.8202 Find log10 656 by Lagrange’s interpolation formula [Ans 2.8169]

8 Compute Sin 15° by Lagrange’s Method from the data given below:

: 0.0000 0.50000 0.70711 0.86603 1.0000

x

y

[Ans 0.25859]

9 The percentage of Criminals for different age group are given below:

Apply Lagrange’s formula to find the percentage of criminals under 35 years of age

[Ans 77]

Ngày đăng: 04/07/2014, 15:20

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w