Presentation on theme: "Lecture on Numerical Analysis Dr.-Ing. Michael Dumbser"— Presentation transcript:
1 Lecture on Numerical Analysis Dr.-Ing. Michael Dumbser 15 / 09 / 2008
2 InterpolationfSet of given function values at given points. These may come e.g. from measurements made in the real world (temperature, snow thickness, rainfall) or may come from laboratory experiments.f1f3f0f2pn(x)Interpolating function pn(x) (usually a polynomial)Interpolated function valuexx0x1xx2x3
3 Polynomial Interpolation The interpolation polynomial pn(x) must satisfy the following properties:(1) pn(x) is from the space Pn of polynomials with maximal degree n(2) pn(xi)=fi.Direct approach: pn(x) = a0 + a1x + a2x2 + a3x3 + … + anxn = S ajxj. This satisfies (1). Using (2) leads to a linear equation system to be solved for the aiLagrange interpolation: pn(x) = S fj Lj(x) with the special Lagrangian interpolation polynomials No linear equation system must be solved (formally, the matrix of the corresponding linear system is the identity matrix, so one obtains directly ai=fi).Newton interpolation: pn(x) = a0 + a1(x-x0) + a2(x-x0)(x-x1) + … + an(x-x0)(x-x1)…(x-xn-1)The system matrix is a lower triangular matrix, which means the linear system for the aj can be solved very efficiently.
4 Joseph-Louis Lagrange Joseph-Louis Lagrange o Giuseppe Ludovico Lagrangia(* 25. January 1736 in Torino; † 10. April 1813 in Paris)Father (with French origin) wanted him to study lawLagrange learnt on his own in only one year all the knowledge about mathematics available at that time.With 19 professor at the Royal School of Artillery in Torino1766 director of the Prussian Academy of Sciences Successor of Leonhard Euler in Berlin1788 publication of the famous „Mécanique analytique“From 1797 professor at the Ecole Polytechnique in ParisBuried in the pantheon in Paris
5 Approximation Error of Polynomial Interpolation Suppose there exists a so-called generating function f(x) which is (n+1)-times differentiable for which the function values fi to be interpolated by the interpolation polynomial pn(x) satisfy(1) f(xi)=fi.Then the approximation error f(x) - pn(x) made by the interpolation polynomial pn(x) is given by:Where x is a value from the smallest interval I=[x0,x1,…,xn,x] containing all xi and x.Remarks:The value for x depends on the position x.For values of x that are not contained in the interval [x0,x1,…xn], i.e. for extrapolation problems, the error grows very quickly. This can be verified quickly looking at w(x).The interpolation error is connected to the (n+1)-th derivative of the generating function f(x)
6 Problems with Polynomial Interpolation For general functions f(x) the accuracy of polynomial interpolation does not increase when increasing the degree of the interpolation polynomial. It may even happen that the error increases considerably when increasing the polynomial degree.Example of Carl Runge: Polynomial interpolation ofObservation: increaslingly severeoscillations of the interpolationpolynomial at the boundariesof the interpolation interval.polynomial degreen = 4polynomial degreen = 8polynomial degreen = 12
7 Spline InterpolationMotivated by the problems arising with very high order polynomial interpolation, engineers and mathematicians developed the concept of spline interpolation. The key idea hereby is, to use piecewise polynomials defined on sub-intervals. The piecewisepolynomials are connected to each other in such a manner that the function value and the first two derivatives are continuous.Typically, cubic splines are used, consisting of piecewise polynomials of degree three.Definition of a cubic spline interpolant on the interval I=[a,b]:Usually, the following boundary conditions are enforced:
8 Spline InterpolationfSi-1(x)Si(x)Si+1(x)Dixx0x1x2xi-1xixn-1xnHistorically, numerical spline interpolation was first developed by engineers. Itwas inspired by a tool commonly used in naval engineering. The tool consists in a bar that was fixed on the given points by nails and which then bends (deforms) according to these boundary conditions.In fact, this property of the bar is mathematically mimicked by the spline interpolation functions via the so-called minimum norm property.
9 Spline InterpolationWe define a measure for the total bending (curvature) of a two-times differentiable function f(x) as follows:Theorem 1:Using the natural boundary conditions and the other properties of the spline function, we immediately obtain the minimum norm property:Theorem 2:The proofs for both theorems are shown on the blackboard and are recommended as an exercise at home.
10 Spline InterpolationWe define a measure for the total bending (curvature) of a two-times differentiable function f(x):Theorem 1:Using the natural boundary conditions and the other properties of the spline function, we immediately obtain the minimum norm property:Theorem 2:The proofs are shown on the blackboard and are recommended as an exercise at home.
11 Spline InterpolationFinally, with the method of moments, we obtain the following expression for the natural cubic spline:withRecall that the boundary conditions for the natural cubic spline are:
12 Polynomial Interpolation ExerciseWrite a Maple worksheet that interpolates a set of n+1 points (xi,fi) using the polynomial interpolation of Lagrange.Apply the method to the functionDiscuss the results