Bab 10

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Bab 10 as PDF for free.

More details

  • Words: 4,622
  • Pages: 13
BACS 1263

Mathematics for Computer Science II

9-13 March 2009

Lecture 10: Interpolation Interpolation means to find the approximate values of a function f(x) (when the analytical form of f(x) is unknown) for an x between different x-values at which the values of f(x) are given. For this purpose, a polynomial Pn (x ) that takes the given values, Pn ( x0 ) = f ( x0 ), Pn ( x1 ) = f ( x1 ),..., Pn ( x n ) = f ( x n ) is used to approximate f(x). x0 ,..., x n are n given data points and Pn (x) is known as interpolating polynomial. Pn (x) will then be used to get the approximate values of f(x) for any x between x0 and xn . If Pn (x) is used to approximate values of f(x) for x outside the interval x0 and xn , then the process is known as extrapolation. In this section, we are going to study two common methods in determining the interpolating polynomial: (i) Lagrange interpolating polynomial (or in short, LIP) (ii) Newton’s divided-difference interpolating polynomial (or in short, NDDIP) The polynomial obtained by these methods passes exactly through all the points. There are other methods of interpolation, such as piecewise polynomial interpolation that are very useful in sketching smooth curves. In certain cases when the data is suspected to be inaccurate, a technique based on statistical theory called last squares is employed. This technique finds the “best function” in a certain class (polynomial, or some other kind of approximating functions) that do not fit exactly to all the given points to represent the data.

10.1

Lagrange Interpolating Polynomial (LIP)

The strategy used is straight-forward. When there are two distinct points, the polynomial obtained leads to the familiar linear interpolation (the straight line equation). Degree 1 Given two distinct points ( x 0 , y 0 ), ( x1 , y1 ) with x0 ≠ x1 , the polynomial of degree one that passes through these two points is given as x − x0 x − x1 P1 ( x) = y0 + y1 . x0 − x1 x1 − x0 Defining L0 ( x) =

x − x0 x − x1 . If P1 ( x) is to passed through the two and L1 ( x) = x1 − x0 x0 − x1

⎧0 k ≠ i for i, k =0,1. given points, then Lk ( x ) = ⎨ ⎩1 k = i ,

1

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

Thus the linear Lagrange interpolating polynomial (LIP)passing through ( x0 , y0 ) and ( x1 , y1 ) can be written as P1 ( x) = L0 ( x) y0 + L1 ( x) y1. We will be interested in polynomials of degree at most n that passes through the given n+1 distinct points. Degree ≤ n Given arbitrarily spaced data points ( x0 , y0 ),..., ( xn , yn ) , we take the LIP in the form as Pn ( x) = L0 ( x) y0 + L1 ( x) y1 + ...Ln ( x) yn .

Since Pn (x) is to pass through all the given points, that is Pn ( xk ) = yk , k = 0,..., n. ⎧ 0 k ≠i We must have Lk ( xi ) = ⎨ for i, k = 0,1,..., n. ⎩ 1 k =i To satisfy Lk ( xi ) = 0 for each k ≠ i, the numerator of Lk (x) must take the terms ( x − x0 )( x − x1 )...( x − xk −1 )( x − xk +1 )...( x − xn )

To satisfy Lk ( xk ) = 1 when k = i, the dominator of Lk must agree with Pn ( xk ) = yk , k = 0,..., n. This gives us

( x − x0 )...( x − xk −1 )( x − xk +1 )...( x − xn ) n ( x − xi ) . Lk (x) = ∏ ( xk − x0 )...( xk − xk −1 )( xk − xk +1 )...( xk − xn ) i=0 ( xk − xi ) i ≠0

In summary, if x0 , x1 ,..., x n are n+1 distinct numbers and f the corresponding function values, then there exists a polynomial with the property that Pn ( xk ) = f ( xk ), k = 0,..., n.

This polynomial is given as below: The nth Lagrange interpolating polynomial (LIP) is n

f ( x) ≈ Pn ( x) = ∑ Li ( x) f ( xi ) i =0

with Lk (x) =

( x − x0 )...( x − xk −1 )( x − xk +1 )...( x − xn ) n ( x − xi ) . ∏ ( xk − x0 )...( xk − xk −1 )( xk − xk +1 )...( xk − xn ) i=0 ( xk − xi ) i ≠0

2

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

Example 10.1.1 Given the nodes x0 = 2, x1 = 3, and x2 = 5, find the Lagrange interpolating polynomial 1 for f ( x) = 2 . Hence, use quadratic the Lagrange interpolating polynomial to find x the interpolated value for x=4.

Solution The Lagrange interpolating polynomial is P2 ( x) = L0 ( x) f ( x0 ) + L1 ( x) f ( x1 ) + L2 ( x) f ( x 2 ) 1 1 1 = 2 L0 ( x) + 2 L1 ( x) + 2 L2 ( x) 2 3 5

where L0 ( x) =

( x − 3)( x − 5) ( x − 3)( x − 5) = (2 − 3)(2 − 5) 3

L2 ( x ) =

( x − 2)( x − 3) ( x − 2)( x − 3) . = (5 − 2)(5 − 3) 6

Carrying out the arithmetic, P2 (4) =

L1 ( x) =

( x − 2)( x − 5) ( x − 2)( x − 5) = (3 − 2)(3 − 5) −2

37 . 900

1 . 16 1 37 − 77 Thus, the relative error for P2 (4) is 16 900 = ≈ 0.342222. 1 225 16 The actual function value at x=a is f (4) =

10.2

Newton’s Divided-difference Interpolating Polynomial (NDDIP)

Divided-Difference Definition 10.2.1 Given two distinct real numbers x0 and x1 , the first order divided-difference is defined as f [ x1 ] − f [ x0 ] , f [ x 0 , x1 ] = x1 − x0 with f [ xi ] = f ( xi ).

3

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

The higher order divided-differences are defined by using lower order divideddifference recursively. For example, the second order divided-difference for three distinct real numbers x0 , x1 , x2 is defined as f [ x1 , x2 ] − f [ x0 , x1 ] f [ x0 , x1 , x2 ] = . x2 − x0 Generally, the kth order divided-difference is formally defined as below:

Definition 10.2.2 The kth divided-difference f [ xi , xi +1 ,..., xi + k −1 , xi + k ] on k+1 distinct points xi , xi +1 ,..., xi + k of a function f(x) is defined by f [ xi +1 ,..., xi + k ] − [ xi ,..., xi + k −1 ] f [ xi , xi +1 ,..., xi + k −1 , xi + k ] = xi + k − xi

for i + ≥ 2. The divided-difference for a set of distinct data points can also be represented in tabular form, known as divided-difference table.

x x0

f (x ) f ( x0 )

First divided-difference f [ x0 , x1 ] =

x1

f ( x1 ) f [ x1 , x2 ] =

x2

x3

f ( x3 ) f [ x3 , x4 ] =

x4

f ( x4 ) f [ x4 , x5 ] =

x5

f [ x1 ] − f [ x0 ] x1 − x0 f [ x2 ] − f [ x1 ] x2 − x1

f ( x2 ) f [ x2 , x3 ] =

f ( x5 )

Second-divided-difference

f [ x3 ] − f [ x2 ] x3 − x2 f [ x4 ] − f [ x3 ] x4 − x3 f [ x5 ] − f [ x4 ] x5 − x4

Third-divided-difference

f [ x0 , x1, x2 ] =

f [ x1, x2 ] − f [ x0 , x1 ] x2 − x0

f [ x0 , x1, x2 , x3 ] =

f [ x1, x2 , x3 ] − f [ x0 , x1, x2 ] x3 − x0

f [ x1, x2 , x3 ] =

f [ x2 , x3 ] − f [ x1, x2 ] x3 − x1

f [ x1, x2 , x3 , x4 ] =

f [ x2 , x3 , x4 ] − f [ x1, x2 , x3 ] x4 − x1

f [ x2 , x3 , x4 ] =

f [ x3 , x4 ] − f [ x2 , x3 ] x4 − x2

f [ x2 , x3 , x4 , x5 ] =

f [ x3 , x4 , x5 ] − f [ x2 , x3 , x4 ] x5 − x2

f [ x3 , x4 , x5 ] =

f [ x4 , x5 ] − f [ x3 , x4 ] x5 − x3

4

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

Example 10.2.3 Construct the divided-differences table for f (x ) with f (0) = 1 , f (1) = 1 , f (3) = 2 and f (6) = 5

Solution xi

f ( xi )

0

1

1

1

2

3

5

6

f [ xi , xi +1 ]

f [ xi , xi +1 , xi + 2 ]

1−1 = 0 1− 0

1 −1 1 2 = 3− 0 6

2 −1 1 = 3−1 2

f [ xi , xi +1 , xi + 2 , xi + 3 ]

1 1 − 10 6 = − 1 6 − 0 90

1 2 = 1 6 −1 10

1−

2 −1 1 = 3−1 2

NDDIP for Arbitrarily Spaced Data Points We are now ready to establish the NDDIP for a given set of data as below: x f (x) x0 f ( x0 ) x1 : xn

f ( x1 ) : f ( xn )

Note that we do not assume that x’s are evenly spaced or they are arranged in any particular order. Consider a polynomial written in a specific way: Pn ( x) = a0 + a1 ( x − x0 ) + a2 ( x − x0 )( x − x1 ) + ... + an ( x − x0 )( x − x1 )...( x − xn −1 ). We want to show that coefficients ai are given by the divided-difference. Substitute x = xi , i = 0,..., n to Pn (x), we have the followings: x = x0 :

Pn ( x0 ) = a 0 ,

x = x1 :

Pn ( x1 ) = a0 + a1 ( x1 − x0 ),

M x = xn :

Pn ( x n ) = a0 + a1 ( x n − x0 ) + ... + a n ( x n − x0 )( x n − x1 )...( x n − x n −1 )

5

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

Since Pn (x) is the interpolating polynomial, it must pass through exactly all the points. Thus, we have x = x0 : Pn ( x0 ) = a 0 = f ( x0 ), or a 0 = f [ x0 ] in divided-difference notation. f ( x1 ) − f ( x0 ) x = x1 : If a1 = f [ x0 , x1 ], then Pn ( x1 ) = f ( x 0 ) + ( x1 − x 0 ) = f ( x1 ). ( x1 − x0 ) x = x2 : If a2 = f [ x0 , x1 , x2 ], then f ( x1 ) − f ( x0 ) Pn ( x2 ) = f ( x0 ) + ( x2 − x0 ) ( x1 − x0 ) f ( x2 ) − f ( x1 ) f ( x1 ) − f ( x0 ) − x2 − x1 x1 − x0 + ( x2 − x0 )( x2 − x1 ) = f ( x2 ). ( x2 − x0 )

Proceed similarly, we will see that Pn ( x n ) = f ( x n ) if ai = f [ x0 , x1 ,..., xi ] . As such, with the divided-difference notation, the interpolating polynomial can be written as follows:

Newton’s divided-difference interpolating polynomial n

Pn ( x) = f [ x0 ] + ∑ f [ x0 , x1 ,..., x k ]( x − x0 )...( x − x k −1 ). k =1

Example 10.2.4

1 , with the x2 nodes x=2,3 and 5. hence, use the Newton’s divided-difference interpolating polynomial to find the interpolated value for x= 4. Find the Newton’s divided-difference interpolating polynomial for f ( x) =

Solution Step 1: Construct the divided-difference table. i

xi

0

2

1

3

2

5

f [ xi ] 1 4 1 9 1 25

f [ xi , xi +1 ] −5 36 −8 225

f [ xi , xi +1 , xi + 2 ]

31 900

6

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

Step 2: Write down the NDDIP The coefficients used are along the upper diagonal in the table. Thus, the NDDIP is P2 ( x) = f [ x0 ] + f [ x0 , x1 ]( x − x0 ) + f [ x0 , x1 , x 2 ]( x − x0 )( x − x1 ) 1 5 31 = − ( x − 2) + ( x − 2)( x − 3). 900 4 36 Step 3: Find the interpolated value. 1 5 31 37 When x=4, we have P2 (4) = − (4 − 2) + (4 − 2)(4 − 3) = . 900 4 36 900 Remarks: Note that the approximate value of P2 (4) obtained above is the same as those obtained based on LIP (example 4.4.1.1). Actually, we will not get a different polynomial by different formula. As will be shown later on in section 4.4.3, every nth-degree polynomial that passes through the same n+1 points is identical. Only the way that the polynomial is expressed is different. The Lagrange form is usually used for deriving formulas for approximating derivatives and interpolating the tables with small number of entries. The Newton’s polynomial is suitable for computation and is also used for deriving formulas for solving differential equations.

One of the advantages of the NDDIP is that it is easy to add more data points so as to try a higher order polynomial. For example, we have P1 ( x) = f ( x0 ) + f [ x0 , x1 ]( x − x0 ), P2 ( x) = f ( x0 ) + f [ x0 , x1 ]( x − x0 ) + f [ x0 , x1 , x 2 ]( x − x0 )( x − x1 ) = P1 ( x) + f [ x0 , x1 , x 2 ]( x − x0 )( x − x1 ), M In general for n ≥ 0, Pn +1 ( x) = Pn ( x) + f [ x0 , x1 ,..., xn , xn +1 ]( x − x0 )...( x − xn ). Thus in NDDIP if we desire to add a point to get a polynomial of one degree higher, says Pn +1 ( x) , we just have to add an additional term to Pn (x) . However, in LIP, we have to start all over in the computations. Observe that the form of NDDIP also allows us to determine the degree of the interpolating polynomial easily, the degree is based on the highest order of the leading divided-difference that can be obtained from the table. However, the degree of the LIP can only be known after we express the polynomial into the general from to obtain its highest order coefficient.

7

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

Example 10.2.5

Consider the table in example 4.4.2.4. If f (4) =

1 is added to the table, find the new 16

interpolating polynomial.

Solution With the addition of f (4) = i

xi

0

2

1

3

2

3

1 , the divided-difference table is expanded as follows: 16 f [ xi ] f [ xi , xi +1 ] f [ xi , xi +1 , xi + 2 ] f [ xi , xi +1 , xi + 2 , xi +3 ] 1 4 −5 36 1 9

5

4

1 25

−8 225 −9 400

31 900

− 77 7200

47 3600

1 16 The NDDIP is 77 ( x − 2)( x − 3)( x − 5) 7200 31 77 1 5 = − ( x − 2) + ( x − 2)( x − 3) − ( x − 2)( x − 3)( x − 5). 4 36 900 7200

P3 ( x) = P2 ( x) −

Newton Forward-Difference Formula (for equally spaced data) When the data points x are evenly spaced, the formulas for Newton’s divided-difference interpolating polynomial can take simpler form by introducing the forward difference notation.

Consider the case where x = x0 + sh and h = xi +1 − xi , the NDDIP can be written into the followings, known as Newton forward-difference formula.

Newton forward-difference formula n ⎛s⎞ Pn ( x) = f [ x0 ] + ∑ ⎜ ⎟∆k ( x0 ). k =1 ⎝ k ⎠

8

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

Newton Backward-difference Formula (for equally spaced data) Similarly, when the data points x are evenly spaced, by introducing the backward difference notation, the formulas for Newton’s divided-difference interpolating polynomial can be written in asimpler form known as backward difference formula. For the case of x = x n + sh and h = xi +1 − xi , the Newton backwarddifference formula is written as below:

Newton backward-difference formula k

⎛− s⎞ Pn ( x) = f [ x n ] + ∑ (− 1) ⎜⎜ ⎟⎟∇ k f ( x n ). ⎝ k ⎠ k =1 n

Example 10.2.6 By using the (i) Newton forward-difference formula and (ii) Newton backward-difference formula, construct the interpolating polynomial for the following data. x f (x)

0 1

2 3

4 7

Solution Newton forward-difference formula (i) Step 1: Construct the forward-difference table:

i

xi

f ( xi )

0

0

1

1

2

3

2

4

7

∆ f ( xi ) 2

∆2 f ( xi ) 2

2 2 4

Step 2: Calculate h and s. h is the distance between the data points and is given as h = xi +1 − xi = 2. ( x − x0 ) x s= = . 2 h Step 3: Write down the Newton forward-difference formula The values of the forward-differences are along the upper diagonal of the table.

9

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

x x ( − 1) x 2 2 P2 ( x) = f ( x0 ) + ∆ f ( x0 ) + ∆2 f ( x0 ) 2 22 2! x x ( − 1) x 2 2 = 1 + (2) + (2) 2 2! x⎛x ⎞ = 1 + x + ⎜ − 1⎟ 2⎝2 ⎠ x2 x = + + 1. 4 2 Newton backward-difference formula (ii) Step 1: Construct the backward-difference table. The backward difference table is the same as the forward-difference table from (i). Step 2: Calculate h and s. h is the distance between the data points and is given as h = xi +1 − xi = 2. ( x − x n ) ( x − 4) s= = h 2 Step 3: Write down the Newton backward difference formula The values of the backward differences are along the lower diagonal of the table. ⎛ − ( x − 4) ⎞⎛ ⎛ x − 4 ⎞ ⎞ ⎜ ⎟⎜ − ⎜ ⎟ − 1⎟ 2 ⎛ − ( x − 4) ⎞ ⎝ ⎠⎝ ⎝ 2 ⎠ ⎠ 2 P2 ( x) = f ( x2 ) − ⎜ ∇ f ( x2 ) ⎟ ∇ f ( x2 ) + 2 2 2! ⎠2 ⎝ ⎛ − ( x − 4) ⎞⎛ ⎛ x − 4 ⎞ ⎞ ⎟ − 1⎟ ⎜ ⎟⎜ − ⎜ 2 ⎛ − ( x − 4) ⎞ ⎝ ⎠⎝ ⎝ 2 ⎠ ⎠ = 7−⎜ 2 ⎟4 + 2 2! ⎝ ⎠ 1 = 7 − 2(4 − x) + (4 − x)(2 − x) 4 2 x x = + +1 4 2 Observe that the interpolating polynomial obtained by both formulas is unique. Example 10.2.7 Below lists the values of a function at various points. Determine the approximations to f(1.5) by using the Lagrange interpolating polynomial, (i) Newton’s divided-difference interpolating polynomial, (ii) (iii) Newton forward-difference formula, Newton backward-difference formula. (iv) Compare the answer that you obtained from (i),(ii),(iii) and (iv).

10

BACS 1263

Mathematics for Computer Science II

x 1 1.2 1.4 1.6 1.8

9-13 March 2009

f (x) 0 0.182322 0.336472 0.470004 0.587787

Solution (i)

Lagrange interpolating polynomial The LIP is P4 ( x) = 0.L0 ( x) + 0.182322 L1 ( x) + 0.336472 L2 ( x) + 0.470004 L3 ( x) + 0.587787 L4 ( x) = 0.182322 L1 ( x) + 0.336472 L2 ( x) + 0.470004 L3 ( x) + 0.587787 L4 ( x) with L1 ( x) =

( x − 1.0)( x − 1.4)( x − 1.6)( x − 1.8) (1.2 − 1.0)(1.2 − 1.4)(1.2 − 1.6)(1.2 − 1.8)

L2 ( x ) =

( x − 1.0)( x − 1.2)( x − 1.6)( x − 1.8) (1.4 − 1.0)(1.4 − 1.2)(1.4 − 1.6)(1.4 − 1.8)

L3 ( x) =

( x − 1.0)( x − 1.2)( x − 1.4)( x − 1.8) (1.6 − 1.0)(1.6 − 1.2)(1.6 − 1.4)(1.6 − 1.8)

L4 ( x ) =

( x − 1.0)( x − 1.2)( x − 1.4)( x − 1.6) (1.8 − 1.0)(1.8 − 1.2)(1.8 − 1.4)(1.8 − 1.6)

When x=1.5, L1 (1.5) = −0.156250, L2 (1.5) = 0.703215, L3 (1.5) = 0.468750 and L4 (1.5) = −0.039063.

Thus, P4 (1.5) = 0.182322L1 (1.5) + 0.336472 L2 (1.5) + 0.470004 L3 (1.5) + 0.587787 L4 (1.5) = 0.405448.

11

BACS 1263

(ii)

i

Mathematics for Computer Science II

9-13 March 2009

Newton’s divided-difference interpolating polynomial The divided-difference table is:

0

xi 1

f [ xi ] 0

1

1.2

0.182322

2

1.4

0.336472

3

1.6

0.470004

4

1.8

0.587787

f [ xi , x x +1 ]

f [ xi , x x +1 , xi + 2 ]

f [ xi , x x +1 , xi + 2 , xi +3 ]

f [ xi , x x +1 , xi + 2 , xi +3 , xi + 4 ]

0.911610 -0.352150 0.770750

0.157375 -0.257725

-0.069922 0.101438

0.667660 -0.196863 0.588915

The NDDIP is P4 ( x) = f [ x0 ] + f [ x0 , x1 ]( x − 1) + f [ x0 , x1 , x 2 ]( x − 1)( x − 1.2) + f [ x0 x1 x 2 , x3 ]( x − 1)( x − 1.2)( x − 1.4) + f [ x0 , x1 , x 2 , x3 , x 4 ]( x − 1)( x − 1.2)( x − 1.4)( x − 1.6) = 0 + 0.911610( x − 1) − 0.352150( x − 1)( x − 1.2) + 0.157375( x − 1)( x − 1.2)( x − 1.4) − 0.069922( x − 1)( x − 1.2)( x − 1.4)( x − 1.6) When x=1.5, we have P4 (1.5) = 0.405448. (iii)

i

Newton forward difference formula The forward difference table is

0

xi 1

f [ xi ] 0

1

1.2

0.182322

2

1.4

0.336472

3

1.6

0.470004

4

1.8

0.587787

f [ xi , x x +1 ]

f [ xi , x x +1 , xi + 2 ]

f [ xi , x x +1 , xi + 2 , xi +3 ]

f [ xi , x x +1 , xi + 2 , xi +3 , xi + 4 ]

0.182322 -0.028172 0.154150

0.007554 -0.020618

-0.002685

0.133532

0.004869 -0.015749

0.117783 ( x − x0 ) (1.5 − 1.0) 5 = = h 0.2 2 The interpolating polynomial is We have h=0.2 and s =

.

12

BACS 1263

Mathematics for Computer Science II

9-13 March 2009

5 ⎛ 5 ⎞⎛ 5 ⎞⎛ 5 ⎞ 5⎛5 ⎞ 5 ⎛ 5 ⎞⎛ 5 ⎞ ⎜ −1⎟ ⎜ −1⎟⎜ − 2 ⎟ ⎜ −1⎟⎜ − 2 ⎟⎜ − 3⎟ 5 2⎝2 ⎠ 2 2 ⎝ 2 ⎠⎝ 2 ⎠ 3 2 ⎝ 2 ⎠⎝ 2 ⎠⎝ 2 ⎠ 4 P4 (1.5) = f ( x0 ) + ∆ f ( x0 ) + ∆ f ( x0 ) ∆ f ( x0 ) + ∆ f ( x0 ) 0.2 0.2 0.2 4! 2 0.2 2! 3!

5⎛5 ⎞ 5⎛5 ⎞ ⎜ − 2⎟ ⎜ − 1⎟ 5 2 2 ⎠ 2 2 ⎠ (0.007554) = 0 + (0.182322) + ⎝ (−0.028171) + ⎝ 2 2! 3! 5 ⎛ 5 ⎞⎛ 5 5 ⎞ ⎞⎛ ⎜ − 1⎟⎜ − 2 ⎟⎜ − 3 ⎟ 2 2 ⎠⎝ 2 ⎠ (−0.002685) ⎠⎝ 2 + ⎝ 4! = 0.405448

(iv)

Newton backward difference formula The backward difference table is the same as the forward difference table in (c). h=0.2 and

s=

( x − xn ) (1.5 − 1.8) − 3 = = h 0.2 2

The interpolating polynomial is 3⎛3 ⎞ 3 ⎛ 3 ⎞⎛ 3 ⎞ ⎜ −1⎟ ⎜ −1⎟⎜ − 2 ⎟ 2⎝2 ⎠ 2 2 ⎝ 2 ⎠⎝ 2 ⎠ 3 ⎛ 3⎞ ∇ f ( x4 ) − P4 (1.5) = f ( x4 ) − ⎜ ⎟ ∇ f ( x4 ) + ∇ f ( x4 ) 0.2 0.2 2! 3! ⎝ 2 ⎠ 0.2

3 ⎛ 3 ⎞⎛ 3 ⎞⎛ 3 ⎞ ⎜ − 1⎟⎜ − 2 ⎟⎜ − 3 ⎟ 2 2 ⎠⎝ 2 ⎠⎝ 2 ⎠ ∇ 4 f ( x ) + ⎝ 4 0.2 4! 3⎛3 ⎞ ⎜ − 1⎟ 2⎝2 ⎠ ⎛3⎞ = 0.5877867 − ⎜ ⎟(0.117783) + (−0.015749) 2! ⎝2⎠ 3 ⎛ 3 ⎞⎛ 3 ⎞ ⎜ − 1⎟⎜ − 2 ⎟ 2 2 ⎠⎝ 2 ⎠ (0.004869) − ⎝ 3! 3 ⎛ 3 ⎞⎛ 3 ⎞⎛ 3 ⎞ ⎜ − 1⎟⎜ − 2 ⎟⎜ − 3 ⎟ 2 2 ⎠⎝ 2 ⎠⎝ 2 ⎠ (−0.002685) + ⎝ 4! = 0.405448. Note that the value of P4 (1.5) are the same for all (i),(ii),(iii) & (iv).

13

Related Documents

Bab 10
May 2020 18
Bab 10
May 2020 23
Bab 10
June 2020 26
Bab 10
July 2020 21
Bab 10.docx
June 2020 7
Kombis Bab 10.docx
May 2020 26