Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4 Interpolation and Approximation. 4.1 Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.

Similar presentations


Presentation on theme: "Chapter 4 Interpolation and Approximation. 4.1 Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation."— Presentation transcript:

1 Chapter 4 Interpolation and Approximation

2 4.1 Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation problem can be posed in one of two ways:

3

4

5

6 Example 4.1 e -1/2

7

8 Discussion The construction presented in this section is called Lagrange interpolation. The construction presented in this section is called Lagrange interpolation. How good is interpolation at approximating a function? (Sections 4.3, 4.11) How good is interpolation at approximating a function? (Sections 4.3, 4.11) Consider another example: Consider another example: If we use a fourth-degree interpolating polynomial to approximate this function, the results are as shown in Figure 4.3 (a). If we use a fourth-degree interpolating polynomial to approximate this function, the results are as shown in Figure 4.3 (a).

9 Error for n=8

10 Discussion There are circumstances in which polynomial interpolation as approximation will work very well, and other circumstances in which it will not. There are circumstances in which polynomial interpolation as approximation will work very well, and other circumstances in which it will not. The Lagrange form of the interpolating polynomial is not well suited for actual computations, and there is an alternative construction that is far superior to it. The Lagrange form of the interpolating polynomial is not well suited for actual computations, and there is an alternative construction that is far superior to it.

11 4.2 Newton Interpolation and Divided Differences The disadvantage of the Lagrange form The disadvantage of the Lagrange form If we decide to add a point to the set of nodes, we have to completely recompute all of the functions. If we decide to add a point to the set of nodes, we have to completely recompute all of the functions. Here we introduce an alternative form of the polynomial: the Newton form. Here we introduce an alternative form of the polynomial: the Newton form. It can allow us to easily write in terms of It can allow us to easily write in terms of

12

13 =0

14 Example 4.2

15 Discussion The coefficients are called divided differences. The coefficients are called divided differences. We can use divided-difference table to find them. We can use divided-difference table to find them.

16 Example 4.3

17

18 Example 4.3 (Con.)

19 Table 4.5

20 4.3 Interpolation Error

21 Norms The infinity norm of pointwise norm: The infinity norm of pointwise norm: The 2-norm: The 2-norm:

22 The interpolation error of linear interpolation

23

24 Example 4.5

25 Example 4.5 (Con.)

26 4.4 Application: Muller’s Method and Inverse Quadratic Interpolation We can use the idea of interpolation to develop more sophisticated root-finding methods. We can use the idea of interpolation to develop more sophisticated root-finding methods. For example: Muller ’ s Method For example: Muller ’ s Method Given three points we find the quadratic polynomial such that 0,1,2; and then define as the root of that is closest to. Given three points we find the quadratic polynomial such that 0,1,2; and then define as the root of that is closest to.

27

28

29 compare

30 An Alternative to Muller’s Method Inverse quadratic interpolation: Inverse quadratic interpolation:

31

32

33 Discussion One great utility of Muller ’ s method is that it is able to find complex roots of real-valued functions, because of the square root in the computation. One great utility of Muller ’ s method is that it is able to find complex roots of real-valued functions, because of the square root in the computation. Inverse quadratic interpolation is used as part of Brent- Dekker root-finding algorithm, which is a commonly implemented automatic root-finding program. Inverse quadratic interpolation is used as part of Brent- Dekker root-finding algorithm, which is a commonly implemented automatic root-finding program.

34 4.5 Application: More Approximations to the Derivative depends on x

35 4.5 Application: More Approximations to the Derivative The interpolating polynomial in Lagrange form is The interpolating polynomial in Lagrange form is The error is given as in (4.20), thus The error is given as in (4.20), thus We get We get

36 We can use above equations to get:

37 4.6 Hermite Interpolation Hermite interpolation problem: Hermite interpolation problem: Can we do this? Yes. Can we do this? Yes.

38

39 Divided-Difference Table

40 An example

41 error

42 Hermite Interpolation Error Theorem

43 4.7 Piecewise Polynomial Interpolation If we keep the order of the polynomial fixed and use different polynomials over different intervals, with the length of the intervals getting smaller and smaller, then interpolation can be a very accurate and powerful approximation tool. If we keep the order of the polynomial fixed and use different polynomials over different intervals, with the length of the intervals getting smaller and smaller, then interpolation can be a very accurate and powerful approximation tool. For example: For example:

44

45

46

47 Example 4.6

48

49


Download ppt "Chapter 4 Interpolation and Approximation. 4.1 Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation."

Similar presentations


Ads by Google