Welcome to
MATA30
Instructor: Dr. Ken Butler
1
MATA30 Instructor: Dr. Ken Butler 1 Contact information (on - - PowerPoint PPT Presentation
Welcome to MATA30 Instructor: Dr. Ken Butler 1 Contact information (on Intranet: intranet.utsc.utoronto.ca , My Courses) E-mail: butler@utsc.utoronto.ca Office: B 426 Office hours: to be announced Phone: 5654 (416-287-5654) 2
Instructor: Dr. Ken Butler
1
(on Intranet: intranet.utsc.utoronto.ca, My Courses)
2
So far, have found integrals
a f(x) dx over finite interval,
assuming function continuous on [a, b]. But in applications, have kinds of “infinity” to worry about:
Not all integrals with infinities have a finite answer; those that do said to converge, others diverge.
235
Consider
1 (1/x2) dx.
Idea: replace infinite limit by finite b, let b tend to infinity:
1
1 = −1
As b → ∞, 1/b → 0, so integral heads for 1. It seems to make sense to say
1 (1/x2) dx = 1.
Seems strange that infinitely long region can have finite area. But
236
Simply having f(x) → 0 is not enough – eg. f(x) = 1/x:
1
1 = ln b − ln 1.
As b increases, ln b also increases, so no finite value for integral. Integral
1 (1/x2) dx converges,
1 (1/x) dx diverges.
More examples:
0 e−2x dx;
0 xe−2x dx.
If lower limit is −∞, replace it by a and see what happens as
−∞ ex dx, find a
a = 1 − ea.
Since a negative. ea → 0, and integral converges to 1.
237
If both limits are infinite, split into two parts, at x = c (value of c not important). Thus to find
−∞ xe−x2/2 dx, find a
a + [−e−x2/2]b
As a and b decrease and increase, both exponentials head for 0, so integral converges to 0. (Could have guessed because xe−x2/2 is odd function.) If either integral had diverged, whole integral divergent.
238
Another kind of improper integral: value of function becomes infinite in interval. First case: infinity at end of interval. Example:
0 (1/√x) dx.
Can’t evaluate function at 0, so replace lower limit by a:
a
a = 2
Now let a → 0:
0 (1/√x) dx = 2
Compare
0 {1/(x − 2)2} dx, trouble at 2. Diverges.
239
If infinity of function inside interval, split integral in two so infinity on end of each new integral. Example:
−1(1/x2) dx. Trouble at 0, so write as
−1
a
−1 + [−x−1]2 a
The two terms involving a and b get larger closer to 0, so the integral diverges. More examples:
0 {1/(x − 4)2/3} dx;
0 (1/x2) dx.
240
Many functions don’t have elementary antiderivatives, so only way to find their integrals is numerically. Already saw left and right-hand sums (take enough rectangles to get accurate enough answer). But can require a lot of work. Idea: use function values more efficiently to get more accurate answer with less work.
241
With decreasing function, left-hand sum is too big, right-hand sum too small. How about evaluating function at midpoint each time? Example:
1 (1/x) dx. Know correct answer: ln 2 = 0.6931, so
can compare approximations. Use 2 rectangles, width 0.5:
1 1.25 1.5 1.75 2
1 0.80 0.67 0.57 0.50 Left
Right
Mid
Midpoint rule closest to right answer.
242
A trapezoid is a rectangle with a triangle on top of it. Drawing trapezoid under function and finding its area should be more accurate than left and right sums. Turns out that answer for trapezoid rule is average of results from left and right rules. For
1 (1/x) dx, this gives 0.71. Close, but not
as close as midpoint rule. Function here is concave up, so trapezoid rule overestimates (top of each trapezoid above curve). At same time, midpoint rule underestimates. Generally true for concave-up functions. For concave-down functions, trapezoid underestimates, midpoint overestimates.
243
With left and right sums, found that doubling number of rectangles halved error. So each additional decimal place requires 10 times work! Left and right sums not practical for finding integrals accurately. Trapezoid and midpoint rules give two more decimal places of accuracy for 10 times work, so approach right answer much faster.
244
Curious fact: error from midpoint rule about half error from trapezoid rule, and of opposite sign, eg. for
1 (1/x) dx:
Trapezoid Midpoint 2
0.0074 10
0.00031 50
0.0000125 250
0.0000005
245
Suggests even better rule: Simpson’s rule, estimating area as Simpson = 2 Midpoint + Trapezoid
Turns out that 10 times the work gives four more digits of accuracy in the answer, so practical to get highly accurate answers. Example:
0 x2 dx using Simpson with 4 rectangles. Need to
evaluate x2 at these places:
1.5 3 4.5 6
2.25 9 20.25 36
0.75 2.25 3.75 5.25
0.5625 5.0625 14.0625 27.5625
246
Then: left
right
trapezoid
midpoint
Simpson
Turns out that correct answer is exactly 72, so Simpson exactly
midpoint underestimate.
247
Most general-purpose numerical integration routines (eg. on calculators) use Simpson’s rule. Not only because of accuracy, but also because of deciding when to stop.
accurate answer is. So compare answer for 4 rectangles – stop if close enough, otherwise continue to 8, 16, . . . rectangles as necessary.
248
Nice computational feature of Simpson: when doubling number of rectangles, can re-use all previous work.
right, 0.25 and 0.75 for midpoint. For 4 rectangles, evaluate function at 0, 0.25, 0.5, 0.75, 1 for left and right, using previous values for left, right and midpoint. Only new work is for 4-rectangle midpoint.
249