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

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

10 352 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 114,59 KB

Nội dung

Determine the step size that can be used in the tabulation of fx = sin x in the interval0, 4 π   at equally spaced nodal points so that the truncation error of the quadratic interpolat

Trang 1

10 If f(x) = 1

ax show that

f(x0, x1, x2, x3, x n) =

1 n

ax ax a x and f(x0, x1, x2, x3, x n , x)

1 n

ax ax ax ax

11 Certain corresponding values of x and log10 x are given as

10

: 300 304 305 307

log : 2.4771 2.4829 2.4843 2.4871

x

x

12 The following table gives the normal weights of babies during the first 12 months of life:

Find the weight of babies during 5 to 5.6 months of life [Ans 15.67]

13 Find the value of tan 33° by Lagrange’s formula if tan 30° = 0.5774, tan 32° = 0.6249, tan

14 Apply Lagrange’s formula to find f(5) and f(6) given that f(2) = 4, f(1) = 2, f(3) = 8, f(7) =

128 Explain why the result differs from those obtained by completing the series of powers

Let the function y(x), defined by the (n + 1) points (x i , y i )i = 0, 1, 2, n be continuous and differentiable (n + 1) times, and let y(x) be approximated by a polynomialφn (x) of degree not exceeding n such that

n

Now useφn (x) to obtain approximate value of y(x) at some points other than those defined

by (1) Since the expression y(x)–φn (x) vanishes for x = x0, x1, x n, we put

where πn+1 (x) = (x – x0) (x – x1) (x – x n) (3)

and L is to be determined such that equation (2) holds for any intermediate value of x, say

x = x’, x0 < x’ < x n clearly,

L = ( ) ( )

( )

1

n n

x

+

′ − φ ′

We construct a function F(x) such that

F(x) = y(x) –φn( )x – L.πn+1( )x (5)

Trang 2

where L is given by (4).

It is clear that

F(x0) = F(x1) = F(x n ) = F(x’) = 0 that is F(x) vanished (n + 2) times in the interval x0 ≤ x x n; consequently, by the repeated

application of Rolle’s theorem, F|(x) must vanish (n + 1) times, F|| (x) must vanish n times, etc.,

in the interval x0 < x < x n ; In particular, F (n + 1) (x) must vanish once in the interval Let this point

be given by x = ξ, x0 <ξ < x n On differentiating (5) (n + 1) times with respect to x and putting

x = ξ, we obtain

0 = y (n + 1)) – L (n + 1)!

1

1 !

n y n

On comparison of (4) and (6), we get

y(x’) –φn (x’) =

1

1 !

n y n

+ πn + 1 (x’) Dropping the prime on x′, we obtain

y (x) –φn (x) = ( )

( 11 !)

n

+

π + y (n + 1) ), x0 <ξ < x n (7) Which is the required Expression for error

5.3.1 Error in Lagrange’s interpolation formula

To estimate the error of Lagrange’s interpolation formula for the class of functions which have

continuous derivatives of order upto (n + 1) on [a, b] we use above equation 7 (Art 5.3).

Therefore we have,

y (x) – L n (x) = R n (x) = ( )

( 11 !)

n

+

π + y (n + 1) (ξ), a <ξ < b

and the quantity E L where

E L =

[ ],

max

a b |R n (x)|

may be taken as an estimate of error Further, if we assume that

(n 1)( )

y + ξ ≤ M n+ 1, a≤ ξ ≤ b

then E L ≤ ( 1 !1)

n M n

+

+ max[ ],

a b πn+1( )x

Example 1 Find the Value of Sin

16

π

 

  from the data given using by Lagrange’s interpolation formula Hence estimate the error in the solution.

sin : 0 0.70711 1.0

x

=

Trang 3

Sol sin

6

π

 

 

  =

0

0

(0.70711) +

0

0

(1)

= 8

9 (0.70711) –

1

9 =

4.65688

9 = 0.51743

Now, y(x) = sin x, y’(x) = cos x, y’’(x) = sin x, y’’’(x) = – cos x,

Hence, y′′′ ξ( ) < 1

When x = π/6

( )

n

R x

0

3!

 −   −   − 

where agrees with the actual error in problem

Example 2 Show that the truncation error of quadratic interpolation in an equidistant table is

bounded by

3

h

9 3 max f ξ where h is the step size and f is the tabulated function.

Sol Let x i –1 , x i , x i + 1 denote three consecutive equispaced points with step size h The

truncation error of the quadratic Lagrange interpolation is bounded by

2 ;

6

M

max (xx i−1)(xx i)(xx i+1)

where x i – 1 x x i + 1 and M3 = ( )

1 1

max

− ≤ ≤ ′′′

Substitute t = x x i

h

then,

x – x i – 1 = x – (x i – h) = x – x i + h = th + h = (t + 1) h

x – x i + 1 = x – (x i + h) = x – x i – h = th – h = (t – 1) h

and (x – x i – 1 ) (x – x i ) (x – x i + 1 ) = (t + 1) t(t – 1)h3 = t(t2 – 1) h3 = g(t)

Setting g(t) = 0, we get

3t2 – 1 = 0⇒ t = ± 1

3

For both these values of t, we obtain

max (xx i−1) (xx i)(xx i+1) = h3

1 1

max

t

− ≤ ≤ t (t2−1)= 2 3

3 3

h

Hence, the truncation error of the quadratic interpolation is bounded by

9 3

h

9 3

h

E f xf′′′ ξ

Trang 4

Example 3 Determine the step size that can be used in the tabulation of f(x) = sin x in the interval

0,

4

π

  at equally spaced nodal points so that the truncation error of the quadratic interpolation is less than

5 × 10 –8

Sol From Example 2, we know

9 3

h

For f(x) = sin x, we get f’’’ (x) = – cos x and M3 =

0 max/4 cos

Hence the step size h is given by

3

8

5 10 0.009

9 3

h

or h

5.3.2 Inverse Interpolation

We know different formulae for obtaining y corresponding to argument value of x (for equal and unequal spaced argument) On the other hand the process of Estimating the value of x for a entry value of y (which is not in the table) is called Inverse Interpolation In this case when the

values of x are unequally spaced, we use Lagrange’s method and when x are equally spaced, then

Iterative method should be employed

(a) Lagrange’s method for inverse interpolation: The only difference of this formula

from Lagrange’s method is that x is assumed to be expressible as a polynomial in y So on interchanging x and y in the Lagrange’s formula we have,

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

( 00) ( 11) ( 11)

n n

x

Which is the inverse interpolation formula

(b) Iterative method: Newton’s forward interpolation formula is

y u = y0 + uy0 + ( ) 2 ( )( ) 3

From this

0

1

u

y

On neglecting the second and higher order differences, we get first approximation to u as

u1 = 0

0

u

y

Trang 5

To find second approximation, retaining the term with second difference in (1) and replace

u by u1, we get

u2 =

0

1

y

1 2!

u

u u

Similarly, u3 =

0

1

y

u

This process is continued till two successive approximations of u agree with desired accuracy.

This technique can equally be also applied by starting with any other interpolation formula This method is a powerful iterative procedure for finding the roots of an equation to a good degree

Example 4 Using Inverse interpolation find the real root of the equation x 3 + x – 3 which is closed

to 1.2.

Sol

0.431

0.647

Let the origin be at 1.2 Using Stirling’s formula

1

y

y

(0.072)

u u

or 0 = – 0.072 + 0.533u + 0.036u2 + u (u2 – 1) (0.001)

From equation (1)

Neglecting all terms beyond the R.H.S of (2), we get

u(1) = 0.1353

Trang 6

Substitute u(1) for u in (2), we get second approximation

u(2) = 0.1341

u(1) and u(2) are nearly equal up to third decimal place so the required root is

x = uh + x0 = 1.2 + 0.1×0.134 Since u = x x0

h

= 1.2134

Example 5 Values of elliptic integral F(θ) =

2 0

d 2

1 cos

θ +

are given below:

( )

: 0.3706 0.4068 0.4433

F

θ

Findθ for which F(θ) = 0.3887.

Sol By inverse interpolation formula

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

(0.38870.3706 0.4068 0 38870.4068 0.3706)( 0.44330.4433) (0.3706)

= 7.884 + 17.20 – 3.087 = 22°

Example 6 From the given table

( )

: 20 25 30 35 : 0.342 0.423 0.5 0.65

x

y x

Find the value of x for y(x) = 0.390.

Sol By inverse interpolation formula,

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

x

+

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

+

(.342 423 342 5 342 65.39 423 39 5 39 65) ( )( ) ( )20 (.423 342 423 5 423 65(.39 342 39 5 39 65)( )( )( )( ) ) ( )25

+

.39 342 39 423 39 65 39 342 39 423 39 5

.5 342 5 423 5 65 65 342 65 423 65 5

+

= 22.84057797 Ans

Trang 7

Example 7 Find the value of x correct to one decimal place for which y = 7

y : 4 12 19

Sol Here we use Lagrange’s inverse interpolation formula i.e.,

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

4 12 4 19 12 4 12 19 19 4 19 12

= 0.5 + 1.9286 – 0.5714

x = 1.8572 Example 8 Tabulate y = x 3 for x = 2, 3, 4, 5 and calculate the cube root of 10 correct to three decimal places.

Sol For x = 2, y = 8

x = 3, y = 27

x = 4, y = 64

x = 5, y = 125 respectively.

Here h = 1 so form forward difference table

19

61

The first approximation is given by (using Newton’s Forward formula)

u1 =

0

1

y

(y u – y0) = 1

19 (10 – 8) = 0.1 The second approximation is

0

1 1

2!

u

u

y

= 1 ( )0.1 0.1 1( )

− −

= 0.15

Trang 8

The third approximation is

0

1

u

y

= 1 19

0.15 0 15 1 0.15 0.15 1 0.15 2

= 0.1532 Similarly fourth approximation is

u4 =

0

1

y

u

= 1 0.1532 0.1532 1( ) 0.1532 0.1532 1 0.1532( )( 2)

= 0.1541

and fifth approximation is

u5 = 0.1542

Hence u4≈ u5 (correct to 3 places of decimal)

We have to find cube root of 10 Since 10 lies between the value of y corresponding to x = 2 and x = 3, therefore the required value of 310 is x = x0 + uh

= 2 + 0.1541 × 1

x = 2.154 Ans

5.3.3 Expression of Function as a Sum of Partial Fractions

Example 9 Let f(x) = 3 x 2 2 x 3

+ −

Sol Consider φ(x) = x2 + x – 3 and tabulate its values for x = 1, –1, 2, we get

2

x

Using Lagrange’s formula, we get

f(x) = ( ) ( )

(1 1 1 21) ( 2) ( )1 ( (1 11)( )( 1 22) ) ( )3 ( (2 1 2 11)( )( 1) ) ( )3

= 1

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

1

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

f(x) = ( )

( 1)( 1)( 2)

x

φ

= 2(x1 1) (−2 x1 1)+x12

Trang 9

Example 10 Show that the sum of Lagrangian co-efficients is unity.

Sol Let ∏( )x = (x x− 0)(x x− 1) (x xn)

The reciprocal of ∏( )x ⇒ ( ) ( 0)( 1) ( )

n

Let

1 n

xx xx xx = 0 0 11 2 2 n n

x x + x x +x x + + x x

= 0

n i i i

A

x x

∑ (This can be expressible as partial fractions.)

1

is obtained by taking L.C.M of (1) and setting x = x i

A i can be written as A i = ( )1( )

i

at x x

∏ = ∏′1( )xi

From (1)

( )

1

x

n

i= Π′ x xx

∑ Multiply both sides by ∏( )x , we get

0

n

i

x

x x x

=

0

n i i

L x

=

∑ Proved

PROBLEM SET 5.2

1 Given that y10 = 1754, y15 = 2648, y20 = 3564, find the value of x for y = 3000 by using,

2 Given that

: 1.8 2.0 2.2 2.4 2.6 : 2.9 3.6 4.4 5.5 6.7

x y

Find x when y = 5 using iterative interpolation formula.

3 Using inverse interpolation find the real root of the equation x3 – 15x + 4 = 0 close to 0.3

4 Find the value ofθ if f(θ) = 0.3887 from the table given below:

( ) 0.3706 0.4068 0.443321 23 25

f

5 Find x when f(x) = 14 for the following data using Lagrange’s inverse interpolation formula.

( )

16.35 14.88 13.59 12.46

x

Trang 10

6 Using Lagrange’s interpolation formula express the function( )( )( )

2

+ +

7 Express the function

2 2

6 1

− − − as a sum of partial factions using Lagrange’s

interpolation formula 5(x1 1) 35(x3 1) 10(13x 4) 70(71x 6)

8 From the following data find the value of x corresponding to y = 12 using Lagrange’s

technique of inverse interpolation

: 1.2 2.1 2.8 4.1 4.9 6.2 : 4.2 6.8 9.8 13.4 15.5 19.6

x

9 Obtain the values of t when A = 85 from the following table using Lagrange’s Method of

inverse interpolation

: 94.8 87.9 81.3 68.7

t

When the values of the argument are given at unequal spaced interval, then the various differences will also be affected by the changes in the values of the argument The differences defined by taking into consideration the changes in the values of argument are known as divided differences where as the difference defined earlier are called ordinary differences Lagrange’s interpolation formula has the disadvantage that if any other interpolation point were added, the interpolation co-efficient will have to be recomputed So an interpolation polynomial, which has the property that

a polynomial of higher degree may be derived from it by simply adding new terms, in Newton’s divided difference formula

Let (x0, y0), (x1, y1), (x2, y2) (x n , y n ) be given (n + 1) points Let y0, y1, y2, y n be the values

of the function corresponding to the values of argument x0, x1, x2, x n which are not equally spaced Since the difference of the function values with respect to the difference of the arguments are called

divided differences, so the first divided difference for the arguments x0, x1, is given by

f(x0, x1) =

1

x

y1 = [x0, x1] = 1 0

y y

x x

Similarly f(x1, x2) =

2

xy1 = [x1, x2] = 2 1

− and so on.

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