1 / 83

Chapter 4 Interpolation and Approximation

Chapter 4 Interpolation and Approximation. 4.1 Lagrange Interpolation. The basic interpolation problem can be posed in one of two ways:. exist. unique. Example 4.1. e -1/2. Discussion . The construction presented in this section is called Lagrange interpolation .

solange
Télécharger la présentation

Chapter 4 Interpolation and Approximation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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:

  3. exist unique

  4. Example 4.1 e-1/2

  5. Discussion • The construction presented in this section is called Lagrange interpolation. • How good is interpolation at approximating a function? (Sections 4.3, 4.11) • 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).

  6. n= 8 n= 4 n= 16 Error for n=8

  7. Discussion • 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.

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

  9. Newton Interpolation

  10. =0

  11. Example 4.2

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

  13. Example 4.3

  14. Example 4.3 (Con.)

  15. Table 4.5

  16. 4.3 Interpolation Error

  17. 4.5 Application: More Approximations to the Derivative depends on x

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

  19. We can use above equations to get:

  20. 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. • For example:

  21. Example 4.6

  22. 4.8 An Introduction to Splines • 4.8.1 Definition of the problem

  23. Discussion • From the definition: • d: degree of approximation • Related to the number of unknown coefficients (the degrees of freedom) • N: degree of smoothness • Related to the number of constraints

  24. Discussion • We can make the first term vanish by setting • This establishes a relationship between the polynomial degree of the spline and the smoothness degree. • For example: cubic splines • If we consider the common case of cubic splines, then d=3 and N=2.

  25. 4.8.2 Cubic B-Splines • B-Spline: assume an uniform grid

  26. Cubic B-Splines • How do we know that B(x) is a cubic spline function? • Computer the one-sided derivatives at the knots: and similarly for the second derivative. • If the one-sided values are equal to each other, then the first and second derivatives are continuous, and hence B is a cubic spline. • Note that B is only “locally defined,” meaning that it is nonzero on only a small interval.

  27. A Spline Approximation • We can use B to construct a spline approximation to an arbitrary function f. • Define the sequence of functions

  28. xi=0.75 h=0.05 xi=0.4 h=0.05

  29. n+1 equations in n+3 unknowns

  30. A Spline Approximation • Now, we need to come up with two additional constraints in order to eliminate two of the unknowns. • Two common choices are • The natural spline: • A simple construction • Leads to higher error near the end points • The complete spline: • Better approximation properties • Do not actually require the derivative at the end points

  31. From n-1 Natural Spline

  32. From n+1 Complete Spline

  33. Example 4.7

  34. Example 4.8

More Related