Lec10 - Global Interpolation and Numerical Differentiation...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Global Interpolation and Numerical Differentiation Think globally. Act locally -- L. N. Trefethen, “Spectral Methods in Matlab” (SIAM, 2000)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 10 2 Interpolation z Interpolation is the process of fitting a smooth function to pass through smooth data points z This allows us to do various things: Evaluate the function between the points or anywhere – “interpolate” Numerically differentiate the function Numerically integrate the function Evaluate the function beyond the range of the data – “extrapolate” (can be dangerous!) interpolate extrapolate
Background image of page 2
Lecture 10 3 Types of Interpolation z Interpolation can be local (“piecewise”) or global Local – use just data surrounding the x value that you want to evaluate the function Global – use all the data z Interpolation can be done by fitting data to a variety of smooth functional forms: Polynomial interpolation Fourier interpolation local global c i – coefficients, e i (x) basis functions
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 10 4 Polynomial interpolation z Given N+1 data points (x j ,y j ), there is a unique polynomial of degree N that goes through all the points z Even though the polynomial is unique, it can be expressed many different ways, e.g. Monomial form Newton’s form Lagrange’s form Chebyshev form Others… z Most important form for today’s lecture is: Chebyshev polynomial expansion Recursion formula: Chebyshev polynomials z We obtain the expansion coefficients {c} by “collocation” at the N+1 data points:
Background image of page 4
Lecture 10 5 Local vs. Global Polynomial Interpolation z Fitting a low-order polynomial to a few points, N 5, of a data set that span a point x is a good way to locally interpolate a function y(x) near x z Now suppose we want to evaluate y(x) throughout the whole domain of x , [-1,1] – i.e. develop a global interpolant z Can we just interpolate with a higher-order (degree N >>1) polynomial through all of the N+1 points?? Interpolate at x = - 0.3
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 10 6 Global Interpolation Example z Let’s try global interpolation by fitting an N=16 polynomial to a smooth function sampled at 17 equispaced points: z This is a disaster! z The error, while small in the middle, is huge near the boundaries. This is the so- called: “Runge phenomenon” Runge phenomenon
Background image of page 6
Lecture 10 7 Chebyshev to the rescue z We see that global polynomial interpolation of a large data set of equispaced points can produce disastrous “Runge oscillations” near the boundaries z Remarkably, this problem can be fixed by simply choosing to collocate using unequally spaced data points – the Chebyshev points z These points are the extrema of the polynomial T N ( x ) over [-1,1] -1 -0.5 0.5 1 -1 -0.5 0.5 1 Plot of T 16 (x)
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 10 8 z Let’s repeat our example and compare the use of uniformly spaced points versus
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/29/2011 for the course CHE 132b taught by Professor Ceweb during the Fall '09 term at UCSB.

Page1 / 24

Lec10 - Global Interpolation and Numerical Differentiation...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online