Math 192 diary, part 1, fall 2005:

Further diary entries can be found in part 2

Monday, October 3

Let's see: we are trying to estimate the error using the Trapezoid Rule. Students helped me get through this exposition a great deal. I thank them for their attention and effort. I wrote up what we did together, and here is is. Although what I wrote is based on Professor Bender's notes, I feel that I understand something much better when I talk about it and write about it myself.

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(x0)+f(x1)][(b-a)/n] (trapezoid or panel #1)+
(1/2)[f(x1)+f(x2)][(b-a)/n] (trapezoid or panel #2)+
(1/2)[f(x2)+f(x3)][(b-a)/n] (trapezoid or panel #3)+
(1/2)[f(x3)+f(x4)][(b-a)/n] (trapezoid or panel #4)+
(1/2)[f(x4)+f(x5)][(b-a)/n] (trapezoid or panel #5)+
(1/2)[f(x5)+f(x6)][(b-a)/n] (trapezoid or panel #6)+
(1/2)[f(x6)+f(x7)][(b-a)/n] (trapezoid or panel #7)+
(1/2)[f(x7)+f(x8)][(b-a)/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(x1)+(1/2)f(xn)+SUMj=1n-1f(xj) and then multiply this result by (b-a)/n.
Here xj=a=x0+j(b-a)/n.

Using the Trapezoid rule
Then we tried to use the Trapezoid rule. If I wanted ln(2)=12(1/x) dx to an accuracy of +/-10-10, what n should I use? Here the error is overestimated by K(b-a)3/[12n2]. Now b=2 and a=1, and K? Well, f(x)=1/x, so f´(x)=-1/x2 and f´´(x)=2/x3. For x in [1,2], certainly an overestimate is K=2. So K(b-a)3/[12n2] becomes 1/(6n2). If I want this less than 10-10 then I should take n to be at least the square root of (1/6)1010. 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));


> ln(2);

> evalf(ln(2));
The 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 02cos(x2) dx. A graph of y=cos(x2) is shown to the right. The integral is a silly-looking 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(x2) 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(b-a)3/[12n2]. Here b=2 and a=1. What about K? Well, if f(x)=cos(x2) then f´(x)=-sin(x2)2x and f´´(x)=-cos(x2)4x2-sin(x2)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(x2)  ·   4x2             -sin(x2)2
 Biggest    Biggest this     Biggest this can 
 this can   can get on       get is 2
 get is 1   [0,2] is 4(22)  
So I will take 16+2=18 for K. Then the estimate is:
Errortrap <= (18/12)(23)/n2. If I want this less than 10-5, I need n2>(18/12)8·105. This means n is about 1096 (I'm rounding up!).

Here is Maple's version of the numbers:

> evalf(ApproximateInt(cos(x^2),x=0..2,method=trapezoid,partition=1096));


> evalf(int(cos(x^2),x=0..2));
I used the built-in 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=Ax2+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;
                                 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,y0) and (x+h,y1) and (x,y2), then the area under it (the shaded region) turns out to be (h/3)[1y+4y1+1y2]

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.
[(b-a)/(3n)][1f(x0)+4f(x1)+1f(x2] (panels #1 and #2)+
[(b-a)/(3n)][1f(x2)+4f(x3)+1f(x4] (panels #3 and #4)+
[(b-a)/(3n)][1f(x4)+4f(x5)+1f(x6] (panels #5 and #6)+
[(b-a)/(3n)][1f(x6)+4f(x7)+1f(x8] (panels #7 and #8)+
Again, there are some coincidences. Everything gets multiplied by [(b-a)/(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(x1)+f(xn)+SUM1<j<n, j even4f(xj) +SUM1<j<n, j odd2f(xj) all multiplied by [(b-a)/3n].
Here xj=a=x0+j(b-a)/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(b-a)5/(180n4. Here K is some overestimate of the fourth derivative of f(x).
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 (b-a)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)=12(1/x) dx to an accuracy of +/-10-10, now with Simpson's rule. Here it is easy to compute f(4)(x)=24/x5. 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(b-a)5/(180n4 becomes (24/180)(1/n4). If I want this to be less than 10-10, I must have n4 > (24/180)1010. A suitable n is 172. Let me try:


> ln(2.);
Please: there are many ways to do computations. What is important to observe here is that:
  1. There's less computation than with, say, the trapezoid rule. This way is faster.
  2. There's less computation, and therefore less likely to be accumulated floating point (or other) arithmetic error.
Another example
Let's try 02cos(x2) dx again. We know that f´´(x)=-cos(x2)4x2-sin(x2)2 so
f(3)(x)=sin(x2)8x3-cos(x2)8x-cos(x2)8x-cos(x2)4x-sin(x2) so
f(4)(x)=cos(x2)16x4+sin(x2)24x2+sin(x2)16x2-cos(x2)16x2+sin(x2)16x2-cos(x2)8+sin(x2)8x2-cos(x2)4-cos(x2)2x. I don't know if this is correct. In class, Ms. Waters kindly checked my computation with some infernal machine. I will make very simple estimates to get some overestimate of the fourth derivative on the interval [0,2]. I will neglect signs, and assume all sorts of worst cases (no cancellation). Then
16·24 + 24·22 +
16·22 + 16·22 +
16·22 + 8 + 8·22 + 4 +
I think the sum of the bounds is 596. Sigh. By the way, if I were doing Simpson's rule estimates as a full-time 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(b-a)5/(180n4 becomes (596·25/180)1/n4. This will be less than 10-5 when n4> (596·25/180)105. Sigh. The first even integer greater than this is 58.

> evalf(ApproximateInt(cos(x^2),x=0..2,method=simpson,partition=58));

> evalf(int(cos(x^2),x=0..2));
I 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.

Sigh. Keep reading. Keep doing problems. On Wednesday we begin to study improper integrals.

Please note that 1.88695 859 and 1.88695 854 are not the same numbers. This is observed (after some pain!) in Dynamics of a quadratic map in two complex variables by Stephen J. Greenfield and Roger D. Nussbaum, in Journal of Differential Equations, 169 (2001), 57-141. Floating point arithmetic is irritating.

Thursday, September 29

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.
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 12(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 1010·1010=1020 decimal digits of information, which is about 3.3·1020 bits. Uhhhh ... a terabyte is one trillion bits, that's about 1,000,000,000,000 bits. So this would be more than 108 terabytes. That is far too much to store.
Here's another difficulty: on my PC at home (fairly fast, fairly new) computing 10,000=104 values of log took a bit more than a second. So computing 1010 logs would take ... more than 106 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 SUMj=1n(1/[1+{j/n}])(1/n). The error in one part is the red (almost) triangular-shaped 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·109 rectangles. Uhhh ... let's see: about 10,000 additions on my computer took on the order of one-one hundreth of a second. Therefore 109 additions would take about 103 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=x0<x1<x2<x3<...<x,=b where xj=a+([j{b-a}]/n) (sometimes [b-a]/n is called h so that xj=a+jh), the trapezoid rule approximates the jth area by the (average of the bases)·(height)=(1/2)[f(xj)+f(xj+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.

Please read the section in the text about the Trapezoid Rule and Simpson's Rule. Do problems from there and from the methods of integration sections.

Wednesday, September 28

Wow. The instructor came to class after giving blood: how wonderful and heroic and silly!

Students (were) volunteered to work on some antiderivatives.

  • 1/([(sqrt(x)+1)(sqrt(x)+2)] dx
    Try the substitution u=sqrt(x). This is called a rationalizing substitution. It turns the integration problem into integration of a rational function. I usually find that it's nicer to write u2=x and then 2u du=dx. We then go from x-land to u-land:
    1/([(sqrt(x)+1)(sqrt(x)+2)] dx=(2u)/([(u+1)(u+2)] du
    Surely (2u)/[(u+1)(u+2)]=[A/u+1]+[B/u+2]=[A(u+2)+B(u+1)]/[(u+1)(u+2)] so that
    2u=A(u+2)+B(u+1). Then u=-1 yields A=-2 and u=-2 yields -4=-B so B=4. Now we antidifferentiate:
    (2u)/([(u+1)(u+2)] du= [-2/u+1]+[4/u+2] du=-2ln(|u+1|)+4ln(|u+2|)+C.
    As Mr. Convente pointed out, I really should be writing absolute value signs in the arguments for logs.

  • 1/([(x1/3+1)(x1/3+2)] dx
    Here the rationalizing substitution is u=x1/3 so that u3=x and 3u2 du=dx. The integral changes:
    1/([(x1/3+1)(x1/3+2)] dx=(3u2/([(u+1)(u+2)] dx
    Now I was nasty to these students because I gave them a new idea for the partial fractions algorithm. There is no way that (3u2/([(u+1)(u+2)] can be written as [A/u+1]+[B/u+2]. Why? Well, when you combine the fractions, the result is [A(u+2)+B(u+1)]/[(u+1)(u+2)]: there's no u2 on top. What can we do?
    We can do long division. The fraction (3u2/([(u+1)(u+2)] can be rewritten. First, the bottom really is u2+3u+2. Now look:
    u2+3u+2 )3u2 
    So we have taken the fraction 3u2/[(u+1)(u+2)] and rewritten it as 3+{(-9u-6)/[(u+1)(u+2)]}: we have a quotient (3) and a remainder (-9u-6). The fraction (-9u-6)/[(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:
    (-9u-6)/[(u+1)(u+2)]=[A/u+1]+[B/u+2]=[A(u+2)+B(u+1)]/[(u+1)(u+2)] so that
    -9u-6=A(u+2)+B(u+1). Then u=-1 yields A=3 and u=-2 yields 12=-B so B=-12.
    Now we antidifferentiate, but do not forget any of the pieces!
    (3u2/([(u+1)(u+2)] dx=3+[3/(u+1)]+[-12/(u+2)] dx=3u+3ln(|u+1|)-12ln(|u+2|)+C.
    We still must return to x-land. The final answer is 3x1/3+3ln(|x1/3+1|)-12ln(|x1/3+2|)+C.

  • cos(x)/[1-{sin(x)}2] dx
    Here the rationalizing substitution is u=sin(x), but we will get a sort of surprise, as several students noted. Since du=cos(x)dx, the integral becomes [1/(1-u2)] du. The result of an easy partial fractions decomposition is [1/(1-u2)]=[(1/2)/(1-u)]+[(1/2)/(1+u)] and the antiderivative is -(1/2)ln(1-u)+(1/2)ln(1+u)+C and back in x-land, this is -(1/2)ln(1-[sin(x)])+(1/2)ln(1+[sin(x)])+C.

    Put this together as I have asked you not to (!) and the result is now:

    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.


    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.
    Suggestion Plot both functions (on a graphing calculator, or with Maple) from, say, 0 to Pi/4. Check that the graphs are the same. (If you change Pi/4 to Pi/2, you'll run into a vertical asymptote.)

  • 1/(ex+e-x) dx
    And here try u=ex. It certainly helps if you recognize that e-x=1/u and du=exdx, so [du/ex]=dx, and even dx=du/u. Therefore whatever "mess" occurs, the result can be written as a rational function of u.
    1/(ex+e-x) dx=1/(u+[1/u]) (du/u)=(after some algebra!)1/[u2+1) du
    Now I hope you recognize that can be immediately antidifferentiated. It is arctan(u)+C, and, in x-land, it is arctan(ex)+C. Indeed. We have just found the antiderivative of 2sech(x). It turns out that this function helps to determine shortest paths in some models of non-Euclidean geometry.

  • [e2-e-x]/[ex+e-x] dx
    Method 1
    Here also the entry u=ex would work. The result would be (u2-1)/[u(u2+1)] du which looks somewhat messy. In particular, although the integrand is a proper rational fraction, it has an irreducible quadratic factor in the bottom. For such factors, the split-up which partial fractions requests looks like this:
     u2-1      A     Bu+C
    ------- = --- + -----
    u(u2+1)    u     u2+1
    Put the fractions together, and let's just look at the top:
    u2-1=A(u2+1)+(Bu+C)u. When u=0, we get A=-1. The u2 coefficient gives us: 1=A+B, so B=2. Finally, the linear coeffient on both sides (what multiplies u) gives 0=B+C, so C=-2. Therefore we need to compute (-1/u)+(2u-2)/(u2+1)&nbps;du. Well, split things up and do it piece by piece:
    -1/u --> -ln(u) --> -ln(ex --> -x
    2u/(u2+1) [you can substitute for u2+1 here) --> ln(u2+1) --> ln([ex]2+1)=ln(e2x+1)
    -2/(u2+1) --> -2arctan(u) --> -2arctan(ex)
    Therefore ....
    [e2-e-x]/[ex+e-x] dx=-x+ln(e2x+1)-2arctan(ex)+C

    Method 2
    Look at [e2-e-x]/[ex+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=ex+e-x so the integral becomes dw/w) the antiderivative is just ln(ex+e-x)+C.

    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);
                                  1/2 ln(exp(x)  + 1)
    > int(exp(-x)/(exp(x)+exp(-x)),x);
                           ln(exp(x)) - 1/2 ln(exp(x)  + 1)
    > int(tanh(x),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)=(ex+e-x)/2, so the answers ln(ex+e-x)+C and ln(cosh(x)) are "the same" (the 2 disappears in the +C).

  • 1/[x+sqrt(x)] dx
    Substitute x=u2 so dx=2u du, and 1/[x+sqrt(x)] dx=2u/[u2+u] du=2/[u+1] du=2 ln(u+1)+C=2 ln(sqrt(x)+1)+C.
    This seems straightforward, and I am happy. Of course, like any one who wears suspenders and a belt, I checked the result with Maple. That program surprises me with its answers sometimes. Here is the dialogue.
    > int(1/(x+sqrt(x)),x);
                                    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(x-1) 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 complicated-looking answer.

  • 1/[x2+sqrt(x)] dx
    I am not cruel enough to have students do this. Let me show you how I would begin, if I had to do it by hand: Substitute x=u2 so dx=2u du, and 1/[x+sqrt(x)] dx=2u/[u4+u] du=2/[u3+1] du.
    Now the roots of u3+1 certainly include u=-1. So u+1 is a factor of u3+1. What else can we say?
    u+1 ) u3     +1
            -u2   +1
    There is no remainder, thus verifying that u+1 divides u3+1. And we know u3+1=(u+1)(u2-u+1).

    Now we need to split up the fraction. In this case, u2-u+1 has no real roots because the discriminant, 1-4=-3, is negative. The partial fractions method then advises that we put an unknown linear term on top. So:

     2      A      Bu+C     A(u2-u+1)+(Bu+C)(u+1)
    ---- = --- + ------- = -----------------------
    u3+1   u+1    u2-u+1       (u+1)(u2-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
    The magic number u=-1 yields 2=3A so that A=3/2. The u2 coefficients on both sides give more information: 2=A+B. Since A=3/2, B=1/2. The constant terms on both sides (the u0 coefficient) gives the equation 2=A+C so that C=1/2. Now we go can antidifferentiate:
    2/[u3+1] du=[(3/2)/(u+1)]+[({1/2}u+{1/2})/(u2-u+1)] du
    The first term is easy, and gives (3/2)ln(u+1).

    Finding an antiderivative of ({1/2}u+{1/2})/(u2-u+1) "by hand" needs more algebraic massaging. The official method uses completing the square. The denominator u2-u+1 can be written as a sum of two squares. Here's the method in action:
    u2-u+1=u2-u    +1=u2-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})/(u2-u+1)]=({1/2}w+{3/4})/[w2+({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)
    I 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);
             2                 1/2        (2 x + 1) 3
    -1/6 ln(x  + x + 1) + 1/3 3    arctan(--------------) + 1/3 ln(x - 1)
                                                      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)
                                                                         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(-----------------)

  • arctan(x2) dx
    Here I asked students how to begin. I mentioned I had actually done this some years ago in front of a class of 100 suffering engineering students. You begin by integrating by parts, with u dv=arctan(x2dx, so u=arctan(x2) and dv=dx. The result is the "boundary term" - an integral of v du, and the integral contains a rational function. Here is what Maple told me:
    > 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)

  • 1/[(x1/3+1)(x1/2+2)] dx
    I think I put this on the board just to ask if students could tell me a good substitution to begin. Indeed, u=x1/6 works fine, and the reuslt is a rational function. So we can "do it". And both Maple and Mathematica show (similar) answers.

    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^3-5*x+7)/(x^10+x^2-1),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)
                   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   )
                         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^3-5.*x+7.)/(1.*x^10+1.*x^2-1.),x);
    -2.056745787 ln(| x + 0.8688369618 |) + 0.1428571429 I (
        2.535287030 ln((x + 0.3698142048)  + 1.014201379)
         + 2.780406266 arctan(-1.007075657, x + 0.3698142048))
         + 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.535287030 ln((x + 0.3698142048)  + 1.014201379)
         + 2.780406266 arctan(1.007075657, x + 0.3698142048))
         + 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 (
        -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 (
        0.3795913623 ln((x - 0.3698142048)  + 1.014201379)
         + 2.868710130 arctan(-1.007075657, x - 0.3698142048))
         + 0.001480424440 ln(x  - 1.732050808 x + 1.) - 0.5927352913 arctan(2. x - 1.732050808)
         - 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?
    It is not an alligator. I was asked this question by a courageous student. I will try to answer the question:

    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.

    Read and do problems from 7.1, 7.2, 7.3, and 7.4.
    Practice is essential. Mr. Scheinberg will, I hope, offer to answer questions about the first three sections.

    Monday, September 26

    Wonderful student presentations!
    We had student presentations of solutions to the second set of "workshop problems"
    1. Mr. Figliolino discussed problem #1.
    2. Ms. Chow discussed problem #2.
    3. Mr. Brophy discussed problem #3.
    4. Mr. Hu discussed problem #4.
    We all had a wonderful time, although Professor Greenfield certainly seemed to get antsy as some of the l-o-n-g but thorough discussions went on.
    Word of the day antsy
    1. Restless or impatient; fidgety.
    2. Nervous; apprehensive.
    He got too nervous. From now on, we'll have a maximum of two presentations in one class meeting.

    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.

  • Rewrite (2x+7)/[(x-3)(x-2)] dx so we can compute the antiderivative. Then compute the antiderivative.
    Here the partial fractions method asks for constants A and B so that:
       2x+7       A     B
    ---------- = --- + ---
    (x-3)(x-2)   x-3   x-2
    Combine the fractions and the result is [A(x-2)+B(x-3)]/[(x-3)(x-2)]. This will equal (2x+7)/[(x-3)(x-2)], which has the same denominator (bottom!) when the tops are identical. We need A and B so that
    How can we get such A and B?

    One way Expand out and get Ax-2A+Bx-3B=2x+7 so that (A+B)x+(-2A-3B)=2x+7. Then we have the system of two linear equations in two unknowns:

      A+ B = 2 (x coefficient)
    -2A-3B = 7 (constant coefficient)
    There are many ways to solve such a system. One way is guessing. Another way is to realize that A=2-B so that -2A-3B=7 is -2(2-B)-3B=7 and -4-B=7 and B=-11. Then, since A=2-B, A must be 13.
    Note Something funny is going on, and if you have some experience you may already notice this. Systems of linear equations, even two equations in two unknowns, may not have solutions. For example, the system
    has no solutions (the technical name is inconsistent). And such systems may have infinitely many solutions:
    But 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
    We can look at some magic numbers. For example, if x=2, then the A term drops out and we get B(2-3)=2·2+7=9 so B=-11. And when x=3, the B term drops out and we get A(3-2)=2·3+t=13 so A=13.
    To me the second way is quicker and easier.

    Now we know

       2x+7      13    -11
    ---------- = --- + ---
    (x-3)(x-2)   x-3   x-2
    The pieces are easy to antidifferentiate. The result is 13 ln(x-3)-11 ln(x-2)+C.
    As I mentioned, one could use the properties of logs and rewrite this as
       /(x-3)13 \
    ln|---------| + C
       \(x-2)11 /
    Please don't do this sort of thing in Math 192, or, probably anywhere. Also it is horrible to typeset in html.

  • Rewrite (5x2-4x+7)/[x(5x-3)(4-x)] dx so we can compute the antiderivative. Then compute the antiderivative.
    Now the partial fractions method asks for A and B and C so that:
       5x2-4x+7      A    B      C
    -------------- = - + ---- + ---
     x(5x-3)(4-x)    x   5x-3   4-x
    Wow. Combine the fractions on the right-hand side. I will just write out the top, which is A(5x-3)(4-x)+Bx(4-x)+Cx(5x-3). This should be equal to the "other" top, which is 5x2-4x+7.
    When x=0, we get A(-3)(4)=7, so A=-7/12.
    When x=4, we get C(4)(5·4-3)=5·42-4·4+7. This is C(4)(17)=5·16-16+7 or 68C=71, so C=71/68.
    Finally, we want 5x-3 to be 0. We must take x=3/5. Then 5x2-4x+7 becomes 5(3/5)2-4(3/5)+7=32/5. And Bx(4-x) becomes B(3/5)(17/5)=(51/25)B. Thus (51/25)B=32/5, and B=160/51. Therefore we know that
        5x2-4x+7       -[7/12]   [160/51]   [71/68]
    ---------------- = ------- + -------- + -------
      x(5x-3)(4-x)        x        5x-3       4-x
    Now 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/(5x-3)? I would like it to be something like ln(5x-3), but (chain rule or substitution method) there is an additional 5 to put in. So its antiderivative is actually (1/5)ln(5x-3). And what about 1/(4-x)? Its antiderivative, for a similar reason, is -ln(4-x). Putting it all together (more pedantically, using linearity) the antiderivative of (5x2-4x+7)/[x(5x-3)(4-x)] is -[7/12]ln(x)+[160/51](1/5)ln(5x-3)+[71/68]{-ln(4-x)}+C.

    Or we could ...
    Try Maple:

                                            32               71
                              -7/12 ln(x) + -- ln(5 x - 3) - -- ln(x - 4)
                                            51               68
    and this computation took about .02 seconds.

  • Rewrite (-2x2+3x-5)/[x(x-5)2] dx so we can compute the antiderivative. Then compute the antiderivative.
    Here the difference is in what's called multiplicity. The bottom has "only" two roots, but one of the roots (5) has multiplicity 2. Now the partial fractions method looks for A and B and C so that:
    -2x2+3x-5   A    B      C
    --------- = - + --- + ------
      x(x-5)2   x   x-5   (x-5)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.
    Combine the fractions. Now you need to use a bit of care, because the common denominator is actually x(x-5)2 but there are some powers to worry about. If you do it correctly, the top will be
    We need to find A and B and C so that
    If x=0, we get -5=A(-5)2, so A=-1/5.
    If x=5, we get -2(52)+3·5-5=C(5), SO -40=5C and C=-8.
    But how can we get B? There are no more magic numbers. In this case I tend to look at some coefficient of some power of x. For example, look at the x2 coefficient of both sides of the equation:
    -2=A(1)+B(1). There is no C involvement in x2. Since I know that A is -1/5, B=-2-A=-2+1/5=-9/5. Wow. The x2 coefficient is not the only possibility. Look at anything convenient.

    Now we need to compute the antiderivative of

    -2x2+3x-5   -1/5   -9/5    -8 
    --------- = ---- + ---- + ------
      x(x-5)2     x     x-5   (x-5)2
    The antiderivative of the first piece is certainly -(1/5)ln(x), and that of the second piece, -(9/5)ln(x-5). What about the antiderivative of -8(x-5)-2? If you make the substitution u=x-5 so du=dx, we need an antiderivative of -8/u2 "du" and this is 8/u which is 8/(x-5). So the whole answer is:
    (-2x2+3x-5)/[x(x-5)2] dx=-(1/5)ln(x)-(9/5)ln(x-5)+[8/(x-5)]+C.

    In answer to your unvoiced question, yes, I sure did check this answer with my silicon pal.

    Read and do problems from 7.1, 7.2, 7.3, and 7.4.
    Practice is essential.

    Thursday, September 22

    Here is the content of the lecture. I hope that you learned:
    1. The volume of the unit ball-->0 as the dimension-->infinity.
    2. A candidate for an explicit formula for the unit ball (with some information about factorials to be verified).
    3. The unit ball's proportion of the area of the enclosing n-dimensional cube also-->0 as the the dimension-->infinity.

    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.

    Read and do problems from 7.1, 7.2, and 7.3.
    Practice is essential.

    Wednesday, September 21

    I did a whole bunch of integrals. Sigh. It was more like an athletic event than anything else.
    1. [cos(x)]6 dx
    2. [sin(x)]3[cos(x)]6 dx
    3. tan(x) dx
    4. [tan(x)]2 dx
    5. [tan(x)]3 dx
    6. sec(x) dx
    7. [sec(x)]2 dx
    8. [sec(x)]3 dx
    9. 02sqrt(3)x3/sqrt(16-x2) dx (7.3: #4)
    10. sqrt(2)21/[t3sqrt(t2-1)] dt (7.3: #5)
    11. 02x3sqrt(x2+4) dx (7.3: #6)
    12. 1/sqrt(t2-6t+13) dt (7.3: #24)
    The techniques used were trig identities (double angle formula for sine and cosine, sin2+cos2=1, tan2+1=sec2 sec2-1=tan2, substitutions, and integration by parts. These should be practices by students.

    Read and do problems from 7.1, 7.2, and 7.3.

    Monday, September 19

    We learned how to integrate powers of cosine using a reduction formula. The reduction formula uses some special properties of cosine, and it is not clear to me how general the logic is. A similar reduction formula (for powers of sine) is shown in the text. It turns out that this seemingly pointless computation gives a formula for Pi: the Wallis product. There are also other reasons to consider the computation.

    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 1012 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, nth 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:

  • sqrt(1+sqrt(x)) dx
    I make the substitution w=sqrt(1+sqrt(x)) and solve for x: w2=1+sqrt(x), so (w2-1)=x, and dx=2(w2-1)2w7nbsp;dw so that sqrt(1+sqrt(x)) dx=w·2(w2-1)2w dw and this is "easy" since it is a polynomial: multiply out and get 4w4-4w2, which has antiderivative (4/5)  dx
  • sqrt(1+sqrt(1+sqrt(x))) dx
    Again, w=sqrt(1+sqrt(1+sqrt(x))) will change the problem into finding the antiderivative of a polynomial. By the time the square roots get "nested" four deep, Maple can't do the integral.

    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(1-x2) dx
    Well, we know that 01sqrt(1-x2) dx is Pi/4 since it is a quarter of a circle. What about 01/2sqrt(1-x2) dx?
    Now maybe we need to come up with an antiderivaitve of sqrt(1-x2). 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(1-x2) 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(1-x2)=sqrt(1-sin(theta)2)=cos(theta) and dx=d(sin(theta))=cos(theta) d(theta). The whole integral becomes sqrt(1-x2) dx=(cos(theta))2d(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
    (cos(theta))2d(theta)=(1/2)(1+cos(2theta))d(theta). This I can antidifferentiate almost easily (use the substitution u=2(theta) etc.). The result is:
    I should not plug in 0 and 1 here, because those are x-values. Let me show you how to convert back to x-land from theta-land. Certainly, sin(2theta)=2sin(theta)cos(theta), and we know that x=sin(theta) and sqrt(1-x2)=cos(theta). We chose the substitution so that's correct. Also, since x=sin(theta), theta=arcsin(x). Therefore
    (1/2)([sin(2theta)/2]+theta) =(1/2)([2sin(theta)cos(theta)/2]+theta) =(1/2)([x·sqrt(1-x2)+arcsin(x))

    Fact sqrt(1-x2) dx=(1/2)([x·sqrt(1-x2)+arcsin(x))
    If you don't believe this, you have the option to differentiate the right-hand side and check that it is sqrt(1-x2). This is possible.

    Now, finally, 01/2sqrt(1-x2) dx=(1/2)([x·sqrt(1-x2)+arcsin(x))]01/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+x2) 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+x2) 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) )
    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 x-land. Since x=sec(theta) and sqrt(1+x2)=tan(theta), ln(sec(theta)+tan(theta))=ln(x+sqrt(1+x2). Therefore
    img src="gifstuff/is6.gif" width=6>1/sqrt(1+sqrt(1+x2) dx=ln(x+sqrt(1+x2)+C
    I remarked in class that Maple gives the answer, arcsinh(x) so maybe I should tell you about the hyperbolic functions some time.

    Read and do problems from 7.1, 7.2, and 7.3.

    Thursday, September 15

    We began by making sure that everyone was matched for the second set of workshop problems. It was a ... pleasure ... (yes, that's how it is spelled, not P-A-I-N).

    Another great experience!
    Of course Mr. Scheinberg did a terrific job answering questions. I am happy. x(x+1)1/3dx
    I did this integral two different ways, just for fun. Sigh.

  • Substitution Take w=(x+1)1/3 because the (x+1)1/3 is the center of the trouble (well, that's how my head works, sorry). Then w3-1=x, so that 3w2dw=dx, and x(x+1)1/3dx=(w3-1)·w dw. But we can multiply out (is "distribute" the correct word here?) and get w4-w dw=(1/5)w5-(1/2)w2+C. We can convert from w-land to x-land using w=(x+1)1/3 and the answer is (1/5)(x+1)5/3-(1/2)(x+1)2/3+C.
  • Integrate by parts In x(x+1)1/3dx, good parts may not be immediately clear. I am serious about this. But here is a choice that works.
       u dv       = uv  -   v du
     u=         x}  {du=dx  
    dv=(x+1)1/3dx}  {v=(3/4)(x+1)4/3
    Therefore x(x+1)1/3dx=x((3/4)(x+1)4/3)-(3/4)(x+1)4/3dx=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:

                                        3 (x + 1)    (-3 + 4 x)
    Does that help?

    arctan(x) dx
    Integrate by parts, with u=arctan(x) and dv=dx. Then du=[1/(1+x2)]dx and v=x. And uv-v du is x·arctan(x)-x/(1+x2) dx. The last integral can be computed with the substitution w=1+x2. Then x/(1+x2) dx becomes (1/2)dw/w which has antiderivative (1/2)ln(w)=(1/2)ln(1+x2). Putting it all together, arctan(x) dx=x·arctan(x)-(1/2)ln(1+x2)+C.

    What is ln(x) dx? This should follow the same pattern as the previous antiderivative.

    e3xsin(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.

    Diary entry in progress! More to come

    Just the second workshop problems.

    Wednesday, September 14

    Wonderful student presentations!
    We had student presentations of most of the first set of
    "workshop problems"
    1. Mr. Viernes discussed problem #1.
    2. Ms. Johnson discussed problem #2.
    3. No one discussed problem #3, since part b) seems to be totally intractable! ("Difficult to manage or govern; stubborn.")
    4. Mr. Townley discussed problem #4.
    5. Ms. Van Saders gave a different solution to problem #4.
    We all had a wonderful time.

    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 no-one 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. ..."
    The book has been reissued and is available. My copy is lost somewhere in my attic.

    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) dx-inxf(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 inxxex 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 xex. 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)=ex and g(x)=x. Then f(x)=ex and g'(x)=1. So:

    inxf'(x)g(x) dx=f(x)g(x)-inxf(x)g'(x) dx becomes
    inx  ex   x  dx=  ex  x  -inxex1dx 
    We have "traded in" inxexx dx for the "nicer" integral -inxex1dx with a "penalty" of exx. Here the qualitative word "nicer" is just used in the sense of, "Hey, an integral we can compute easily!" Of course, -inxex1dx=-ex+C, so we get our final answer, that
    inxxex dx=exx-ex+C.

    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:

    inxxex 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:
    inxxex dx=xex-inxexdx
          inx u dv = uv - inx v du
       u=x   } {du=dx
      dv=exdx} { v=ex
    and then we could merrily finish the computation by integrating ex 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 inxx2ex dx. Here we go:

    inxx2ex 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=x2 and dv=exdx.
    inxx2ex dx=x2ex-inxex2x dx
          inx u dv = uv - inx v du
       u=x2  } {du=2x dx
      dv=exdx} { v=ex
    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:
    inxx2ex dx=x2ex-2inxexx dx=x2ex-2(exx-ex)+C
    Here already some characteristic problems show up: there are minus signs to keep track of and parentheses to worry about. And what could be +2C or -2C I just wrote as +C because it is just some constant. But we've "solved" the problem.

    I could continue, and do x3ex and then x4ex and even x5ex and ... but maybe there is a more systematic way to write things.
    A first example of a reduction formula
    Write inxxnexdx, where n is a positive integer, in terms of stuff+an integral with an x term lower in degree. So:

    inxxnex 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=xn. Then all the other entries can be filled in rather easily, so:
    inxxnex dx=xnex-inxexnxn-1dx
          inx u dv = uv - inx v du
       u=xn  } {du=nxn-1dx
      dv=exdx} { v=ex
    And here is our desired reduction formula:
    inxxnex dx=xnex-ninxexxn-1dx.

    We can even make this a bit more interesting, by finding and stating a reduction formula for inxxneax dx, for n, a positive integer and a, some constant. There are a few little changes:

       u=xn  } {du=nxn-1dx
      dv=eaxdx} { v=(1/a)eax
    so the formula becomes:
    inxxneax dx=(1/a)xneax-(n/a)inxexxn-1dx.

    Well I asked for inx(x2-3)e5xdx but I really did expect people to use the formulas I developed, not to attempt to derive them again. Sigh. What a mess.
    (x2-3)e5x=(x2e5-3e5x and then the first part becomes
    (1/5)[x2e5-(2/5){(1/5)xe5-(1/52)}] etc. Sigh.

     > int((x^2-3)*exp(5*x),x);
                                  1/125 (-73 - 10 x + 25 x ) exp(5 x)
    I reminded people to prepare for Mr. Scheinberg.

    Monday, September 12

    Homework issues
    Mr. DOUGLAS A. SCHEINBERG, the peer mentor for Math 192, will appear in class on Thursday. Mr. Scheinberg will be happy to discuss the problems in sections 6.2, 6.3, 6.4, and 6.5. His e-mail address is He is majoring in computer engineering.
    Please try to look over the routine Math 152 problems assigned for these sections, and discuss the problems with your classmates or me or Mr. Scheinberg as necessary.

    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=80-2t, 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 080[36-(1/10)x]dx. I believe I actually evaluated this integral, and got 36(80)-(80)2/20 ft-lbs.

    Is the answer correct? Well, if the bucket did not leak at all, we would need 80(44) ft-lbs 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

    Diary entry in progress! More to come

    Mean value of an integral
    Suppose the function f is defined on the interval The definiti

    Diary entry in progress! More to come

    Uhhh ... it's gotta be the mean value of x2 on [0,1]. That mean value is [1/(1-0)]01x2dx=1/3.

    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
    14f(x) dx=21
    46f(x) dx=26
    16f(x) dx=47
     1            47
    ---16f(x) dx=--
    6-1           5
    Multiply 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 (6-1) 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/(b-a)]abf(x) dx.
    This result is occasionally useful.

    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)]}-11f(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(xM)=TOP and f(xm)=BOT and for all x in [a,b], f(xM)>=f(x)>=f(xm). 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)=x-1 for x>=1 does not satisfy the Extreme Value Theorem (neither the hypotheses nor the conclusion). I'm using xM because maybe a capital M could mean "maximum", just as a small m could mean "minimum".

    So now I can integrate the inequality f(xM)>=f(x)>=f(xm) 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(xM)(b-a)>=abf(x) dx>=f(xm)(b-a)
    Now divide by b-a, so that we look at:
    f(xM)>=[1/(b-a)]abf(x) dx>=f(xm)
    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(xM) and f(xm) 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/(b-a)]abf(x) dx. So there must be at least one c in [a,b] with f(c)=[1/(b-a)]abf(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}gt2. Let the velocity after a time $T$ be vT. Show that if we compute the average of the velocities with respect to t we get vave={1/2}vT, but if we compute the average of the velocities with respect to s we get vave={2/3}vT.
    This makes an excellent workshop problem, if one adds the extra word/sentence, "Explain."

    Diary entry in progress! More to come

    Guessing an integral
    Monte Carlo methods

    Diary entry in progress! More to come

    Wonderful quote
    Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin. John von Neumann

    Diary entry in progress! More to come

    An example?
    Here is a chunk of Maple code:

    > g:=evalf(rand(0..10^10-1)/10^10);
    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
    The 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 01x2dx.

    Further results
    Below is a table of Monte Carlo approximations, using 10n 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
    0.2290005751 0.3293312957 0.3561621917 0.3318810478 0.3330243211 0.3337357300 0.3333129117

    The last two of these computations took a l-o-n-g time on my PC, since Maple is an interpreted language rather than a compiled one. Also there are problems with accuracy: for this many computations, floating point errors are bound to accumulate. And there are problems with randomness. The Maple "random number generator" (rather, more precisely, a pseudo-random number generator) has some serious defects. But, all this said, we've been luck. The accuracy of the approximation has increased as the number of samples increased.

    Diary entry in progress! More to come

    Thursday, September 8

    First, I indicated I would be following the Math 152 syllabus. I would be assigning occasional sets of challenging problems, and would add and amplify certain topics. Right now, we will be working through Chapter 6: today, indeed, finishing consideration of 6.2 and 6.3, and beginning 6.4. Please look at the list of suggested problems, and make sure that you can do them all. In this case, what you probably should do is write solutions to a selection of the easy and moderate problems, and definitely attempt the more difficult ones. In standard textbook fashion, the problems generally begin with rather simple exercises, and, as the problem numbers increase, they get more difficult. We will have an opportunity to discuss these problems next Thursday, so please try to work on them this weekend and early this week.

    An example that wasn't

    Diary entry in progress! More to come

    An example that is, and why
    Look at y=x(x-1)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 y-axis. We can do this (almost) easily dx, using the shell method. The integral will be the sum of 2Pi x multiplied by x(x-1)4dx. This mess is a vertical slice, revolved around the y-axis (radius x). Then add this up from 0 to 1, and the resulting volume is 012Pi   x(x-1)4dx. 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:

    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(x-1)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 right-hand 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 non-solvability 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 5th (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

    Diary entry in progress! More to come

    With washers

    Diary entry in progress! More to come

    With shells

    Diary entry in progress! More to come

    With Pappus

    Diary entry in progress! More to come

    A variety of methods is good ...

    Diary entry in progress! More to come


    Diary entry in progress! More to come

    Emptying a swimming pool
    Here is a fact, which is probably true: one cubic foot (ft3) 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 ft-lbs 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 10-x, 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(10-x). 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(10-x).
    Now finally we can compute the work. It will be the sum of the work of adding all the slices from x=0 to x=10. This is a definite integral. It is 010 62.43(20)x[40+3(10-x)] dx. A silicon friend of my tells me that this is about 3.1215·106 ft-lbs. And I could never be a physicist or any kind of engineer, really, really, because I have no feeling if this answer makes sense. Do you?

    ... 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.

    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.

    Wednesday, September 7

    I resolved to give calmer, more boring lectures. The latter would be novel, and so here is a Math 152 lecture.

    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:

    The basic idea is to
    1. Slice
    2. Approximate
    3. Add up
    4. Take a limit
    We end up with a definite integral. I'll present this with a series of examples. I went over this material rather quickly, because I believed that most students had seen it before.

    Example 1 Consider y=x2 and y=x3 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; ill-chosen 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 1010 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
    Top(x)-Bottom(x) deltax
    Now we add up the approximations, from Left to Right, and take a limit of these sums. The result is a definite integral:
    LeftRightTop(x)-Bottom(x) dx

    In this specific case we have Top(x)=x2 and Bottom(x)=x3 and Left=0 and Right=1, and so we need to compute 01x2-x3 dx
    We know antiderivatives of the functions involved, so we may use FTC and get (1/3)x3-(1/4)x4|x=0x=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:
    BottomTopRight(y)-Left(y) dy
    Here the boundary curves are given by y=x2 and y=x3, and, in this specific case, it isn't too hard to find the left curve, x=y1/2, and the right curve, x=y1/3. Due to the dreadful coincidence mentioned earlier, top=1 and bottom=0. The area of the region will therefore be 01y1/3-y1/2 dy and (my examples have easy functions!) we can use the FTC directly to get (3/4)y4/3-(2/3)y3/2|y=0y=1=(3/4)-(2/3).

    We have verified the amazing result obtained from equating the two computations:

    Example 2 Revolve the region discussed around the x-axis 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 x-axis. 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:
    LeftRightPi(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 x2. The Inside(x) is the old Bottom(x) and is x3. So we need to compute 01Pi(x2)2-(x3)2) dx. This is Pi01 x4-x6 dx= (1/5)x5-(1/7)x7|x=0x=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 x-axis. 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 x-axis. Here everything should be written in terms of y. The radius of the revolving circle is y (the strip is y "up" from the x-axis) 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
    BottomTop2Pi y(Right(y)-Left(y)) dy.

    Here we have Top: y=1 and Bottom: y=0, and Right(y)=y1/3 and Left(y)=y1/2. Therefore the volume should be
    y=0y=12Pi y(y1/3-y1/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 2Piy=0y=1(y4/3-y3/2 dy and this is 2Pi((3/7)y7/3-(2/5)y5/2)|y=0y=1=2Pi[(3/7)-(2/5)].

    Hot news obtained from equating the two computations:

    I then asked students in the class to compute the volume when the region is revolved around the y-axis, using both methods. We needed some help, especially with the thin shell part (dx in this case).

    Around the y-axis
    dy: This uses washers. The inner radius is Left(y) and the outer radius is Right(y), so the cross-sectional 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:
    BottomTopPi[Right(y)2-Left(y)2] dy.
    Here Bottom is 0 and Top is 1, while Left(y) is y1/2 and Right(y) is y1/3. The answer, after applying FTC, is Pi[(3/5)-(1/2)] (please check this!).

    Around the x-axis
    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 y-axis. Perhaps confusingly, the distance of a point (x,y) to the y-axis 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:
    LeftRight2Pi x[Top(x)-Bottom(x)] dy.
    Since Left=0 and Right=1 and Top(x)=x2 and Bottom(x)=x3, we need to compute 012Pi[x3-x4] dx, and this is 2Pi[(1/4)-(1/5)].

    Again, a new discovery, by comparing the results of the two methods:

    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+x2) revolved around the y-axis, 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+x2) and Bottom(x)=0, and radius=x as before. Then the integral becomes
    012Pi x/(1+x2) dx.
    We can use FTC on this with the substitution u=1+x2 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 x-land, we have (1/2)ln(1+x2)|x=0x=1, and this is (1/2)ln(2). But this can also be done dy, as I will show in the next class.

    Pre-pre-example 14 I "computed" -11sqrt(1-x2) dx by realizing it was the area of half of the unit circle, and therefore was Pi/2.

    Pre-example 14 I revolved the semicircle of radius 1 (as given above) around the x-axis. The volume of the resulting solid is given by Pi-11(sqrt(1-x2)1/2dx, and this is Pi-11(1-x2)&nbps;dx (the square of the square root of a non-negative number is that number). Now we can use FTC and obtain Pi(x-(1/3)x3)|x=-1x=1 and this is (4/3)Pi. In fact, the volume of a sphere of radius r is (4/3)Pi r3.

    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.

    Thursday, September 1

    I described the number line as a geometric representation of numbers, and then chose to associate decimal expansions with real numbers. A decimal expansion had a finite number of digits to the left of the decimal point, and an infinite string of digits to the right. Conventionally, if the string of digits concludes with a string of 0's, that string can be omitted. Also, if I had been precise (!) I would have said that a decimal is prefixed by a sign, + or -. Actually such a string really is just an address (?) to a point on the line, and two addresses can lead to the same point. The simplest example is that .9[repeating] addresses the same point as 1.0[repeating].

    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,...,q-1}. 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,...,q-1} 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 long-division 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 non-routine 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: and

    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 x2-2=0 has sqrt(2) as a root, sqrt(2) is algebra. So is a number like 171/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 x2=5+2sqrt(5)sqrt(7)+7. Then (following suggestions from students) x2-12=2sqrt(5)sqrt(7). And square again, to get (x2-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 left-out 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: 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:
    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 high-precision computation of Pi. More than 1012 digits have been computed. We will discuss some of these techniques later in the course.

    A different, non-constructive 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.

    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 and last modified 9/11/2005.