So what's the formula?
Look over to the right. There's a picture of a function, together with
some approximating trapezoids. So what's the sum of the trapezoid areas?
(1/2)[f(x_{0})+f(x_{1})][(ba)/n] (trapezoid or panel #1)+
(1/2)[f(x_{1})+f(x_{2})][(ba)/n] (trapezoid or panel #2)+
(1/2)[f(x_{2})+f(x_{3})][(ba)/n] (trapezoid or panel #3)+
(1/2)[f(x_{3})+f(x_{4})][(ba)/n] (trapezoid or panel #4)+
(1/2)[f(x_{4})+f(x_{5})][(ba)/n] (trapezoid or panel #5)+
(1/2)[f(x_{5})+f(x_{6})][(ba)/n] (trapezoid or panel #6)+
(1/2)[f(x_{6})+f(x_{7})][(ba)/n] (trapezoid or panel #7)+
(1/2)[f(x_{7})+f(x_{8})][(ba)/n] (trapezoid or panel #8)
This is silly but you should notice some coincidences. The nodes which
are "interior" to the interval [a,b] appear twice, so you can add them
up. The boundary nodes only appear once. Here is the formula for the
trapezoid rule when it is used with n subdivisions on the interval
[a,b] with the function, f(x):
Compute (1/2)f(x_{1})+(1/2)f(x_{n})+SUM_{j=1}^{n1}f(x_{j})
and then multiply this result by (ba)/n.
Here x_{j}=a=x_{0}+j(ba)/n.
Using the Trapezoid rule
Then we tried to use the Trapezoid rule. If I wanted ln(2)=_{1}^{2}(1/x) dx
to an accuracy of +/10^{10}, what n should I use? Here
the error is overestimated by K(ba)^{3}/[12n^{2}].
Now b=2 and a=1, and K? Well, f(x)=1/x, so f´(x)=1/x^{2} and
f´´(x)=2/x^{3}. For x in [1,2], certainly an overestimate
is K=2. So
K(ba)^{3}/[12n^{2}] becomes 1/(6n^{2}). If I
want this less than 10^{10} then I should take n to be at least
the square root of (1/6)10^{10}. This is about 41,900.
So what's the answer?
It turns out that Maple has a package that includes a trapezoid rule
command. Here is what happened when I tried it:
> with(Student[Calculus1]): > evalf(ApproximateInt(1/x,x=1..2,method=trapezoid,partition=41866)); 0.6931471806 > ln(2); ln(2) > evalf(ln(2)); 0.6931471806The command evalf is needed both times or else in the first case I get the rational number which is the exact answer for the trapezoid sum (I did this, and it filled several screens!). In the second case, if you ask for ln(2) your answer is ... ln(2), which isn't too helpful.
On your calculator ...
If you have a TI 82/83 or 85/86 this
document, written by Professors Lyons and O'Nan, describes
programs to compute the midpoint rule, the trapezoid rule, and
Simpson's rule.
Another example
I investigated the value of _{0}^{2}cos(x^{2}) dx. A graph of
y=cos(x^{2}) is shown to the right. The integral is a
sillylooking object, but ... of course, it is something that occurs
in diffraction (crystallography, etc.). It is (almost) the Fresnel
cosine integral. (I left out a constant that's used in the definition
of the Fresnel integral because I didn't think
that you would believe the constant used!) I can tell you that
there's no way of writing an antiderivative of cos(x^{2}) in
terms of familiar functions. So if we want the value of the integral,
we need an approximation technique. I will try to approximate this to
5 places (error less than 10^{5}) with the trapezoid rule.
The error term is K(ba)^{3}/[12n^{2}]. Here b=2 and a=1. What about K? Well, if f(x)=cos(x^{2}) then f´(x)=sin(x^{2})2x and f´´(x)=cos(x^{2})4x^{2}sin(x^{2})2. Here I used both the chain rule and the product rule. Now I want K, which should be a simple overestimate of f´´(x) on [0,2]. I will not do anything fancy, but will rely on silly estimates on the pieces of the second derivative. I will also pay no attention to signs (that is, assuming the worst, that things will act to reinforce each other).
cos(x^{2}) · 4x^{2} sin(x^{2})2 Biggest Biggest this Biggest this can this can can get on get is 2 get is 1 [0,2] is 4(2^{2})So I will take 16+2=18 for K. Then the estimate is:
Here is Maple's version of the numbers:
> evalf(ApproximateInt(cos(x^2),x=0..2,method=trapezoid,partition=1096)); 0.4614623014 > evalf(int(cos(x^2),x=0..2)); 0.4614614629I used the builtin numerical integration routine to compare the result of the trapezoid rule. So things look good.
Simpson's rule
Simpson's rule approximates y=f(x) by parabolic arcs:
y=Ax^{2}+Bx+C. There are 3 "free" variables in the second
degree quadratic. Such a function can interpolate three points (the
side of the trapezoid is linear, and interpolates two points). For example,
> f:=x>A*x^2+B*x+C; 2 f := x > A x + B x + C > solve({f(2)=7,f(4)=8,f(6)=9}); {B = 14, A = 9/4, C = 12}I have just found the coefficients for a quadratic which goes through the points (2,7) and (4,8) and (6,9).
It is a remarkable fact, and certainly not obvious, that the area under a parabolic arc which passes through three equally (horizontally!) spaced points has a simple formula. For example, if the parabolic arc passes through (x,y_{0}) and (x+h,y_{1}) and (x,y_{2}), then the area under it (the shaded region) turns out to be (h/3)[1y_{}+4y_{1}+1y_{2}]
The h/3 and 1 4 1 pattern are "famous". If you want to see a proof of this remarkable fact, please look at p.523 of your textbook. Simpson's rule is gotten by interpolating triples of points furnished by the function y=f(x).
The picture to the right is my attempt to show such interpolation. Again we can ask
So what's the formula?
Here is what happens. The number of subdivisions must be even
to use Simpson's rule. The panels contribute to the definite integral
in pairs.
[(ba)/(3n)][1f(x_{0})+4f(x_{1})+1f(x_{2}]
(panels #1 and #2)+
[(ba)/(3n)][1f(x_{2})+4f(x_{3})+1f(x_{4}]
(panels #3 and #4)+
[(ba)/(3n)][1f(x_{4})+4f(x_{5})+1f(x_{6}]
(panels #5 and #6)+
[(ba)/(3n)][1f(x_{6})+4f(x_{7})+1f(x_{8}]
(panels #7 and #8)+
Again, there are some coincidences. Everything gets multiplied by
[(ba)/(3n)]. The boundary nodes only appear once. The interior nodes,
after you add everything up and notice coincidences, appear with
weights of 4 2 4 2 4 2 4. The 4's and
2's alternate. This is the formula for Simpson's rule used with n
subdivisions (n must be an even integer) on the interval [a,b] with
the function, f(x):
f(x_{1})+f(x_{n})+SUM_{1<j<n, j even}4f(x_{j})
+SUM_{1<j<n, j odd}2f(x_{j})
all multiplied by [(ba)/3n].
Here x_{j}=a=x_{0}+j(ba)/n.
Of course on a computer which does binary arithmetic, multiplication
by 2 and 4 is fast and easy (just shifting).
The error estimate
Simpson's rule with n pieces on the interval [a,b] has the error bound
K(ba)^{5}/(180n^{4}. Here K is some overestimate of
the fourth derivative of f(x).
Observations
It might not surprise you to know that this bound can be verified if
you would be willing to walk through four integrations by
parts. (There are other ways, but that's one way.) The almost bizarre
number, 180, is not really what's important, and neither K nor
(ba)^{4} are very important, also. People use Simpson's rule
because of the 4 in the exponent. That really cuts down computation.
Back to ln(2)
So again we approximate ln(2)=_{1}^{2}(1/x) dx to an accuracy of
+/10^{10}, now with Simpson's rule. Here it is easy to
compute f^{(4)}(x)=24/x^{5}. On [1,2], an
overestimate will occur where x is smallest since x is on the
bottom. Therefore we can take K to be 24. b=2 and a=1, so
K(ba)^{5}/(180n^{4} becomes
(24/180)(1/n^{4}). If I want this to be less than
10^{10}, I must have n^{4} >
(24/180)10^{10}. A suitable n is 172. Let me try:
> evalf(ApproximateInt(1/x,x=1..2,method=simpson,partition=172)); 0.6931471806 > ln(2.); 0.6931471806Please: there are many ways to do computations. What is important to observe here is that:
cos(x^{2})16x^{4}+sin(x^{2})24x^{2}+sin(x^{2})16x^{2}cos(x^{2})16x^{2}+sin(x^{2})16x^{2}cos(x^{2})8+sin(x^{2})8x^{2}cos(x^{2})4cos(x^{2})2x. 16·2^{4} + 24·2^{2} + 16·2^{2} + 16·2^{2} + 16·2^{2} + 8 + 8·2^{2} + 4 + 2·4I think the sum of the bounds is 596. Sigh. By the way, if I were doing Simpson's rule estimates as a fulltime job, I certainly would notice some structure in the fourth derivatives, and I would take advantage of this structure. But I am only a tourist.
Now K(ba)^{5}/(180n^{4} becomes (596·2^{5}/180)1/n^{4}. This will be less than 10^{5} when n^{4}> (596·2^{5}/180)10^{5}. Sigh. The first even integer greater than this is 58.
> evalf(ApproximateInt(cos(x^2),x=0..2,method=simpson,partition=58)); 0.4614614463 > evalf(int(cos(x^2),x=0..2)); 0.4614614629I hope now you feel good.
In fact what's usually done by Maple and by your graphing calculators to integrate numerically is even more sophisticated. I will try to tell you later about this. But part of the strategy that's used is adaptive  pay more attention (more subdivisions!) when the function wiggles a lot.
If you would like to see what people in numerical computing now consider interesting and challenging problems, please look at this.
HOMEWORK
Sigh. Keep reading. Keep doing problems. On Wednesday we begin to
study improper integrals.
Change in exam date, and other matters
I want to change the exam date from Monday, October 10, to Monday,
October 17, beginning at 5 PM. I'll announce the location later. I
will be more definite in what the exam will cover shortly.
No calculators or computers or notes will be allowed. The Math 152 formula sheet for the
first exam will be included with the exam.
Mr. Scheinberg did a number of problems from sections 7.1, 7.2, and 7.3: a wonderful feat.
The shambles then resumed.
shambles
A dictionary says this is "A scene or condition of complete disorder
or ruin." Historically the word meant "a place where meat is
butchered and sold." It then took on the connotation "a place or
scene of bloodshed" which I did not mean. I wanted to indicate great
disorder. Sigh.
What is ln(2)?
Well, according to the actual definition of ln(2), it is _{1}^{2}(1/x) dx. Most of us would now
use a calculator or a computer to obtain a decimal approximation to
this number. Years ago a table might have been used. How would the
decimal approximations be computed? I'll try to outline some ways. I
will return to this later in the semester, but I am using the question
to get an idea of how to approximate definite integrals
numerically. There are other ways to compute ln(2).
One answer
Suppose I wanted, say, 10 digit accuracy for ln(2). Some strategy
might be useful. I could precompute all likely candidates for
evaluation of logs (actually build a table!) and then store them in
the calculator. Let's see: suppose I want to be able to specify 10
digit accuracy for numbers between 1 and 2 and supposed I want a 10
digit answer for each of them. Well then, I would need to store
10^{10}·10^{10}=10^{20} decimal digits
of information, which is about 3.3·10^{20} bits. Uhhhh
... a terabyte is one
trillion bits, that's about 1,000,000,000,000 bits. So this would
be more than 10^{8} terabytes. That is far too much to store.
Here's another difficulty: on my PC at home (fairly fast, fairly new)
computing 10,000=10^{4} values of log took a bit more than a
second. So computing 10^{10} logs would take ... more than
10^{6} seconds. O.k.: that's a few weeks, so it is
certainly possible.
In fact, the calculator actually approximates each value of log as it
is requested. The simplest way might be with a Riemann sum.
Riemann sums and their error
We could approximate by a Riemann sum. The picture to the right is
supposed to be a graphical description. We divide the interval into n
equal parts. We take the function value at, say, the right endpoint,
and multiply by the width. So the value we get is SUM_{j=1}^{n}(1/[1+{j/n}])(1/n). The
error in one part is the red (almost) triangularshaped region. Each
red triangle has width 1/n. We can move all the error triangles
horizontally so they don't overlap and fit inside a box of width 1/n
and height (1/1)(1/2). So the total error will be less than
1/(2n). If I want the total error to be less than 10^{10}, I
just need to take about 5·10^{9} rectangles. Uhhh
... let's see: about 10,000 additions on my computer took on the order
of oneone hundreth of a second. Therefore 10^{9} additions
would take about 10^{3} seconds. I don't want to wait that
long (20 minutes?). Also, I should remark that floating point addition
(that is, addition of decimal numbers rather than exact integer
addition) leads to fuzzy answers: there tends to be an accumulation of
inaccuracy. For example, with 10 digit accuracy, the sum of 1/j as j
runs from 1 to 10,000 is 9.78780...., but with 3 digit accuracy, this
number becomes 9.79. Try to avoid lots of arithmetic, because it takes
time and it decreases accuracy.
Better integral approximations I: trapezoids
We can try to use other geometric objects to approximate the
integral. The simplest improvement might be trapezoids instead of
rectangles. So we divide the interval up again into n equal parts. Now
if the parition of the interval [a,b] is labeled
a=x_{0}<x_{1}<x_{2}<x_{3}<...<x_{,}=b
where x_{j}=a+([j{ba}]/n) (sometimes [ba]/n is called h so that
x_{j}=a+jh), the trapezoid rule approximates the
j^{th} area by the
(average of the bases)·(height)=(1/2)[f(x_{j})+f(x_{j+1})]h.
A picture of a trapezoid and its error is shown to the right.
The error analysis for the trapezoid rule is complicated. In
class, I followed some
notes written by Professor Ed Bender of the University of California
at San Diego. Please look at these notes and print them out. The
error analysis is famous for using strange parts in integration
by parts . The final answer will be very neat, but, as I mentioned in
class, this derivation is definitely known to be intricate.
I will finish this next time, and discuss Simpson's rule as well. I'll discuss how to use these error estimates, and what, as students, you should be able to do.
Students (were) volunteered to work on some antiderivatives.
3  u^{2}+3u+2 )3u^{2} 3u^{2}+9u+6  9u6So we have taken the fraction 3u^{2}/[(u+1)(u+2)] and rewritten it as 3+{(9u6)/[(u+1)(u+2)]}: we have a quotient (3) and a remainder (9u6). The fraction (9u6)/[(u+1)(u+2)] has an advantage: the degree of the top (1) is less than the degree of the bottom (2). Such a rational function is called a proper rational fraction. This can be split up:
Put this together as I have asked you not to (!) and the result is now:
/1+sin(x)\ ln(sqrt+C \1sin(x)/Several people recognized that cos(x)/[1{sin(x)}^{2}] is cos(x)/[cos(x)]^{2} which is 1/cos(x) which is sec(x) whose antiderivative is supposed to be ln(sec(x)+tan(x))+C. Well.
Therefore
/1+sin(x)\ ln(sqrt+C=ln(sec(x)+tan(x))+C \1sin(x)/In fact, if you plug in x=0, you will see the two formulas agree at 0. But these are two functions which have the same derivative (do you doubt me!) and which agree at a point. Therefore (Mean Value Theorem) the functions agree.
u^{2}1 A Bu+C  =  +  u(u^{2}+1) u u^{2}+1Put the fractions together, and let's just look at the top:
Method 2
Look at [e^{2}e^{x}]/[e^{x}+e^{x}] dx
and casually notice that the top of the fraction is the
derivative of the bottom of the fraction. Therefore (if you wish, use
the substitution w=e^{x}+e^{x} so the integral
becomes dw/w) the antiderivative is just
ln(e^{x}+e^{x})+C.
Maple?
I wondered what Maple would do. So I tried various
"questions". Here is my dialog with Maple.
> int((exp(x)exp(x))/(exp(x)+exp(x)),x); ln(exp(x) + exp(x)) > int(exp(x)/(exp(x)+exp(x)),x); 2 1/2 ln(exp(x) + 1) > int(exp(x)/(exp(x)+exp(x)),x); 2 ln(exp(x))  1/2 ln(exp(x) + 1) > int(tanh(x),x); ln(cosh(x))The first line shows recognition of the simple substitution. The second and third lines coerce (?) Maple to do pieces of the integral the "other" way, although no simplification of ln(exp(x)) is performed. Finally, the fourth line urges Maple to "think" (!) in terms of hyperbolic functions, and, indeed, cosh(x)=(e^{x}+e^{x})/2, so the answers ln(e^{x}+e^{x})+C and ln(cosh(x)) are "the same" (the 2 disappears in the +C).
> int(1/(x+sqrt(x)),x); 1/2 ln(x  1) + 2 arctanh(x )The function arctanh is the inverse to tanh. Maple also will convert this into things that we might better. Remember, % refers to the previous answer.
> convert(%,ln); 1/2 1/2 ln(x  1) + ln(x + 1)  ln(1  x )But our answer is 2 ln(sqrt(x)+1). Please notice that ln(x1) in Maple's answer is ln({sqrt(x)1}{sqrt(x)+1})and use properties of log to check that the answers are the same. And, no, I don't know why Maple gives that more complicatedlooking answer.
u^{2}u+1  u+1 ) u^{3} +1 u^{3}+u^{2}  u^{2} +1 u^{2}u  u+1 u+1  0There is no remainder, thus verifying that u+1 divides u^{3}+1. And we know u^{3}+1=(u+1)(u^{2}u+1).
Now we need to split up the fraction. In this case, u^{2}u+1 has no real roots because the discriminant, 14=3, is negative. The partial fractions method then advises that we put an unknown linear term on top. So:
2 A Bu+C A(u^{2}u+1)+(Bu+C)(u+1)  =  +  =  u^{3}+1 u+1 u^{2}u+1 (u+1)(u^{2}u+1)Since the bottoms are the same, the tops must agree, and so we need to selection A and B and C so that
Finding an antiderivative of ({1/2}u+{1/2})/(u^{2}u+1) "by
hand" needs more algebraic massaging. The official method uses
completing the square. The denominator u^{2}u+1 can be
written as a sum of two squares. Here's the method in action:
u^{2}u+1=u^{2}u +1=u^{2}2·({1/2}u)+(1/2)^{2}(1/2)^{2}+1=(u{1/2})^{2}+(3/4)=(u{1/2})^{2}+({sqrt(3)/2})^{2}.
Therefore if I make the substitution w=u{1/2}, so u=w+{1/2}, du=dw, and
{1/2}u+{1/2}={1/2}(w+{1/2})+{1/2}={1/2}w+{3/4}, then
[({1/2}u+{1/2})/(u^{2}u+1)]=({1/2}w+{3/4})/[w^{2}+({sqrt(3)/2})^{2}] dw
Etc. You should see how I'd now get another log term, and an arctan term, etc. This is what I would expect Maple to deliver:
1/2 1/2 1/2 1/2 (2 x  1) 3 1/2 1/3 ln(x  x + 1) + 2/3 3 arctan() + 2/3 ln(x + 1) 3I got that answer, which is correct, with some effort. I had to coax Maple. This is just about the same answer as Mathematica gave. To my surprise (and, no, I can't explain it!) here is what I got from int without effort:
> int(1/(x^2+sqrt(x)),x); 1/2 2 1/2 (2 x + 1) 3 1/6 ln(x + x + 1) + 1/3 3 arctan() + 1/3 ln(x  1) 3 1/2 1/2 1/2 1/2 (2 x + 1) 3 1/2 + 1/6 ln(x + x + 1) + 1/3 3 arctan()  1/3 ln(x  1) 3 1/2 1/2 1/2 1/2 1/2 (2 x  1) 3 + 1/3 ln(x + 1)  1/6 ln(x  x + 1) + 1/3 3 arctan() 3
> int(arctan(x^2),x); 2 1/2 2 1/2 x  x 2 + 1 1/2 1/2 x arctan(x )  1/4 2 ln()  1/2 2 arctan(x 2 + 1) 2 1/2 x + x 2 + 1 1/2 1/2  1/2 2 arctan(x 2  1)
A description of the partial fractions algorithm, including some
comments on practicality
I am lazy. Here is a
description of the algorithm. I just remarked that even good computer
programs can't do much. For example, here is what Maple
returns for a fairly random and not too complicated rational
function:
> int((3*x^35*x+7)/(x^10+x^21),x); /   \ 137154083802815920 5 110665660860947392 4 1/7  ) _R ln(x +  _R   _R  / 212990588123587127063 212990588123587127063   \_R = %1 15598989049376026276 3 21098962804522333280 2 16001084732854238722   _R +  _R   _R 212990588123587127063 30427226874798161009 4346746696399737287 \ 3868141590333873596  2 1/2 1/2 2 1/2 + )  1/7 ln(x  3 x + 1) + 1/12 3 ln(x  3 x + 1) 620963813771391041   / 1/2 11 1/2 1/2 1/2 2 1/2  3/2 arctan(2 x  3 ) +  arctan(2 x  3 ) 3  1/12 3 ln(x + 3 x + 1) 21 2 1/2 11 1/2 1/2 1/2  1/7 ln(x + 3 x + 1)   arctan(2 x + 3 ) 3  3/2 arctan(2 x + 3 ) 21 6 5 4 3 2 %1 := RootOf(33856 _Z  135424 _Z  3741456 _Z + 49263424 _Z  306123972 _Z + 906118192 _Z  1018981999)By the way, here is what might look like the same command, and its response:
> int((3.*x^35.*x+7.)/(1.*x^10+1.*x^21.),x); 2.056745787 ln( x + 0.8688369618 ) + 0.1428571429 I ( 2 2.535287030 ln((x + 0.3698142048) + 1.014201379) + 2.780406266 arctan(1.007075657, x + 0.3698142048)) 2 + 0.3972008951 ln((x + 0.3698142048) + 1.014201379) + 0.7243677229 arctan(1.007075657, x + 0.3698142048)  6.461457454 I (0.5000000000  0.5000000000 signum(x + 0.8688369618))  0.7243677229 arctan(1.007075657, x + 0.3698142048) + 0.1428571429 I ( 2 2.535287030 ln((x + 0.3698142048) + 1.014201379) + 2.780406266 arctan(1.007075657, x + 0.3698142048)) 2 + 0.4098157329 ln((x  0.3698142048) + 1.014201379) + 0.1084546750 arctan(1.007075657, x  0.3698142048) + 3.186018237 I (0.5000000000  0.5000000000 signum(x  0.8688369618))  0.1084546750 arctan(1.007075657, x  0.3698142048) + 0.1428571429 I ( 2 0.3795913623 ln((x  0.3698142048) + 1.014201379) + 2.868710130 arctan(1.007075657, x  0.3698142048)) + 1.014141102 ln( x  0.8688369618 ) + 0.1428571429 I ( 2 0.3795913623 ln((x  0.3698142048) + 1.014201379) + 2.868710130 arctan(1.007075657, x  0.3698142048)) 2 + 0.001480424440 ln(x  1.732050808 x + 1.)  0.5927352913 arctan(2. x  1.732050808) 2  0.2871947102 ln(x + 1.732050808 x + 1.)  2.407264709 arctan(2. x + 1.732050808)When the decimal points are given, the responses are include "approximate" decimal numbers.
What (historically!) to do until the computer comes ...
Look for a table of integrals! This is what everyone used to
do. Every scientist and engineer would own some tables. For two bucks
or less, you can buy a Dover reprint of Tables of Indefinite
Integrals by G. Petit Bois (a reprint of a 1906 edition). Huh!
Impress your friends. Or there are much longer books. Just search
Amazon for tables of indefinite integrals and glance
at some of the results.
What's an algorithm?
A precise definition of algorithm is difficult, which is interesting since the concept is central to much of mathematics and computer science during the last quarter century. It is as vital and important to such study as the sonnet is to the history and practice of poetry. Here are some quotes from Knuth's The Art of Computer Programming.
He concludes his comparison by writing:
... a computer
programmer can learn much by studying a good recipe book.
Partial fractions
This is the last antidifferentiation method I'm supposed to show
you. It is a way of algebraically transforming rational functions into
an equal sum of rational functions which are "easy" to integrate.
I did a sequence of examples, similar to those which follow. This was very uninspired.
2x+7 A B  =  +  (x3)(x2) x3 x2Combine the fractions and the result is [A(x2)+B(x3)]/[(x3)(x2)]. This will equal (2x+7)/[(x3)(x2)], which has the same denominator (bottom!) when the tops are identical. We need A and B so that
One way Expand out and get Ax2A+Bx3B=2x+7 so that (A+B)x+(2A3B)=2x+7. Then we have the system of two linear equations in two unknowns:
A+ B = 2 (x coefficient) 2A3B = 7 (constant coefficient)There are many ways to solve such a system. One way is guessing. Another way is to realize that A=2B so that 2A3B=7 is 2(2B)3B=7 and 4B=7 and B=11. Then, since A=2B, A must be 13.
A+B=0 A+B=1has no solutions (the technical name is inconsistent). And such systems may have infinitely many solutions:
3A+3B=5 6A+6B=10But the systems that arise in using partial fractions will always have a unique solution. Interesting, huh?
Another way Here I want to take advantage of what we already
know, that A and B don't come from a random situation but rather from
some stuff involving x. So we know that
A(x2)+B(x3)=2x+7
We can look at some magic numbers. For example, if x=2,
then the A term drops out and we get B(23)=2·2+7=9 so B=11. And
when x=3, the B term drops out and we get
A(32)=2·3+t=13 so A=13.
To me the second way is quicker and easier.
Now we know
2x+7 13 11  =  +  (x3)(x2) x3 x2The pieces are easy to antidifferentiate. The result is 13 ln(x3)11 ln(x2)+C.
/(x3)^{13 }\ ln + C \(x2)^{11 }/Please don't do this sort of thing in Math 192, or, probably anywhere. Also it is horrible to typeset in html.
5x^{2}4x+7 A B C  =  +  +  x(5x3)(4x) x 5x3 4xWow. Combine the fractions on the righthand side. I will just write out the top, which is A(5x3)(4x)+Bx(4x)+Cx(5x3). This should be equal to the "other" top, which is 5x^{2}4x+7.
5x^{2}4x+7 [7/12] [160/51] [71/68]  =  +  +  x(5x3)(4x) x 5x3 4xNow I put some additional wrinkles in this example. Heh, heh, heh. The antiderivative of 1/x is certainly ln(x) (actually, I should write ln(x), but I am lazy). But what about the antiderivative of 1/(5x3)? I would like it to be something like ln(5x3), but (chain rule or substitution method) there is an additional 5 to put in. So its antiderivative is actually (1/5)ln(5x3). And what about 1/(4x)? Its antiderivative, for a similar reason, is ln(4x). Putting it all together (more pedantically, using linearity) the antiderivative of (5x^{2}4x+7)/[x(5x3)(4x)] is [7/12]ln(x)+[160/51](1/5)ln(5x3)+[71/68]{ln(4x)}+C.
Or we could ...
Try Maple:
>int((5*x^24*x+7)/(x*(5*x3)*(4x)),x); 32 71 7/12 ln(x) +  ln(5 x  3)   ln(x  4) 51 68and this computation took about .02 seconds.
2x^{2}+3x5 A B C  =  +  +  x(x5)^{2} x x5 (x5)^{2}If you've never seen this before, it looks very weird. It can be proved proved proved that it works: there will be unique A and B and C satisfying this equation. And the leads to successful antidifferentiation, since we'll see that each piece can be "easily" antidifferentiated. I say, proved proved proved: this is all not obvious but I can't do it in this course. There are other ways of writing the partial fraction method, but what I'm describing here is what's in the text, and also what is most common.
Now we need to compute the antiderivative of
2x^{2}+3x5 1/5 9/5 8  =  +  +  x(x5)^{2} x x5 (x5)^{2}The antiderivative of the first piece is certainly (1/5)ln(x), and that of the second piece, (9/5)ln(x5). What about the antiderivative of 8(x5)^{2}? If you make the substitution u=x5 so du=dx, we need an antiderivative of 8/u^{2} "du" and this is 8/u which is 8/(x5). So the whole answer is:
In answer to your unvoiced question, yes, I sure did check this answer with my silicon pal.
HOMEWORK
Read and do problems
from 7.1, 7.2, 7.3, and 7.4. Practice is essential.
Applications of these ideas occur in many places in statistics, in engineering (certainly in signal processing), and elsewhere.
Here is a link to the text of Flatland by Edward A. Abbot. The book is more than a century old. It imagines how two dimensional creatures might live and behave. It also has serious elements of social satire. The book is still a fun and rapid read, and there are many contemporary references to it. A very cheap Dover (paperback) reprint is also available.
HOMEWORK
Read and do problems
from 7.1, 7.2, and 7.3. Practice is essential.
HOMEWORK
Read and do problems from 7.1, 7.2, and 7.3.
Here is a link to what we did in class about integrating powers of cosine and getting Wallis's formula.
Here's a link to a biography of Wallis.
Here is a link to how the decimal expansion of Pi is efficiently computable to quadrillions (that's 10^{12} digits!). I will try to tell you about some of these ideas later in the course.
How to antidifferentiate
Suppose f(x) is a function defined by a formula involving familiar
functions. Familiar functions would include polynomials,
n^{th} roots, trig and inverse trig functions, exponentials
and logarathms, and perhaps others. The word involving would
include methods of creating new functions by arithmetic (sum, product,
division) and composition. Here's the problem:
find a function, F(x), so that
F´(x)=f(x).
It turns out that sometimes there may not be such a function. For example, these functions arise frequently in applications: e^{x2} and sin(x)/x. Both of them have no antiderivative which can be written in terms of familiar functions.
Most symbolic algebra programs can use all the techniques we will see. BUT it is a very good idea to learn how the techniques work and also the sorts of answers to expect. For example, we will see that the antiderivative of a rational function (quotient of polynomials) can certainly have an arctangent, but it should not have an exponential. Also, sometimes the darn programs just don't work, even when they should. My favorite example of this in Maple (and I presume there are suitable examples with other programs) is the following sequence of antiderivatives:
Mathematica can!
I tried my examples on Mathematica, and that program can keep
track of the nested square roots, and compute the antiderivative. On
the web, this web page
allows access to the Mathematica antidifferentiation
routine. But it can't handle Sqrt[1+Sqrt[1+Sqrt[1+Sqrt[x]]]] which the
program I used (Mathematica 4.1) can integrate. I have never
understood Wolfram's products.
sqrt(1x^{2}) dx
Well, we know that
_{0}^{1}sqrt(1x^{2}) dx
is Pi/4 since it is a quarter of a circle. What about
_{0}^{1/2}sqrt(1x^{2}) dx?
Now maybe we need to come up with an antiderivaitve of
sqrt(1x^{2}). I will discuss this as I did in class, in spite
of the sneers and gibes which greeted my honest efforts
to disclose my thinking.
Word of the day gibe As a noun, this can mean "a derisive remark".
If I want to get a substitution to make sqrt(1x^{2}) nice, that means: x=? and then sqrt(1?^{2})=! should also be nice. But then 1?^{2}=!^{2}, so we need two functions, preferably familiar functions, so that ?^{2}+!^{2}=1. We get only one guess here: I will take ?=sin(theta). Then sqrt(1x^{2})=sqrt(1sin(theta)^{2})=cos(theta) and dx=d(sin(theta))=cos(theta) d(theta). The whole integral becomes sqrt(1x^{2}) dx=(cos(theta))^{2}d(theta).
Another way ...
We certainly can now use the reduction formula we've already derived. Let
me show you another way, which some people like. We know:
1 = (cos(theta))^{2}+(sin(theta))^{2} cos(2theta) = (cos(theta))^{2}(sin(theta))^{2}Add these formulas, and get 1+cos(2theta)=2(cos(theta)^{2} size=+1>), so that
Fact sqrt(1x^{2}) dx=(1/2)([x·sqrt(1x^{2})+arcsin(x))
If you don't believe this, you have the option to differentiate the
righthand side and check that it is sqrt(1x^{2}). This is
possible.
Now, finally, _{0}^{1/2}sqrt(1x^{2}) dx=(1/2)([x·sqrt(1x^{2})+arcsin(x))]_{0}^{1/2}. The x=0 terms contribute nothing, and the other terms give (1/2)(1/2)sqrt(1(1/2)^{2})+arcsin(1/2).
I knew this all the time ...
I do know arcsin(1/2)  one of the few values of this function that I
"know".
So the answer is (1/2)(1/2)(sqrt(3)/2)+Pi/6. Well, look at the picture, darn it! The
horizontally striped triangle has "legs" of length 1/2 and sqrt(3)/2, so that gives
(1/2)(1/2)(sqrt(3)/2) area. The circular pie slice has area Pi/6.
It is almost never possible to check an integral computation using such neat
area facts. This is just a cute example.
1/sqrt(1+sqrt(1+x^{2}) dx
Here I put ?=x so !=sqrt(1+?^{2}) and we see that we need
functions which satisfy !^{2}?^{2}=1. So we look
towards ... which is it? Ahhh ... sec(theta)=! so tan(theta)=!. And
since x=sec(theta), dx=sec(theta)tan(theta)d(theta).
The integral
1/sqrt(1+sqrt(1+x^{2}) dx
becomes
1/tan(theta) sec(theta)tan(theta)d(theta)=sec(theta)d(theta). Look: it should not be surprising if
things turn out nice. The substitution is selected to make it all
work.
What is the antiderivative of secant?
Let's see: there's lots of history here. You can go to
Google and get some interesting references. But one
antiderivate of secant is ln(sec(theta)+tan(theta)). Why is this?
Well, differentiate. The chain rule gives
1 2  (sec(theta)tan(theta)+sec(theta) ) sec(theta)+tan(theta)and, wonders!, exactly the right stuff cancels and we get just sec(theta). You can look up lots of clever derivations of this. I just want to use it.
Now to go back to xland. Since x=sec(theta) and
sqrt(1+x^{2})=tan(theta),
ln(sec(theta)+tan(theta))=ln(x+sqrt(1+x^{2}). Therefore
img src="gifstuff/is6.gif"
width=6>1/sqrt(1+sqrt(1+x^{2}) dx=ln(x+sqrt(1+x^{2})+C
I remarked in class that Maple gives the answer,
arcsinh(x) so maybe I should tell you about the hyperbolic
functions some time.
HOMEWORK
Read and do problems from 7.1, 7.2, and 7.3.
Another great experience!
Of course Mr. Scheinberg did a terrific job answering questions. I am
happy.
x(x+1)^{1/3}dx
I did this integral two different ways, just for fun. Sigh.
u dv = uv  v du u= x} {du=dx dv=(x+1)^{1/3}dx} {v=(3/4)(x+1)^{4/3}Therefore x(x+1)^{1/3}dx=x((3/4)(x+1)^{4/3})(3/4)(x+1)^{4/3}dx=x((3/4)(x+1)^{4/3})+(3/4)(3/7)(x+1)^{7/3}+C. So the answer also is x((3/4)(x+1)^{4/3})+(3/4)(3/7)(x+1)^{7/3}+C!
Compare and contrast ...
It is not clear to me that the two answers are the same (well,
they both have "+C"!). This frequently happens when
antidifferentiating complicated functions. There can be more than one
algorithmic "route" to the answer and the appearance can be very
different. These answers actually are the same, but it takes
some algebra to verify the fact. Maple reports:
>int(x*(x+1)^(1/3),x); 4/3 3 (x + 1) (3 + 4 x)  28Does that help?
arctan(x) dx
Integrate by parts, with u=arctan(x) and dv=dx. Then du=[1/(1+x^{2})]dx and v=x.
And uvv du is
x·arctan(x)x/(1+x^{2}) dx. The last
integral can be computed with the substitution w=1+x^{2}. Then
x/(1+x^{2}) dx becomes (1/2)dw/w which has antiderivative (1/2)ln(w)=(1/2)ln(1+x^{2}). Putting it all together,
arctan(x) dx=x·arctan(x)(1/2)ln(1+x^{2})+C.
QotD
What is ln(x) dx? This should follow the same pattern
as the previous antiderivative.
e^{3x}sin(5x) dx
We will integrate by parts twice, in the correct order. But it turns
out that there is an easier way to do this that physicists and
engineers all know. We'll see it later.
I finally moved on and began to discuss integration by parts. In an effort to further broaded student horizons ("liberal arts education" indeed!) I messed up a quotation from a short story written by Arthur C. Clarke, collected as one of his "Tales from the White Hart". Here's the correct quote:
"...But noone expected he'd ever get very far, because I don't
suppose he could even integrate e to the x." "Is such ignorance possible?" gasped someone. "Maybe I exaggerate. Let's say x e to the x. ..." 
Integration by parts is certainly the most important
antidifferentiation algorithm (o.k.: I guess more elementary and more
often used is substitution, but let me make the assertion). Now that
there are programs which can do lots of antiderivatives, we can still
see that integration by parts turns out to give lots of unexpected
information, and even insight. Let's get to it, finally:
The
product rule states that
(f·g)'(x)=f'(x)g(x)+f(x)g'(x). Therefore
f'(x)g(x)=(f·g)'(x)f(x)g'(x). And let's integrate:
inxf'(x)g(x) dx=inx(f·g)'(x) dxinxf(x)g'(x) dx. Now certainly inx(f·g)'(x) dx=f(x)g(x), because an antiderivative of a derivative is the original function. So we have:
Integration by parts
inxf'(x)g(x) dx=f(x)g(x)inxf(x)g'(x) dx.
The only way you see why this is incredibly cute is by using it. So let's do it, with the obvious first example.
What is inxxe^{x} dx?
We use the equation inxf'(x)g(x) dx=f(x)g(x)inxf(x)g'(x) dx
to exchange what seems to be an intractable integral for what we hope is a better one.
Our template is f'(x)g(x) and we are given xe^{x}. What can we
select as f'(x) and what then must become g(x)? There are a few
choices but here let's try f'(x)=e^{x} and g(x)=x. Then
f(x)=e^{x} and g'(x)=1. So:
inxf'(x)g(x) dx=f(x)g(x)inxf(x)g'(x) dx becomes inx e^{x} x dx= e^{x} x inxe^{x}1dxWe have "traded in" inxe^{x}x dx for the "nicer" integral inxe^{x}1dx with a "penalty" of e^{x}x. Here the qualitative word "nicer" is just used in the sense of, "Hey, an integral we can compute easily!" Of course, inxe^{x}1dx=e^{x}+C, so we get our final answer, that
Of course if you don't believe the answer you can just ... differentiate. And, indeed, you will need the product rule, and things will work out just fine.
How to really do the example
Most people I know will write the following template, if they think
that integration by parts will do them some good:
inxxe^{x} dx= inx u dv = uv  inx v du u= } {du= dv= } { v=and attempt to make a selection of u which then allows the other spaces to be filled in. Here is what would happen in this case:
inxxe^{x} dx=xe^{x}inxe^{x}dx inx u dv = uv  inx v du u=x } {du=dx dv=e^{x}dx} { v=e^{x}and then we could merrily finish the computation by integrating e^{x} as before. There are certainly other ways of writing the computation (such as "tabular integration"), but this way is what's most familiar to me. I confess that sometimes I try to skip some steps, and don't write the details. Then my "penalty" is that I frequently have to do the computation again (and maybe even another time) because I make mistakes. Sigh.
Another example
Let's try inxx^{2}e^{x} dx. Here we go:
inxx^{2}e^{x} dx= inx u dv = uv  inx v du u= } {du= dv= } { v=Now there are more possibilities for the parts u and dv. But if we look ahead, if we try to anticipate a little bit, why then ... let's use u=x^{2} and dv=e^{x}dx.
inxx^{2}e^{x} dx=x^{2}e^{x}inxe^{x}2x dx inx u dv = uv  inx v du u=x^{2} } {du=2x dx dv=e^{x}dx} { v=e^{x}Is this good? Well, we have made some progress. We have pushed "down" the power of x and now we may recognize (if we pull out the constant 2) an integral we've already done. So:
I could continue, and do x^{3}e^{x} and then
x^{4}e^{x} and even x^{5}e^{x} and ... but maybe there is a more systematic way to write things.
A first example of a reduction formula
Write inxx^{n}e^{x}dx, where n is a positive integer,
in terms of stuff+an integral with an x term lower in degree. So:
inxx^{n}e^{x} dx= inx u dv = uv  inx v du u= } {du= dv= } { v=(People who have written computer programs will recognize this as an example of recursion.) What should we choose as u? To lower the degree, I will choose u=x^{n}. Then all the other entries can be filled in rather easily, so:
inxx^{n}e^{x} dx=x^{n}e^{x}inxe^{x}nx^{n1}dx inx u dv = uv  inx v du u=x^{n} } {du=nx^{n1}dx dv=e^{x}dx} { v=e^{x}And here is our desired reduction formula:
We can even make this a bit more interesting, by finding and stating a reduction formula for inxx^{n}e^{ax} dx, for n, a positive integer and a, some constant. There are a few little changes:
u=x^{n} } {du=nx^{n1}dx dv=e^{ax}dx} { v=(1/a)e^{ax}so the formula becomes:
QotD
Well I asked for inx(x^{2}3)e^{5x}dx but I really did
expect people to use the formulas I developed, not to attempt to
derive them again. Sigh. What a mess.
(x^{2}3)e^{5x}=(x^{2}e^{5}3e^{5x} and then the first part becomes
(1/5)[x^{2}e^{5}(2/5){(1/5)xe^{5}(1/5^{2})}] etc. Sigh.
> int((x^23)*exp(5*x),x); 2 1/125 (73  10 x + 25 x ) exp(5 x)HOMEWORK
Another work problem
I tried to do problem #16 in section 6.4 (p.463):
A bucket that weighs 4 lbs and a rope of negligible weight are used to draw water from a well that is 80 ft deep. The bucket is filled with 40 lb of water and is pulled up at the rate of 2 ft/s, but the water leaks out of a hole in the bucket at a rate of 0.2 lb/s.
Find the work done in pulling the bucket to the top of the well.
Mr. J. Wolf, a smart physics major at Rutgers, read this problem, thought for a bit, and remarked, "Oh yeah, you need to write the bucket's weight as a function of the depth." Indeed, that's more or less the whole point, but it took us a while to get there. Experience helps a great deal in these problems.
We discussed the problem. The bucket takes 80/2=40 seconds to travel to the top of the well. After t seconds (where 0<t<40), the bucket weighs 44.2t lbs. Well, but work is force·distance, and time has nothing to do with it (in this physical approach). So if we measure the depth of the well from the top of the well using feet, and call x the distance, then x is between 0 and 80. The bucket is at depth x when x=802t, so t=40.5x, and the weight of the bucket at that time is 44.2(40.5x)=36(1/10)x. The weight varies as a function of the height. Now if we pull the bucket up dx feet (a really tiny length) when it is at a depth of x feet, then we are doing [36(1/10)x]dx work, a little bit of work, which we could call, uhhh ... dw. The total work is the Sum of all the pieces of work, so that the total work is _{0}^{80}[36(1/10)x]dx. I believe I actually evaluated this integral, and got 36(80)(80)^{2}/20 ftlbs.
Is the answer correct? Well, if the bucket did not leak at all,
we would need 80(44) ftlbs of work and this is less. And one clever
student (I've got to learn your names!) suggested that a
better estimate might be to take the bucket's weight at the middle
and multiply by 80, and this is close to the answer, also.
This problem is difficult for me. It has a lot of numbers in it, and
all of the numbers are needed. And the definition of work is needed
also. And ... and ... well, it just seems hard to me. I thought
doing this problem after "emptying the pool" last time would make an
interesting constrast. And I got to draw the well (lovely colors!).
Drawing a picture or diagram would have been the first thing I did
as I thought about the problem.
Average or mean value
Mean value of an integral
Suppose the function f is defined on the interval The definiti
Example
Uhhh ... it's gotta be the mean value of x^{2} on [0,1].
That mean value is [1/(10)]_{0}^{1}x^{2}dx=1/3.
QotD
The Question of the D was the
following:
Suppose we have a function whose mean value on the interval [1,4] is
7, and whose mean value on the interval [4,6] is 13. What is the mean
value of this function on the interval [1,6]?
Of course, this is a mean and nasty question. A very naive person might think that the mean value was the average of the given mean values, but that would ignore the differing lengths of the intervals. So what's the solution? Well, I will copy what K. Waters wrote, which is correct, careful, and complete:
7(3)+13(2) 21+26 47  =  =  5 5 5 _{1}^{4}f(x) dx=21 _{4}^{6}f(x) dx=26 _{1}^{6}f(x) dx=47 1 47 _{1}^{6}f(x) dx= 61 5Multiply each average value by the length of the interval to find the individual integrals. Combine the integrals to find the integral on [1,6]. Divide this by (61) to find the average value on [1,6], which is 47/5.
One fact
The mean value theorem for integrals: if a function f is continuous in the interval [a,b], then
there must be at
least one c in [a,b] with f(c)=[1/(ba)]_{a}^{b}f(x) dx.
This result is occasionally useful.
Counter(?)example
The following neat and simple not continuous function was
suggested: define f on the interval [1,1] by f(x)=3 for x<0 and
f(x)=3 for x>=0. Then the mean value of f on [1,1] is
{1/[1(1)]}_{1}^{1}f(x) dx is 0, because the
positive and negative "areas" balance out. But the values of f are only 3 and 3, so there is no c with f(c)=0.
Why is the result true?
The real reason to discuss this is so that I can cite several
important results from the first semester of calculus (heh, heh, heh
...).
If a function f is continuous on an interval [a,b], then the function attains its TOP and BOTtom values. That is, there are values of x (at least one of each, maybe more) in the interval so that: f(x_{M})=TOP and f(x_{m})=BOT and for all x in [a,b], f(x_{M})>=f(x)>=f(x_{m}). This result is sometimes called the Extreme Value Theorem and is not at all obvious. For example, the function f(x)=x for x<1 and f(x)=x1 for x>=1 does not satisfy the Extreme Value Theorem (neither the hypotheses nor the conclusion). I'm using x_{M} because maybe a capital M could mean "maximum", just as a small m could mean "minimum".
So now I can integrate the inequality
f(x_{M})>=f(x)>=f(x_{m}) from x=a to x=b. Notice
that the leftmost object is a constant (TOP) and the rightmost object
is also constant (BOT). Therefore I have the following inequality
(because I can integrate constants really well!):
f(x_{M})(ba)>=_{a}^{b}f(x) dx>=f(x_{m})(ba)
Now divide by ba, so that we look at:
f(x_{M})>=[1/(ba)]_{a}^{b}f(x) dx>=f(x_{m})
But, hey, now another of the major theoretical results about
continuous functions can be used: the Intermediate Value
Theorem: f is continuous on [a,b], and therefore every number
between any two values of f (here the two values are f(x_{M})
and f(x_{m}) must be a value of f on [a,b]. This result is
also not obvious. The "in between" number I want to use here is
[1/(ba)]_{a}^{b}f(x) dx. So there must be at
least one c in [a,b] with f(c)=[1/(ba)]_{a}^{b}f(x) dx. And that's it.
A puzzling textbook problem
Here's problem #20 in seciton 6.5, p.467:
If a freely falling body starts from rest, then its displacement is
given by s= {1/2}gt^{2}. Let the velocity after a time $T$
be v_{T}. Show that if we compute the average of the velocities with
respect to t we get v_{ave}={1/2}v_{T}, but if we
compute the average of the velocities with respect to s we get
v_{ave}={2/3}v_{T}.
This makes an excellent workshop problem, if one adds the extra
word/sentence, "Explain."
Guessing an integral
Monte Carlo methods
Wonderful quote
Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin.
John von Neumann
An example?
Here is a chunk of Maple code:
> g:=evalf(rand(0..10^101)/10^10); 9 g := 0.1000000000 10 (proc() (proc() option builtin; 391 end proc)(6, 10000000000, 34) end proc) > seq(g(),j=1..10); 0.3223396161, 0.1434193644, 0.7012963252, 0.6771015081, 0.4121023379, 0.2645048018, 0.9236661736, 0.3118856733, 0.4762458159, 0.4987966881 > 10^(4)*add(g()^2,j=1..10^4); bytes used=8000368, alloc=4521156, time=0.25 0.3337136128The first line creates a procedure (a Maple function) which returns supposedly random numbers in the unit interval, [0,1]. The second input line just displays the first 10 numbers created using the function, and the third line finds the average of the square of ten thousand of these numbers, a Monte Carlo approximation to _{0}^{1}x^{2}dx.
Further results
Below is a table of Monte Carlo approximations, using 10^{n}
samples with n going from 1 to 7.
Number of samples  10  100  1,000  10,000  100,000  1,000,000  10,000,000 

Resulting approximation 
0.2290005751  0.3293312957  0.3561621917  0.3318810478  0.3330243211  0.3337357300  0.3333129117 
An example that wasn't
An example that is, and why
Look at y=x(x1)^{4} for x between 0 and 1. This is a little
lump of area. (Look at the picture to the right!) Suppose we want to
"compute" the volume that this region sweeps out as it is revolved
around the yaxis. We can do this (almost) easily dx, using the shell
method. The integral will be the sum of 2Pi x multiplied by
x(x1)^{4}dx. This mess is a vertical slice, revolved around
the yaxis (radius x). Then add this up from 0 to 1, and the resulting
volume is
_{0}^{1}2Pi
x(x1)^{4}dx. A friend of mine whose life is generated
by atomic number 14 (silicon) tells me this is (1/[15]) Pi.
By the way, the Maple command for this is:
>int(2*Pi*x*(x1)^4,x=0..1);So what about doing this dy, with discs? Well then, we would need to "solve" for x as a function of y in the equation y=x(x1)^{4}. Here is a short history lesson.
Roots of polynomials
This is much more irritating than one would want. Of course, there are
formulas for the roots of quadratic polynomials (polynomials of degree
2). Now this is true also for cubic
polynomials (degree 3) and even for quartic (degree 4)
polynomials. The formulas are very complicated, and I have never
used them. Ir is possible to prove that in general there are no
formulas in terms of commonly known functions for the roots of a
random quintec (degree 5) polynomial. This is a bit distressing. Here it means we can't write "nice" functions for the left and righthand slices of the bump. So we can't "compute" the integral dy.
I guess this is an example of what can happen. I hope this commentary helps. The people who first proved statements about the nonsolvability of certain polynomials "in radicals" were Abel and Galois. So: the Norwegian mathematician, Abel, died at age 27, mostly of poverty. He was smart and original. The French mathematician, Galois, died at age 21, mostly of politics and passion, and more immediately, from an injury suffered during a duel.
Both Abel and Galois realized that most 5^{th} (and higher) degree equations can't generally be solved with a finite algebraic formula. This was almost shocking at the time. A consequence is that curve bounding the region shown above can't be solve for x in terms of y neatly, using familiar functions. There are efficient techniques for numerical approximation.
Torus, Torus, Torus
With washers
With shells
With Pappus
A variety of methods is good ...
Work!
Emptying a swimming pool
Here is a fact, which is probably true: one cubic foot (ft^{3}) of water weighs (approximately?) 62.42796 pounds (lbs). To the right is a picture of "my swimming pool". The sides (there are, including the top, six of them) are all flat. There's one tilted side, as shown, and the others meet perpendicularly. I assume that the pool is totally filled with water, and that I would like to bring all the water to ground level (at the top) and empty the pool. Since the pool is the same in the 20 ft direction, I think it might be sensible to display it (and think about it!) sideways.  
My "coordinate axis" will use the letter x and will measure positively depth in the pool in ft. Ground level will be x=0 and the bottom of the pool will be x=10. A piece of water weighing "blah" lbs at level x in the pool will need blah·x ftlbs of work to raise it to ground level.  
Now take a very thin (dx!) slice (!!) of the pool water at depth x. Look at the picture. The volume will be 20 ft times dx feet times the horizontal width of the slice. The weight will be 62.43·20·(horizontal width)·dx. We will need to lift this to ground level, a distance of x feet. So the work we will need to do to lift this slice of pool water is 62.43(20)x(hor. width) dx.  
How long is the horizontal width? Suppose we call Frog the distance 10x, and Toad, the additional length needed to make up the horizontal width (so, as shown, 40+Toad is the horizontal width). Then Frog/Toad=10/30, so that Toad=(30/10)Frog=3(10x). I think a clever person (not me!) could have predicted this. Look: Toad goes from 30 (at x=0) to 0 (at x=0), just the way it should. So this horizontal width is 40+Toad, which is 40+3(10x). 
... psychology? ...
After class, as I was going home, I asked myself why I had
organized the pool computation the way I did. That is, why did I take
a horizontal slice of water? Why not a vertical slice? Why not an
oblique slice, maybe parallel to the "tilted" side? I don't
know. Certainly at the time the computation "made sense" the way I
organized it. I want to pull up lots of tiny chunks of water. The
major variation seemed (still seems!) the depth, to me. So I organized
the chunks of water to exploit that. Sigh. Does this help? It doesn't
help me. I still would like to understand how I think about these prob
lems.
HOMEWORK
Please look over the problems assigned for sections 6.2, 6.3, and 6.4
of the textbook. Write out solutions for an appropriate number of
them. Make sure you can do all of them.
In the beginning of calculus, there seem to be these two basic
concepts, the derivative and the integral.
The derivative is flashy, and easy to explain.
The definite integral is more subtle and more difficult, but it is
where the big bucks (?) occur. Rather, to be more academic, it is
where the real applications and uses of calculus in engineering and
the physical sciences (as well as biology and economics) occur. The following concepts can be studied using definite integrals:
Example 1 Consider y=x^{2} and y=x^{3} on the
interval [0,1]. These two curves form the boundary of a curvy
region. A drawing of this region is to the right.
Note As I mentioned in class, most examples I'll do with you
will be rather simple. I make enough mistakes with even simple
examples! If I find something interesting, I will probably give it to
you as a workshop problem! But even in the collection of simple
examples, this one (which I worked with for almost an hour!) is
perhaps a bit infelicitous (dictionary says:
"1. Inappropriate; illchosen 2. Not happy; unfortunate.") This is
because there are too many coincidences. The "corners" of the region
have coordinates which are equal: (0,0) and (1,1). This might lead to
confusion. I am sorry. Back to the example.
What is the area of the region enclosed?
The process
First I'll slice up the area in the region with many, many vertical lines. I'll drawn only a few (fear of carpal tunnel syndrome!) but, please, you should imagine 10^{10} of them, all arranged neatly, and very close together. I'll concentrate on just one of these slices. I'll magnify it and analyze it. 
This is supposed to be a really narrow slice. It is so narrow that I can think of it as quite close in shape to a rectangle. The thickness is deltax, and the height is the difference in heights of the bottom curve, called Bottom(x), and the top curve, Top(x). So if this is nearly a rectangle, then the area is nearly the area of a rectangle whose dimensions are deltax and Top(x)Bottom(x). The area of this slice is approximately

In this specific case we have Top(x)=x^{2} and Bottom(x)=x^{3} and Left=0 and Right=1, and so we need to compute
_{0}^{1}x^{2}x^{3} dx
We know antiderivatives of the functions involved, so we may use
FTC and get (1/3)x^{3}(1/4)x^{4}_{x=0}^{x=1}=(1/3)(1/4).
Example 1´ We could also slice horizontally. The
illustration to the right is an attempt to show the very thin slices.
We should really go through a description of this process similar to
what I wrote above, but the pictures actually take some time to
"draw". The result is again a definite integral, but here we are
adding up deltay (sigh, just dy) slices. And the horizontal
length of the rectangles will be a difference of a left length and the
right length, both depending on the value of y. We'll add these slices
up, from bottom to top:
_{Bottom}^{Top}Right(y)Left(y) dy
Here the boundary curves are given by y=x^{2} and
y=x^{3}, and, in this specific case, it isn't too hard to find
the left curve, x=y^{1/2}, and the right curve,
x=y^{1/3}. Due to the dreadful coincidence mentioned earlier, top=1 and bottom=0. The area of the region will therefore be
_{0}^{1}y^{1/3}y^{1/2} dy
and (my examples have easy functions!) we can use the FTC directly to get
(3/4)y^{4/3}(2/3)y^{3/2}_{y=0}^{y=1}=(3/4)(2/3).
We have verified the amazing result obtained from equating the two
computations:
(3/4)(2/3)=(1/3)(1/4)
Example 2 Revolve the region discussed around the xaxis and
find the volume. Here we use the method of washers (no, there doesn't
seem to be a method of dryers). We take one of the vertical slices
(with dx thickness) and rotate it around the xaxis. Here the
"transmogrification" or approximation is to imagine that the result is
a solid washer with the dx side flat, perpendicular to the vertical
side. The side area the difference in area of two circles. There is an
outer circle, with radius Outside(x), and an inner circle, with radius
Inside(x). The thickness is dx, and I think the chunk of volume, dV, for this is Pi(Outside(x)^{2}Inside(x)^{2}) dx. The total volume is gotten by adding up all these dV's to get V (and taking a limit, of course, as the slices get very thin!). The result is a definite integral:
_{Left}^{Right}Pi(Outside(x)^{2}Inside(x)^{2}) dx.
In this specific case, Left=0 and Right=1, of course. The Outside(x) is what I previously called Top(x) and is x^{2}. The Inside(x) is the old Bottom(x) and is x^{3}. So we need to compute _{0}^{1}Pi(x^{2})^{2}(x^{3})^{2}) dx. This is Pi_{0}^{1} x^{4}x^{6} dx= (1/5)x^{5}(1/7)x^{7}_{x=0}^{x=1}=Pi[(1/5)(1/7)].
Example 2´ We can also try to integrate dy to get the
volume when the region is revolved around the xaxis. This didn't seem
known to many people so certainly should have gone slower! (No one
really objected, but still ...) We take one of the dy strips, and
revolve it around the xaxis. Here everything should be written in
terms of y. The radius of the revolving circle is y (the strip is y
"up" from the xaxis) and the width of the strip is
Right(y)Left(y). This idea is called the thin shell method. The next
step (at least in my mind!) is to think of magic scissors which cut
the thin shell or thin strip and then we flatten it out. The result is
pretty close to a rectangular solid (well, almost, maybe, sort of
...). The dimensions of the solid are dy and Right(y)Left(y) and
2Pi y (the last is the circumference of a circle of radius y).
This is dV, a piece of the volume. Now we add these up, from bottom
to top to get the total volume, V. Therefore this formulation of the
volume of the solid of revolution is just
_{Bottom}^{Top}2Pi y(Right(y)Left(y)) dy.
Here we have Top: y=1 and Bottom: y=0, and Right(y)=y^{1/3}
and Left(y)=y^{1/2}. Therefore the volume should be
_{y=0}^{y=1}2Pi y(y^{1/3}y^{1/2}) dy. Again, because this is an example selected by the instructor, we can apply the FTC to it and evaluate:
First, the integral itself is
2Pi_{y=0}^{y=1}(y^{4/3}y^{3/2} dy and this is
2Pi((3/7)y^{7/3}(2/5)y^{5/2})_{y=0}^{y=1}=2Pi[(3/7)(2/5)].
Hot news obtained from equating the two computations:
2[(3/7)(2/5)]=(1/5)(1/7)
I then asked students in the class to compute the volume when the region is revolved around the yaxis, using both methods. We needed some help, especially with the thin shell part (dx in this case).
Around the yaxis
dy: This uses washers. The inner radius is Left(y) and the outer
radius is Right(y), so the crosssectional area of the washer is the
difference
in the area of two circles:
Pi[Right(y)^{2}Left(y)^{2}]. The thickness of the
washer is dy. We add them up from bottom to top:
_{Bottom}^{Top}Pi[Right(y)^{2}Left(y)^{2}] dy.
Here Bottom is 0 and Top is 1, while Left(y) is y^{1/2} and
Right(y) is y^{1/3}. The answer, after applying FTC, is
Pi[(3/5)(1/2)] (please check this!).
Around the xaxis
dx: Thin shells. The height of the thin shell is Top(x)Bottom(x), and
its thickness is dx. The thin rectangle is revolved around the
yaxis. Perhaps confusingly, the distance of a point (x,y) to the
yaxis is x, so the radius is x, and the thin rectangle travels a
distance of 2Pi x. Therefore, we add up and take limits, and the
result is:
_{Left}^{Right}2Pi x[Top(x)Bottom(x)] dy.
Since Left=0 and Right=1 and Top(x)=x^{2} and
Bottom(x)=x^{3}, we need to compute
_{0}^{1}2Pi[x^{3}x^{4}] dx,
and this is 2Pi[(1/4)(1/5)].
Again, a new discovery, by comparing the results of the two
methods:
2[(1/4)(1/5)]=(3/5)(1/2)
I then asserted incorrectly that I could give an example where shells could be computed but washers would be difficult. My example was y=1/(1+x^{2}) revolved around the yaxis, with x in the interval from 0 to 1.
Well, I tried it dx: the thin shells give the following:
Here Left=0, Right=1, Top(x)=1/(1+x^{2}) and Bottom(x)=0, and
radius=x as before. Then the integral becomes
_{0}^{1}2Pi x/(1+x^{2}) dx.
We can use FTC on this with the substitution u=1+x^{2} and
du=2x dx and (1/2)du=x dx so that we need to compute
(1/2)du/u, which is ln(u)+C. Going back to xland, we have
(1/2)ln(1+x^{2})_{x=0}^{x=1}, and this is
(1/2)ln(2).
But this can also be done dy, as I will show in the next class.
Prepreexample 14 I "computed" _{1}^{1}sqrt(1x^{2}) dx by realizing it was the area of half of the unit circle, and therefore was Pi/2.
Preexample 14 I revolved the semicircle of radius 1 (as given above) around the xaxis. The volume of the resulting solid is given by Pi_{1}^{1}(sqrt(1x^{2})^{1/2}dx, and this is Pi_{1}^{1}(1x^{2})&nbps;dx (the square of the square root of a nonnegative number is that number). Now we can use FTC and obtain Pi(x(1/3)x^{3})_{x=1}^{x=1} and this is (4/3)Pi. In fact, the volume of a sphere of radius r is (4/3)Pi r^{3}.
All of this will be used in our next lovely computation, the volume of a torus, shown to the right.
The torus is the official mathematical name for the volume of a doughnut. Here we revolve a circle of radius r around a central axis. The distance from the center of the circle to the axis is R, and R>r. I'll finish this next time.
What kinds of numbers are there? There are integers, both positive and negative. And then quotients of integers, ratiional numbers. It is remarkable that real numbers which are rational numbers can be characterized by their decimal expansions. Although this is an elementary (!) I discussed it in some detail. First, any rational number has a decimal expansion which eventually repeats. Why is this? When we look at p/q and try to create the decimal expansion, there's repreated long division, each time with a remainer integer less than q (I am assuming that the + or  sign is handled outside of the division process, so that p and q are positive integers). The remainder at each stage is therefore an integer from the set {0,1,2,...,q1}. The division process proceeds through this finite set in a set way: if one has a remainder of r, then the process always will give a remainder of s (maybe the same as r!). Think of this as an arrow from r to s. Since the set {0,1,2,...,q1} is finite, I hope it is not hard to convince yourself that eventually the process terminates in what's called a cycle, a collection of remainders and arrows between them which are circular. That provides the repetition observed in the decimal expansion.
As I mentioned in class, the longdivision algorithm is really quite complicated. A complete analysis occupies pages 235 to 240 in Knuth's The Art of Computer Programming: Volume 2, Seminumerical Algorithms. The other algorithms of arithmetic (addition, subtraction, and multiplicationn) just take up pages 229 to 234.
We also discussed how to go from a repeating decimal to a representation as a quotient of integers. I showed this by taking the sum of the geometric series which the decimal string represents.
There are numbers which are not rational. A number is
irrational if it is not equal to p/q, for any choice of
integers p and q. I then gave a nonroutine proof that sqrt(2) is
irrational. The proof is very short, but has logical intricacies.
Here are two links to proofs that the square root of 2 is irrational:
http://www.cuttheknot.org/proofs/sq_root.shtml
and
http://www.mathacademy.com/pr/prime/articles/irr2/index.asp.
Irrational numbers themselves can be subject to more analysis. (Name everything!  Isn't that a biblical injunction?) A number x is algebraic if it is the root of a polynomial with integer coefficients. Since x^{2}2=0 has sqrt(2) as a root, sqrt(2) is algebra. So is a number like 17^{1/3}. The sum and product of algebraic numbers is algebraic. This is not clear. I gave an example, with sqrt(5)+sqrt(7). With the help of students, after setting x=sqrt(5)+sqrt(7), we first squared to get x^{2}=5+2sqrt(5)sqrt(7)+7. Then (following suggestions from students) x^{2}12=2sqrt(5)sqrt(7). And square again, to get (x^{2}12)^{2}=4·5·7. You can finish up, but the result is actually a fourth degree polynomial which has sqrt(5)+sqrt(7) as a root.
Well, now throw the rationals and the algebraic numbers at the real line. Is that everything? What's not at all obvious to me is that the answer is No!. And not only is the answer "No" but in fact, in many ways, almost no numbers are algebraic or rational. The leftout numbers are called transcendental.
First, can we exhibit at least one specific number which is
transcendental? Yes, we can. This was first done by Liouville a bit
more than a century ago. The only "theorem" needed is the Mean Value
Theorem. I wanted to present this result to you, but decided that I am
really supposed to teach calculus. Sigh. Here's a link to a discussion of Liouville numbers:
http://en.wikipedia.org/wiki/Liouville_number Take a look, if you
are interested. The numbers Pi and e which occur everywhere in
mathematics are transcendental. Verifying that they are transcendental
is difficult. Just seeing that they are irrational takes some effort.
Here is an exposition of Ivan Niven's brief and clever proof that Pi
is irrational:
http://www.lrzmuenchen.de/~hr/numb/piirr.html
and I don't
know how such a proof is invented. Here is a
discussion of the decimal representation of Pi, and here
is a discussion of the techniques involved in highprecision
computation of Pi. More than 10^{12} digits have been
computed. We will discuss some of these techniques later in the course.
A different, nonconstructive approach, proves the existence of transcendental numbers and also the rather shocking fact (to me, at least!) that most numbers are transcendental. So if you take a random string of digits, then that string is almost surely going to be transcendental. The algebraic numbers are countable and the collection of all real numbers is uncountable. These are technical words and the initial discoveries were made by Cantor, again a bit more than a century ago. There are many references to this material on the web, or you can talk to me.
I then moved on to things more in the framework of a calculus course. Specifically I discussed the Mean Value Theorem and how it can be used to give a version of the Fundamental Theorem of Calculus, with some error estimate comparing Riemann sums to the ideal, limiting answer. I may have lost most of the students during this discussion. Here are some notes on the transition from MVT (Mean Value Theorem) to FTC (Fundamental Theorem of Calculus) that may help.
HOMEWORK
Please do two of
the workshop problems (there's a hint for problem 3), learn Maple
by working with another student in the
course (please print out the second worksheet from here), and begin reading chapter 6 of the
textbook.
Maintained by greenfie@math.rutgers.edu and last modified 9/11/2005.