MATH 417 Lecture 12

From Notes
Jump to navigation Jump to search

« previous | Thursday, February 20, 2014 | next »


Quiz

Approximate f(x+3h) given f(x0h), f(x0), and f(x0+3h) to within O(h2) accuracy

Lagrange

Find P2(x) (which has error O(h3)) and differentiate

Taylor Series

Recall that the taylor series for f centered at a is

f(x)=f(a)+(xa)f(a)+

In our case, we want to take the function at the point x0h centered around x0+3h:

f(x0h)=f((x0+3h)4h)=f(x0+3h)+(4h)11!f(x0+3h)+(4h)22!f(x0+3h)+O(h3)


Integration

Suppose we are given x0 and x1. Our goal for this example is to approximate 11f(x)dx with a linear function A0f(x0)+A1f(x1).

We can tell that DAC ≥ 1


  • Let f(x)=1, then f(x)dx=1dx=A01+A11=2
  • Let f(x)=x, then f(x)dx=xdx=A0x0+A1x1=x22|11


we solve the equations above and come up with the trapezoidal rule.


The Best Rule

11f(x)dxQn(f)=i=1nAif(xi)

This requires solving for 2n+2 unknowns: A0,A1,,An,x0,x1,,xn.


Theorem. [Gaussian Rule]. There is only one rule with degree of accuracy 2n+1 based on n+1 points.

Proof.

quod erat demonstrandum


For two points, the gaussian rule is:

11f(x)dxf(33)+f(33)

This has DAC = 3


Legendre Polynomials

Ln(x)=dndxn((1x2)n)=c(xn+)=0

This polynomial has n real-valued zeroes x0,x1,,xn1

  1. L1(x)=2x with root x=0, so the Gaussian rule is 11f(x)dx=A0f(x0). A0 can be found to be 2
  2. L2(x)=4(3x21) with roots x=±33, hence the Gaussian rule above.
  3. L3(x)=24x(35x2) with zeroes x{0,±35}, so the Gaussian rule is 11f(x)dxA0f(35)+A1f(0)+A2f(35). The coefficients can be found to be 59, 89, and 59, respectively.


Note: the coefficients and points are always symmetric (about a symmetric interval)

Suppose we scale the gaussian rule for 3 points to the interval (0,10):

010f(x)dx1002(59f(5+335)+89f(5)+59f(5335))

We shift the points by 5 (to the midpoint of the