Numerical Analysis

Math 370  MWF 2:30-3:25
Spring 1997  201 Fowler

(04.04.97) \underline{Trapezoid Rule, Simpson’s Rule, Midpoint Rule} \underline{Warm Up} Previously we showed that the standard 2-point quadrature rule is really just a fancy name for the TRAPEZOIDAL RULE.

∫_{x_{0}}^{x_{1}} f(x) dx ≈ \frac{x_{1} − x_{0}}{2} (f(x_{0}) + f(x_{1}))

Use this rule to approximate the area of the first quadrant of the unit circle f(x) = \sqrt{1 − x^{2}}

Error Term for Trapezoid Rule Since we derived The Trapezoid Rule using Lagrange Interpolation we can use our knowledge of the theoretical error to compute an error for using the Trapezoid Rule.

Simpson’s Rule A similar method can be used to derive the formula for Simpson’s Rule. Assume that we have 3 data points (x_{0}, f_{0}), (x_{1}, f_{1}) and (x_{2}, f_{2}). Write down the formula one would have to evaluate to derive the 3-point quadrature rule more commonly known as Simpson’s Rule:

Do we believe this will get us the answer? What’s wrong with it?

Let’s try something else... First, find the 4th degree Taylor expansion of f(x) about the point x_{1} and write it down here:

Integrating and using the fact that h = x_{2} − x_{1} = x_{1} − x_{0} means that ∫_{x_{0}}^{x_{2}} f(x) dx =

But using a centered-difference approximation for f′′(x_{1}) means that ∫_{x_{0}}^{x_{2}} f(x) dx = Newton-Cotes Formulas The official name for the quadrature rules that Trapezoid and Simpson fall under is called the (n + 1)-point closed Newton-Cotes formula. In this case n is the degree of the Lagrange Polynomial used to do the interpolation for f(x) in the integral.

In general, the closed Newton-Cotes formulae look like: If n is even and f ∈ C^{n+2}[a, b]

∫_{a}^{b} f(x)dx = ∑_{i=0}^{n} a_{i}f(x_{i}) + \frac{h^{n+3}f^{(n+2)}(ξ)}{(n + 2)!} ∫_{0}^{n} t^{2}(t − 1) … (t − n) dt

and if n is odd and f ∈ C^{n+1}[a, b]

∫_{a}^{b} f(x)dx = ∑_{i=0}^{n} a_{i}f(x_{i}) + \frac{h^{n+2}f^{(n+1)}(ξ)}{(n + 2)!} ∫_{0}^{n} t(t − 1) … (t − n) dt

where ξ ∈ [a, b] and h = (b − a)/n and a_{i} = ∫_{x_{0}}^{x_{n}} L_{n,i}(x)dx

What is the precision of an (n + 1)-point closed Newton-Cotes formula?

The Midpoint Rule is the first example of an open (n + 1)-point Newton-Cotes formula In the open Newton-Cotes formulas the nodes x_{k} do not necessarily fall within the interval of integration one is interested in. In fact, they are defined saying that h = (b − a)/(n + 2) and x_{k} = x_{0} + kh for k = 0, 1, … n and x_{0} = a + h

Where will x_{n} be (in terms of a, b and h)?

In general, the open Newton-Cotes formulae look like: If n is even and f ∈ C^{n+2}[a, b]

∫_{a}^{b} f(x)dx = ∑_{i=0}^{n} a_{i}f(x_{i}) + \frac{h^{n+3}f^{(n+2)}(ξ)}{(n + 2)!} ∫_{−1}^{n+1} t^{2}(t − 1) … (t − n) dt

and if n is odd and f ∈ C^{n+1}[a, b]

∫_{a}^{b} f(x)dx = ∑_{i=0}^{n} a_{i}f(x_{i}) + \frac{h^{n+2}f^{(n+1)}(ξ)}{(n + 2)!} ∫_{−1}^{n+1} t(t − 1) … (t − n) dt

where ξ ∈ [a, b] and h = (b − a)/(n + 2), x_{−1} = a, x_{n+1} = b and a_{i} = ∫_{x_{0}}^{x_{n}} L_{n,i}(x)dx

What is the precision of an open (n + 1)-point Newton-Cotes formula?

What’s the difference between the open and closed Newton-Cotes formulae?

Use the general form of the open Newton-Cotes formula to derive the formula for Midpoint Rule