03.03.2014 Views

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

98 CHAPTER 8. INTEGRALS AND QUADRATURE<br />

f, and the width of the interval [a, b] to some power which is determined by the rule. That is we<br />

usually think of a simple rule as being applied to a small interval.<br />

To use a simple rule on a larger interval, we usually cast it into a “composite” rule. Thus the<br />

trapezoidal rule, which we will study next becomes the composite trapezoidal rule. The means of<br />

extending a simple rule to a composite rule is straightforward: Partition the given interval into<br />

subintervals, apply the simple rule to each subinterval, and sum the results. Thus, for example if<br />

the interval in question is [α, β], and the partition is α = x 0 < x 1 < x 2 < . . . < x n = β, we have<br />

8.2 Trapezoidal Rule<br />

n−1<br />

∑<br />

composite rule on [α, β] = simple rule applied to [x i , x i+1 ].<br />

i=0<br />

Suppose we are trying to approximate the integral<br />

∫ b<br />

for some unpleasant or black box function f(x).<br />

The trapezoidal rule approximates the integral<br />

PSfrag replacements<br />

a<br />

∫ b<br />

a<br />

f(x) dx,<br />

f(x) dx<br />

by the (signed) area of the trapezoid through the points (a, f(a)) , (b, f(b)) , and with one side the<br />

segment from a to b. See Figure 8.2.<br />

uright<br />

a<br />

b<br />

lleft<br />

Figure 8.2: The trapezoidal rule for approximating the integral of a function over [a, b] is shown.<br />

By old school math, we can find this signed area easily. This gives the (simple) trapezoidal rule:<br />

∫ b<br />

a<br />

f(x) dx ≈ (b − a)<br />

f(a) + f(b)<br />

.<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!