MATH 417 Lecture 5

From Notes
Jump to navigation Jump to search

« previous | Tuesday, January 28, 2014 | next »


Best Floating Point Adding Algorithm

  1. sort collection of numbers
  2. arrange in "baskets" of size for . (e.g. 1/32, 1/16, 1/8, 1/4, 1/2, 1, 2, 4, 8, 16, 32)
  3. starting with smallest basket, remove 2 numbers and insert their sum into the next basket
  4. repeat (3) until only one number remains in the largest basket

Roundoff error will be minimized.


Polynomial Interpolation

Given for , we want to approximate with a simpler function .

Stuff to show:

  1. there exists only one polynomial
  2. find it
  3. find the error

Existence

Theorem. Given and , there exists a polynomial of degree such that for all .

Proof. [Omitted in the book, so we will not cover it here]

quod erat demonstrandum

The good news: every function can be approximated by a polynomial. Weierstrass proved the existence of such polynomials, but Bernstein actually found one.

Lagrange Interpolating Polynomial

For , given measurements , where , We want to find such that for , and .


Theorem 1. There exists a unique which satisfies the conditions above:

Proof. We take our initial conditions and construct a matrix equation :

There is only one unique solution if and only if .

Basis.

  1. Given one point , the determinant is just .
  2. Given two points , the determinant is since points are distinct.
  3. Given three points , the determinant is

Induction. In general,


To find , We construct a polynomial that is 0 at all points except when , in which case .

Therefore , or in short

quod erat demonstrandum


Example

0 1 2 3
4 1 7 28

.

Error Estimation

Theorem. Let for .

Proof. Let . This function is special because and . Hence there are roots, and it is -differentiable. Let's compute that derivative:

We know has a zero at some . To solve for it, we set . Therefore our desired equation follows

quod erat demonstrandum