Presentation is loading. Please wait.

Presentation is loading. Please wait.

By: Mark Coose Joetta Swift Micah Weiss. What Problems Can Interpolation Solve? Given a table of values, find a simple function that passes through the.

Similar presentations


Presentation on theme: "By: Mark Coose Joetta Swift Micah Weiss. What Problems Can Interpolation Solve? Given a table of values, find a simple function that passes through the."— Presentation transcript:

1 By: Mark Coose Joetta Swift Micah Weiss

2 What Problems Can Interpolation Solve? Given a table of values, find a simple function that passes through the given points exactly Given a table of experimental data, find a formula that approximates the data and possibly filters out errors Given an arbitrary function f, find an approximation in the form of a simpler function g

3 How Do We Find An Interpolating Polynomial? Lagrange form Newton’s form Cubic Splines

4 Lagrange Form of the Interpolating Polynomial A linear combination of n+1 polynomials Each term is a polynomial of degree n

5 Consider the Table Begin by finding n+1=3 cardinal functions l i (x) Or, X1/3¼1 f(x)27

6 X1/3¼1 f(x)27

7 Use these values for l i (x) to find the interpolating polynomial of degree 2 X1/3¼1 f(x)27

8 Disadvantages of Lagrange Form Each cardinal polynomial term is degree n To add one point we must recalculate each cardinal function from scratch

9 Newton Form of Interpolating Polynomial Data points can be added without recalculating existing sequence Pn(x i )=f(x i ) for i=0,1,…,n The polynomial p n is of deg ≤ n P n (x) = a 0 + a 1 (x-x 0 ) + a 2 (x-x 0 )(x-x 1 ) + … + a n (x – x n-1 )

10 Finding Coefficients using divided differences XF[] x0x0 f[x 0 ] x1x1 f[x 1 ] x2x2 f[x 2 ] x3x3 f[x 3 ] F[, ]F[,, ] f[x 0,x 1 ] f[x 1,x 2 ] f[x 2,x 3 ] f[x 0,x 1,x 2 ] f[x 1,x 2,x 3,] f[x 0,x 1,x 2,x 3 ]

11 Our Example Revisited XF[x]F[, ]F [,, ] 1/3 1/4 1 2 7 36 32/3 -38

12 Adding a Point Xf[ ]f[, ]f[,, ]F[,,, ] 1/32 1/4 17 24 36 32/3 -3 -38 -164/21 -88/35 The beauty of Newton’s form of the interpolating polynomial is that it allows us to add points and extend the polynomial without redoing previous calculations. The additional point only requires us to calculate the three values shown in red.

13 Disadvantages of Polynomial Interpolation The function can oscillate wildly Each polynomial can be of degree n (computationally expensive for large n = number of points).

14 Splines Definition: A function is called a spline of degree k if The domain of S is an interval[a,b] There are points t i such that a=t 0 <t 1 <…<t n =b and S is a polynomial of degree at most k on each subinterval [t i, t i+1 ] S, S’, S’’,…,S (k-1) are all continuous functions on [a,b]

15 Splines Linear,Quadratic Splines Cubic Splines Cubic Splines are almost always used over polynomial interpolation because of its increased accuracy (smaller error) and the final curve is smoother than polynomial interpolation

16 Linear Spline vs. Cubic Spline

17 Cubic Spline Smoothness Property If S is the natural cubic spline function that interpolates a twice-continuous differentiable function f at knots a=t 0 <t 1 <…<t n =b, then

18 What Does This Mean? A function with large second derivatives is subject to wild oscillations. The Smoothness Property ensures that the spline S oscillates less than the function that it interpolates. An example is shown, here.

19 Proof of Smoothness Property Let g(x)=f(x)-s(x) Then, f”(x)=g”(x)+s”(x) And,

20 Apply integration by parts Let u=s’’(x) and dv=g’’(x) Then, Since, this is a natural cubic spline, s’’=0, so the first term is equal to zero. Which leaves

21 Integration by Parts cont. [break this up into sub integrals] = (s’’’ is a constant within this integral) = [g(t(i) + 1) – g(t(i))] = 0 because g(t(i) + 1) = g(t(i)) = 0

22 So, But, So,


Download ppt "By: Mark Coose Joetta Swift Micah Weiss. What Problems Can Interpolation Solve? Given a table of values, find a simple function that passes through the."

Similar presentations


Ads by Google