Monday, February 25 (Lecture #10)
An antiderivative (the previous QotD)
Mr. Gardner and Ms. Turdo bravely analyzed the previous QotD. This was [ln(x)/x2]dx, with the suggestion that Integration by Parts be used. Here u=ln(x) and dv=(1/x2)dx works. Then du=(1/x)dx and v=-1/x, so we get -[ln(x)/x]-(-1/x2)dx= -[ln(x)/x]+(1/x2)dx= -[ln(x)/x]-1/x+C.

Many opportunities for error...
I remarked that there were many opportunities for error. For example, there are three –'s making up the last minus!

The "area"
What about the improper integral? If we want to analyze 1[ln(x)/x2]dx, then we will first compute the definite integral 1B[ln(x)/x2]dx, then we will first compute the definite integral for B "large" and see what happens when B-->.

1B[ln(x)/x2]dx=-[ln(x)/x]-1/x|1B=-[ln(B)/B]-1/B-{-[ln(1)/1]-1/1}. Since ln(1)=0, this is (grouping the B terms) 1-[{ln(B)-1}/B].

The behavior as B--> of [{ln(B)-1}/B] can be analyzed using L'Hôpital's Rule since both the top and bottom of the fraction go to as B-->. Therefore limB-->[{ln(B)-1}/B]=limB-->[{1/B}/0]=0.

We conclude: the improper integral 1[ln(x)/x2]dx converges, and its value is 1. A picture of part of this region was shown earlier. I don't immediately see a total area of 1 -- these computations are not at all intuitive!

Escape velocity
When I was very young, I read a science fiction novel by Robert Heinlein which stated "... the escape velocity from the Earth is 7 miles per second ..." and now I would like to sort of verify this using only well-known (?) facts and some big ideas of physics.
  • The radius of the earth Well, a sketch of the (continental) United States is shown to the right. There are 4 time zones. The U.S. is about 3000+ (maybe 3200?) miles wide. Therefore one time zone is about 1000 miles wide (I think the Pacific time zone actually slops a bit into the ocean), and since there are 24 time zones around the world, the circumference of the world is ... uhh ... about 25,000 miles. Or so. And therefore the radius of the earth is that divided by 2Pi, and therefore the radius of the earth is about 4,000 miles.
  • Newton and gravitation Two masses attract each other with a force whose magnitude is proportional to the product of the masses and inversely proportional to the square of the distance between them. Therefore, if I have a mass, m, and if the Earth has mass M, the magnitude of the force of gravity is GmM/r2. G is a constant.
  • Work lifting up Suppose we want to lift a mass m from the surface of the earth to a distance R, where R is very large. Then the work done is force multiplied by distance. The force needed to act against gravity certainly changes with distance. So I will compute the work with calculus. If x is some distance between 4,000 and R, then the force is GmM/x2. If the distance is a little bit, say, dx, then the work dW needed is GmM/x2 dx. The total work, W, is x=4,000RGmM/x2 dx which I can compute readily as -GmM/x]4,000R=GmM({1/4,000}-1/R). I think I did the minus signs correctly. Notice that as R-->infinity, this work -->GmM/4,000: this is the most work you can do, to get anywhere in the universe (assuming the universe is empty except for the mass m and the earth, of course).
  • Kinetic energy How much kinetic energy would we need to supply to the mass m so that it would equal the potential energy the mass would have if it were lifted out to anywhere in the universe? Well, kinetic energy is (1/2)mv2 and that potential energy we already computed is GmM/4,000. So (1/2)mv2=GmM/4,000, and thus v2=2GM/4,000. But what is GM?
  • But F=ma On the earth, a, the acceleration of gravity, is 32 ft/(sec)2. Yes, this is an archaic system of measurement, but that's part of the fun. But also F=GmM/(4,000)2. So GmM/(4,000)2=32m. Therefore GM=(4,000)2·32.
  • And the answer is ... v2=2GM/4,000=2[(4,000)2·32]/4,000=8,000·32= (256,000)/(5,280)=(approximately)50. The 5,280 came from converting feet to miles. Therefore v, the escape velocity, is about 7mps. I think this computation is so silly that it is cool.

    The other type of improper integral
    Here we will have a function f defined on a<x<=b (notice that a is not included!. And our f will have bad behavior as x-->a+: f(x) will grow and grow and grow: limx-->a+f(x)=+. How can we decide if abf(x)dx converges? The outline of the process we will use resembles the previous kind of improper integral. We will approximate by Qbf(x)dx where Q>a, and let Q-->a+.

    Toy problem #1
    Consider y=1/x on (0,1] (I am leaving out the 0!). Is 01(1/x)dx finite? First compute Q1(1/x)dx. This is ln(x)|Q1=ln(1)-ln(Q). Notice that ln(Q)-->- as Q-->0+ (you need a picture of y=ln(x) in your head!). This means that Q1(1/x)dx-->+ as Q-->0+. So this integral diverges. There is no finite amount of area we can assign to y=1/x between 0 and 1.

    Toy problem #2
    Consider y=1/sqrt(x) on (0,1] (I am leaving out the 0!). Is 01(1/sqrt(x))dx finite? First compute Q1(1/sqrt(x))dx. This is 2sqrt(x)|Q1=2sqrt(1)-2sqrt(Q), Notice that as Q-->0+, 2sqrt(1)-2sqrt(Q)-->2. Therefore we say that 01(1/sqrt(x))dx converges, and its value is 2.

    A note on the picture
    I only supplied one picture for both of the toy problems. Well, the graphs of both of them have vertical asymptotes at 0, are decreasing, concave up, and go through (1,1). They are qualitatively very much the same. There are only slight cumulative (!) differences in the area, and that's what the preceding algebraic computations show.

    x·ln(x)
    I asked people for the graph of y=x·ln(x) on the interval [0,1]. Some people were willing to use their graphing calculators. A graph much like what is shown to the left was produced.

    The graph seems to be a slightly assymetrical bump below the x-axis, hanging from (0,0) and (1,0). The "bottom" is at, about, -1/3 (near x=1/3, actually). If you "ask" your computer or calculator for the value of x·ln(x) at x=0, however, there will be some sort of complaint rather than a number. The machines have been advised that 0 is not in the domain of ln. But the graph certainly seems to indicate that (0,0) is there (wherever there is!). What's going on?

    L'H
    Really what the graph indicates is a suggested value for limx-->0+x·ln(x). The guess for this is 0. To verify this guess (in a math course!) we will use L'Hôpital's Rule. As x-->0+, we have a 0 multiplied by (-) . L'Hôpital's Rule works on quotients, so we need to rearrange things algebraically. Here we go:
    limx-->0+x·ln(x)=limx-->0+[ln(x)/{1/x}]=(using L'H)=limx-->0+[{1/x}/{-1/x2}]=limx-->0+-x=0 so the limit is verified.

    The integral
    How much "area" is included in the bump above? The bump is below the x-axis so the area should be negative. It sort of resembles a triangle with base [0,1] and altitude about 1/3. So a guess is that the area should be about -1/3. An actual graph of the function and of this approximating triangle is shown to the right. The function is concave down so it bulges beneath the triangle. And, in fact, the "point" of the triangle is below the graph. So there is more (absolute value!) area in the bump than in the triangle.

    Let's compute. The area is 01x·ln(x)dx. This is officially an improper integral (it really is difficult to evaluate the integrand at x=0!). So first I'll compute Q1x·ln(x)dx for Q small positive, and then let Q-->0+. To use FTC we need an antiderivative of x·ln(x). Integration by Parts again works. If u=ln(x), then dv=x dx, and du=(1/x)dx and v=(1/2)x2. So:
    x·ln(x)dx=(1/2)x2ln(x)-(1/2)x2(1/x)dx=(1/2)x2ln(x)-(1/4)x2+C
    The definite integral is (1/2)x2ln(x)-(1/4)x2|Q1=((1/2)Q2ln(Q)-(1/4)Q2)-((1/2)12ln(1)-(1/4)12).

    L'H
    I know that limQ-->0+-(1/4)Q2=0 because Q2 is continuous and I can just "plug in". What about limQ-->0+(1/2)Q2ln(Q)? Here we (officially!) need L'Hôpital's Rule again. So:
    limQ-->0+(1/2)Q2ln(Q)=limQ-->0+(1/2)[ln(Q)/{1/Q2}=limQ-->0+(1/2)[1/Q}/{-2/Q3}=limQ-->0+(-1/4)Q2=0.

    If you now put everything together (and don't lose track of the minus signs!) you can see:
    01x·ln(x)dx converges and its value is -1/4. The -1/4 is certainly consistent with the estimate we made earlier, backed up by the red and green graph.

    A real application ...
    This strange function with its somewhat strange graph is actually related to a function used in applications. The function used in applications is actually a bit more complicated (sigh). Here is how to think about it.
    A graph of y=x·ln(x) on [0,1]. The function is concave up and below the x-axis. The area is -1/4, as just computed.
     
    Flip the curve over the x-axis. So this is a graph of y=–x·ln(x) on [0,1]. The function is concave down and above the x-axis. The area is +1/4, because now the region we're considering is above the x-axis.
    This is a more complicated flip. Replace x by 1-x. This is a flip which exchanges left and right because of the +/- change in the x multiplier. In fact, the left and right are exchanged, and the y-axis and x=1 are interchanged. So this is a graph of y=-(1-x)·ln(1-x) on [0,1]. The function is concave up and above the x-axis. The area is 1/4.
    Now add up the two previous functions. Here is a graph of y=–x·ln(x)–(1-x)·ln(1-x) on [0,1]. Yes, it is weird. This function officially has two strange behaviors, at both 0 and 1. The function is called the binary symmetric entropy function and it is used to study the amount of information flowing through a "channel" (you could think of a channel as a wire, and the information as 0's and 1's -- bits). The entropy function helps to analyze what happens in complicated situations where there may be interference (noise). This function has one bump, and its total area is 1/2.

    Student question
    Mr. Lenzo asked whether I could really predict (?) that the result of adding the two bumps would be just one symmetric bump. In fact, that result may not occur.
    Here is a graph of x[ln(x)]2 on [0,1]. Because of the square, the function is positive, and the bump is more pronounced. And this is a graph of x[ln(x)]2+ (1-x)[ln(1-x)]2. So the two bumps suggested by the student comment do show up. It can happen.
     
     

    The QotD
    Does 01(1/x2)dx converge? If it does, what is its value?

    Physics?
    The preceding question is quite physical. For example, this might be a model of an electron moving closer to another electron. Since the integral diverges this indicates that it would take an infinite amount of work (using the computations of classical physics!) to move electrons so they touch.


    Wednesday, February 20 (Lecture #9)
    Morality?
    I am not certified to discuss thoroughly the difference between Good and Evil, or even, as I remarked in class, the distinctions between Mediocre and Not So Bad. However, I can tell you that an antiderivative of 1/(x+1)2 is -1/(x+1). Please know this.

    What we did so far ...
    I've tried to explain how partial fractions splits up a rational function into a sum of pieces which are easier to understand and analyze. In the context of Math 152, the further work is antidifferentiation. So we've looked at Top(x)/Bottom(x). First we divided, if necessary, to get the degree of the Top less than the degree of the Bottom (the quotient is a polynomial which we already know about). The result, a proper rational fraction, is what we will investigate now. The Partial Fractions algorithm depends on factoring Bottom(x). I've tried to show with examples what to do if there are linear factors, like (x-3)2

    And now another difficulty ...
    Factoring polynomials is more difficult than we have seen so far. In addition to linear factors, there are polynomials like x2+1. This polynomial is never zero, so it can't be written as a product with any linear x-a (if x2+1 were equal to such a product, when x=a the result would be 0, which is isn't). So let me show an example.

    Yet another example
    I'll show you the symbolic pieces, and then solve for them.

       11x+7        A      Bx+C
    ----------- = ----- + ------
    (x-3)(x2+1)    x-3     x2+1
    So when there is an irreducible quadratic then an unknown linear term needs to be put on top. If we combine terms and look at the tops, the result is
    11x+7=A(x2+1)+(Bx+C)(x-3).
    Again, any method that gets the answer is a good method. So:
    x=3 gives 11·3+7=A(32+1)+(Bx+C)0 so 40=10A so A=4.
    x=0 gives 7=A(1)+(B·0+C)(-3) so 7=A-3C so since A=4, 7=4-3C and C=-1.
    Consider the x2 coefficients: 0=A+B, so since A=4, B=-1.

    Therefore

       11x+7        4     -4x-1
    ----------- = ----- + ------
    (x-3)(x2+1)    x-3     x2+1
    Integration
    Let's integrate the pieces. A small amount of rewriting gives:
       11x+7        4      -4x      -1
    ----------- = ----- + ------ + -----
    (x-3)(x2+1)    x-3     x2+1     x2+1
    The first and third terms should not be difficult to recognize and integrate: 4ln(x-3) and -arctan(x). The middle term can be done with w=x2+1 so dw=2x dx, with the result -2ln(w)=-2ln(x2+1). And +C of course. So finally (11x+7)/[(x-3)(x2+1)]dx=4ln(x-3)-2ln(x2+1)-arctan(x)+C.

    What is an irreducible quadratic?
    An irreducible quadratic is a degree 2 polynomial which has no real root. So 5x2-9x+17 is an irreducible quadratic but 7x2-88x-20 is not. How do I know this? Well, the roots of Ax2+Bx+C=0 are given by the famous formula [(-B+/-sqrt{B2-4AC})/2A]. The roots are real exactly when the "stuff" under the square root sign in the formula is not negative. (Negative gives complex roots and I am not supposed to discuss these with you lest your brains explode.) The B2-4AC is usually called the discriminant. For 5x2-9x+17 the discriminant is (-9)2-4(5)(17) sure looks negative and for 7x2-88x-20, (-88)2-4(-20)7 certainly seems positive.

    What happens in general
    Powers of linear factors need constants on top. Powers of irreducible quadratics need degree one "unknowns" on top.

    The partial fraction algorithm
    DescriptionFeasibility
    Step 0 Long division
    Take a rational function, and divide Top by Bottom until there is a Quotient (which will be a polynomial) and a remainder. Make the remainder the new top, and then pass that fraction (remainder/Bottom) to the next steps.
    This is certainly easy to do by hand or by machine.
    Step 1 Factoring
    Factor the bottom into powers of linear polynomials and powers of irreducible quadratics.
    If the factorization is known, everything else is easy. This is the part that is authentically computationally difficult. There's a thereom which states that every polynomial can be written as a product of linear factors and irreducible quadratic factors. But actually finding these factors, even approximately, can be a difficult computational task.
    Step 2 Write a symbolic sum
  • (linear)power: if, say, (x-3)4 is a factor, write a sum of 4 terms: k1/(x-3)1+k2/(x-3)1+k3/(x-3)2+k4/(x-3)3. In general, there are as many terms as the degree of the power of the linear factor, and each has an unknown symbolic constant on top.
  • (irred. quad.)power: if, say, (4x2+5x+11)3 appears, then write (k1+j1)/(4x2+5x+11)1+(k2+j2)/(4x2+5x+11)2+(k3+j3)/(4x2+5x+11)3. In general, there are as many terms as the degree of the power of the irreducible quadratic factor, and each has two unknown symbolic constants on top, arranged as a linear polynomial.
  • This is easy to do, once you get used to it.
    Step 3 Find the values of the constants
    Push together the fractions with the symbolic coefficients. Then if this is to be equal to the original rational function, the tops must be equal. Find the values of the symbolic coefficients.
    This actually turns out not to be difficult in practice when you learn what you are doing. The equations for the symbolic coefficients are just a collection of linear (first power) equations in the unknowns. It is easy and practical to solve systems of linear equations, even very large systems of linear equations (people deal with systems of thousands of linear equations all the time!).

    If you want to include Step 4, integrating the pieces, then you should already see that integrating the pieces which come from the linear factors is not difficult. Integrating the pieces which come from the irreducatible quadratic factors can certainly be tedious by hand, but not actually impossible. A complete-the-square step followed by a trig substitution (x=(constant)tan() will do it). It won't be pleasant, but I could imagine doing low degree examples by hand.

    An example, not by hand
    The following computation took about half a second on my work computer, which is several years old and not especially fast. I am a bit surprised it took that long. (Ahhh ... I experimented further: just loading the appropriate software seems to take most of the time, not working on the specific example!) The first command defines the function, as I wrote it in class. The second command asks to convert the rational function into its partial fraction form. I can't figure out the order the pieces are printed -- certainly not any order I can easily identify. All the pieces one might expect according to the general statement are there, however. Then the third command asks for the integral (antiderivative) of this. Take a quick look and see which pieces you can pick out, just for fun.

    >f:=1/(x*(x-2)^3*(3*x-7)^2*(x^2+4)^2*(x^2+2*x+3));
                                             1
                  f := ----------------------------------------------
                                3          2   2     2   2
                       x (x - 2)  (3 x - 7)  (x  + 4)  (x  + 2 x + 3)
    > convert(f,parfrac);
          87            1         -54 - 11 x            59049
    -------------- - ------- + ---------------- + ------------------
                 2   18816 x            2     2                    2
    30976 (x - 2)              924800 (x  + 4)    5967850 (3 x - 7)
    
            -11708 - 1727 x           3774530178               1
         + ------------------ - ---------------------- + -------------
                       2        104750687125 (3 x - 7)               3
           314432000 (x  + 4)                            1408 (x - 2)
    
               -52145 - 44488 x             8229
         + ------------------------- + --------------
                        2              681472 (x - 2)
           8033987874 (x  + 2 x + 3)
    
    > int(%,x);
           87                            -108 x + 88        14003
    - ------------- - 1/18816 ln(x) + ----------------- - --------- arctan(x/2)
      30976 (x - 2)                              2        628864000
                                      14796800 (x  + 4)
    
                 19683           1727        2         1258176726
         - ----------------- - --------- ln(x  + 4) - ------------ ln(3 x - 7)
           5967850 (3 x - 7)   628864000              104750687125
    
                 1           11122        2
         - ------------- - ---------- ln(x  + 2 x + 3)
                       2   4016993937
           2816 (x - 2)
    
                                              1/2
              7657      1/2        (2 x + 2) 2        8229
         - ----------- 2    arctan(--------------) + ------ ln(x - 2)
           16067975748                   4           681472
    Improper integrals: what are they?
    So far we have discussed computing standard definite integrals. Although certainly a definite integral like abf(x)dx can represent many different ideas, the most familiar instantiation is as an area (asssuming that f(x)>0 for x in [a,b]) bounded by the x-axis, x=a, x=b, and the graph of y=f(x). In most of the computations we've done, the function f has been rather "nice" -- differentiable, mostly, and only a few times has it had some discontinuities. In fact, there are many applications where this simplicity is made more complicated because the applications themselves demand a "stronger" kind of integral.

    For example, we might consider a situation where, say, b gets larger and larger and larger. Where, say, b-->. I will give a real physical example of this at the next lecture. This integral will have a domain which is an infinite interval. It could be [a,) or (-,b] or even (-,). Such integrals also occur very frequently in statistics (and therefore they "infiltrate" almost all experimental sciences!).
    A completely naive interpretation of the area would declare that since the length of the base is infinite, the total area must somehow be forced to be infinite. More subtle, the height in certain cases will decrease fast enough so that the total integral can be thought of as finite.

    There may also be a sort of defect (?) in the range of f. For simplicity, consider the situation where, although f is "nice" for x>b, as x-->+, f(x) gets larger and largerand larger: in fact, we might need to try to "integrate" or compute the value of abf(x)dx even if f tends to as x-->a.
    Again, a first look could convince you that such "areas" need to be infinite, also, because the height is infinite. But, actually, the way f grows as x-->a+ is what matters. It is possible to imagine that the growth of f is so controlled that the total approximating areas don't tend to infinity. And maybe, in such situations, we should be able to compute the integral.

    I will first consider the "defect in the domain" case.

    Toy example #1
    Look at y=1/x2. The integral 1B(1/x2)dx (I'm using B as an abbreviation for BIG) can be computed directly:
    1B(1/x2)dx=-1/x|1B=1-(1/B) (be careful of the signs!)
    Now if B-->, certainly 1-(1/B)-->1. Then we will declare that the improper integral 1(1/x2)dx converges and its value is 1.

    Toy example #2
    Look at y=1/x. Consider the analogous integral 1B(1/x)dx (again think of B as a BIG number). We compute it:
    1B(1/x)dx=ln(x)|1B=ln(B)-ln(1)=ln(B)-0
    I wanted also to consider here the behavior as B-->, but some students seemed to be confused (this is confusing!). What does happen to ln(B) when B gets large? If you only have a loose idea of the graph in your head, well the log curve might not look like it is increasing too fast. Well, it actually is not increasing very fast, but it is increasing. Look: ln(10) is about 2.3, so ln(102)=2ln(10) is about 4.6 (that's 2·2.3), and ln(103)=3ln(10) is about 6.9 (that's 3·2.3), etc. Here etc. means I can get values of ln as large as I want by taking ln's of large enough powers of 10 (hey, ln of 105,000 is bigger than ... 10,000: so there!). So the values of 1B(1/x)dx do not approach a specific number as B-->. Therefore we say: the improper integral 1(1/x)dx diverges.

    The distinction between converges (approaches a specific finite limit) and diverges (does not approach a specific finite limit) is the one that is important in applications and that motivates the distinct use of the two words.

    Geometric constrast
    I love pictures. I like computation, but I can barely tolerate (!) "algebra". But I introduced the actual definition of {con|di}vergent improper integrals with some algebra, and didn't draw any pictures. Why? Well, because pictures, while useful, don't help too much. Here are qualitative pictures of the two graphs.

    Well, they are actually different graphs, sorta. But I wanted to emphasize, through sketching them not too carefully (and on different axes, without scales!) these curves both "start at" (1,1), and as they go right, are always positive, decreasing, concave up, with 0 as limits. My eyes, at least, can't tell that one of them (on the left?) has finite total area, and one of them (to the right!) has infinite total area. The difference is quite surprising.

    Damped oscillation
    I wanted to investigate the convergence or divergence of 0e-xsin(5x)dx. I chose this integrand because I wanted you to remember the workshop problem. Also, it is "real": look at the graph to the right (warning: the horizontal and vertical scales are very different!). It shows something that many of you will learn to recognize as damped oscillation (put a vibrating spring in maple syrup or motor oil or ... well, it will slow down).

    What can we say about 0e-xsin(5x)dx? Well, first let's consider 0Be-xsin(5x)dx when B is large. We can compute this using FTC by using Integration by Parts twice. Here is the result:
    0e-xsin(5x)dx=-(5/26)e-xcos(5x)-(1/26)e-xsin(5x)|0B=-(5/26)e-Bcos(5B)-(1/26)e-Bsin(5B)+(1/26).
    Again, the signs may lead to errors, so use some care. Now the B stuff is the interesting part here. What happens to -(5/26)e-Bcos(5B)-(1/26)e-Bsin(5B)=[-(5/26)cos(5B)-(1/26)sin(5B)]/eB as B-->? Please notice that the top has some numbers (5/26, 1/26) and values of sine and cosine which are always between -1 and 1. The bottom has eB which grows really really fast. So (Squeeze Theorem?) the quotient will-->0 as B-->.

    We therefore declare that 0e-xsin(5x)dx converges, and its value is 1/26. This certainly isn't obvious.

    Which is smaller?
    Consider 1/x and 1/x2 and e-x. If you think about it carefully (o.k., if you have to, consider L'Hôpital) then you should see that as x--> each of these functions approaches 0. 1/x is the slowest. 1/x2is in the middle, and e-x is the fastest. Since the 1/x2 integral converges, the smaller one, with e-x, and with +/- issues (see below) will also converge.

    The result (what does it mean?)
    What does 0e-xsin(5x)dx=1/26 mean? Well, this definite integral is not an area. In the simplest geometric interpretation, it assigns + to chunks over the x-axis and - to chunks under the x-axis. So the definite integral is a weighted sum. I think I could compute the "total" area enclosed by the curve (algebraically, the integral of the absolute value of the function) but that would be rather difficult.

    Another example
    I wanted to analyze 1[ln(x)/x2]dx. A sort of picture is to the right. Again, warning: the horizontal and vertical scales are very different.

    QotD
    Find [ln(x)/x2]dx. I hope that this is done using Integration by Parts.


    Monday, February 18 (Lecture #8)
    Things ...
    More help sessions are available at the MSLC. Average student performance on the preceding workshop was not so good, and I tried to discuss this is detail, along with some comments about how to study. The workshop problems for which I've requested writeups are generally not abstract questions, but represent special cases of successful strategies for handling real world problems. So learning about these ideas is important.
    I honestly don't think there is any student attending who could not be successful in this course. The major determining factors are the will to succeed and putting in time and effort. I want you to succeed, but you are the chief architect of your own success.

    First exam
    The first exam in this course will be given on Wednesday, February 27. Here is further information.

    I want to keep up with the diary, but have had other things to do today (Tuesday, 2/19). I will mostly copy what I did last year, making slight changes. What I did wasn't very different.

    Nice representions of functions
    Functions can be studied as the (possibly!) interesting objects that they are, but it is likely that various kinds of functions will be used by most students in the class to model physical situations, or to match data sets. Usually people try to use familiar functions first, and to use formulas for these functions. In the setting of calculus, we differentiate and integrate functions. Later, in courses following calculus which many students will take, other things will be done to functions (Laplace transforms, Fourier transforms, ...). It is important to get nice representations of functions, representations which make it easier to do things with the functions. This is maybe too darn abstract. Let's look at a particular example.

    Polynomials
    Polynomials are probably the first functions anyone thinks about. So I suggest the following polynomial:
    ((3+(5+8x3)46)37.
    Certainly this is a polynomial. It has degree 5,106. I believe that I can differentiate it with very little difficulty (two uses of the Chain Rule). How about antidifferentiation? Well, goodness, we know how to do that ... but we know how to do that easily when this polynomial is presented nicely, as a sum of constants multiplied by non-negative integer powers of x. When I typed a request to integrate something like this into Maple on either my home or work computers, all I succeeded in doing was freezing the processors because, I suspect, the program wanted to e-x-p-a-n-d the presentation and then antidifferentiate. Much storage and processing was needed to do that. (Don't try this on a Rutgers computer!)

    Rational functions
    A rational function f(x) is a quotient, P(x)/Q(x), where the top and bottom are both polynomials. The aim is not to get a nice representation of such a function. The best-known representation is called partial fractions. My aim is to describe the method of changing "small" examples of rational functions into their partial fraction representation. I'll also comment, as we go through the steps, about the computational difficulty of doing this representation in the "real world". It is true that every rational function has a unique partial fraction representation, just as every polynomial has a unique standard representation as a sum of multiples of powers of x. That there is always a partial fraction representation and there is exactly one such representation is a theorem. The proof takes a while and is not part of this course. Describing the process and the type of result to expect is enough.

    The textbook presents the partial fraction representation as an integration strategy. It is certainly such a strategy, because once the rational function is written in its partial fraction representation, antidifferentiation is straightforward. So I will discuss antidifferentiating the pieces, also. But there are practical reasons one might want the rational functions decomposed. For example, the repelling force between two classical charged objects (electrons?) is rational (it is inverse square where the variable is the distance between the object). You could imagine that there's a complicated force law which is rational and has singularities (where the bottom of the rational function is 0 and the top is not). I might want to write this as a sum of different forces each with singularities in only one location. That is always possible and is a consequence of the partial fraction representation.

    An example
    We wrote [(5x-7)/(x2-2x-3)] as a sum of constants multiplying (x-3)-1 and (x+1)-1 and then got specific values of the constants. As you'll see this is a typical partial fractions example. But there's one preparatory step we might have to do which is not included in this example. What is that?

    Suppose I want to look at, say, [(x3+4x-1)/(x2-2x-3)]. My preparation would consist of the following:

               x1+2
             ---------------
     x2-2x-3 | x3+0x2+4x-1
               x3-2x2-3x
              --------------
                  2x2+7x+1
                  2x2-4x-6
                 ----------
                     11x+7
    So x+2 is the quotient and 11x+7 is the remainder. We can write the original fraction as:
     x3+4x-1              11x+7
    ---------- = x+2 +  --------
     x2-2x-3             x2-2x-3
    The polynomial is something we know and understand, and it is correctly "packaged" in a standard way. From now on I'll only consider proper rational fractions where the degree of the top is less than the degree of the bottom.

    Partial fractions, Step 0
    If the input is P(x)/Q(x) and is not proper, then divide the top by the bottom, and rewrite the result as Quotient+Remainder/Q(x). Here Quotient will be a polynomial, and Remainder/Q(x) will be a proper rational fraction. Pass the "Remainder/Q(x)" on to the other steps.

    Computational effort of Step 0
    This is straightforward, easy to program, and doesn't take much time or space.

    Partial fractions, Step 1, sort of
    This step is: given P(x)/Q(x), find the factors of Q(x). I'll need to say more about this, but look:

                  6        5         4         3          2
         A := 30 x  + 179 x  - 3859 x  - 6591 x  + 43369 x  + 23500 x - 113652
    
    > factor(A);
                (x - 2) (5 x - 11) (x - 9) (2 x + 7) (3 x + 41) (x + 2)
    
    Actually this example is totally silly. I created A by multiplying the factors which are shown. In reality, factoring is a very difficult problem.

    Most of the protocols which guarantee privacy and security in web transactions rely, ultimately, on the difficulty of factoring, even the difficulty of finding the prime factors of positive integers. The most well-known algorithm (RSA, for Rivest-Shamir-Adelman) is based on the following problem: suppose you know that a positive integer is the product of two primes. What are the primes? Well, 6 is 2 times 3, so ... except that the numbers are hundreds of decimal digits long, and there is no known feasible way of finding the integer factors. In the case of polynomials, the problems are, if anything, even more difficult, as you will see. The types of factors can vary.

    Partial fractions, Step 2, sort of
    Write a symbolic sum based on the factorization of the bottom. If we wanted to rewrite (11x+7)/(x2-2x-3), which is (11x+7)/[(x-3)(x+1)], the appropriate symbolic sum is

     A     B
    --- + ---
    x-3   x+1
    So there is one term for each factor.

    Partial fractions, Step 3, sort of
    Find values of the constants in the symbolic sum. In this specific simple (toy!) example, since

     A     B     A(x+1)+B(x-3)
    --- + --- = --------------
    x-3   x+1     (x-3)(x+1)
    is supposed to be equal to (11x+7)/(x2-2x-3), we know that
    11x+7=A(x+1)+B(x-3)
    but then (x=-1) 11(-1)+7=B(-4) so -4=-4B and B=1. And (x=3) 11(3)+7=A(4) so A=40/10=10.

    Another way of finding A and B so that 11x+7=A(x+1)+B(x-3) is to "expand" the right-hand side, getting Ax+A+Bx-3B=(A+B)x+(A-3B). Then we can look at the coefficients of x and the constant term (the coefficient of x0) to getr
    11=A+B
    7=A-3B
    This is a system of two linear equations in two unknowns and there are many ways to solve such things. (Hey: A=10 and B=1 are the solutions of this system!)

    Another example
    The previous example ended with 11x+7 divided by x2-2x-3. The bottom (denominator?) here can be factored easily as (x-3)(x+1). Let me change the example by changing the bottom. Let's look at [(11x+7)/{(x-3)(x+1)2]. Now one of the factors has a higher power than 1. Some people say that -1 is a root of the bottom polynomial which has multiplicity 2. In this case, the symbolic sum has to be modified. There is one term for each power going up from 1 to the multiplicity. So here:

      11x+7       A     B      C
    ---------- = --- + --- + ------
    (x-3)(x+1)2  x-3   x+1   (x+1)2
    This is step 2, the symbolic sum. Step 3 requires that specific values be found for A and B and C. What I do here is good for small examples. So I would combine the fractions on the right-hand side, using the least common denominator. You need to be careful about this. I have made mistakes lots of times.
     A     B      C       A(x+1)2+B(x-3)(x+1)+C(x-3)
    --- + --- + ------ = ----------------------------
    x-3   x-1   (x-1)2           (x-3)(x+1)2
    Compare the top of the result here with the top of [(11x+7)/{(x-3)(x+1)2.
    11x+7=A(x+1)2+B(x-3)(x+1)+C(x-3)
    I want any method of getting values for A and B and C which make this equation correct. "Theory" guarantees that there are such values, and that these values are unique. I can try magic numbers for x again.
    x=-1 gives 11(-1)+7=A·0+B·0+C(-4) so that C=1.
    x=3 gives 11(3)+7=A(4)2+B·0+C·0 so that A=40/16=5/2.
    There doesn't seem to be a magic number which will produce B. Here are some strategies I use for such examples:
  • One strategy
    Take x=0. This isn't magic, but it simplifies things. Then the equation becomes
    11·0+7=A(1)2+B(-3)(1)+C(-3). Since we know A and C we get 7=(5/2)-3B+1(-3) and 7-(5/2)+3=-3B and 15/2=-3B so B=-5/2.
  • Another strategy
    Look at the x2 coefficient on both sides of the equation 11x+7=A(x+1)2+B(x-3)(x+1)+C(x-3).
    On the left there are no x2's, so the result is 0. On the right (be careful!) there are A x2's and also B x2's (there aren't any from the C term). Therefore 0=A+B and since A is 5/2, B is -5/2.
    These are the same. I needed three tries to get everything to work out correctly!

    The pieces are:

    5/2   -5/2     1
    --- + ---- + -----
    x-3    x+1   (x+1)2
    Can we integrate the result? Yes. The first piece gives 5/2ln(x-3) and the second piece gives -5/2ln(x+1). The last part is (x+1)-2 which gives (-1)(x+1)-1.

    If (x-root)multiplicity is a factor of the bottom, then in Step 2 there will be a bunch of parts, (various constants)/(x-root)integer, with the integer going from 1 to multiplicity. For example, the Step 2 response to the following:

     x4-3x2+5x-7     A       B       C       D       E       F
    ------------- = ----- + ----- + ----- + ----- + ----- + -----
    (x+5)2(x-7)4     x+5    (x+5)2   x-7    (x-7)2  (x-7)3  (x-7)4
    
    And this would lead to a system of 6 linear equations in 6 unknowns. By the way, Step 3, solving the linear equations, turns out to be computationally quite straightforward. Here I don't mean doing things by hand, but on a machine. Very big sytems (tens of thousands of linear equations) are solved efficiently on computers frequently.

    There is one more significantly different computational difficulty. I will discuss it on Wednesday, the next lecture, and complete the statement of the partial fraction algorithm.


    Wednesday, February 13 (Lecture #7)
    (tan(x))4dx
    Clearly we can write (tan(x))4 as (tan(x))2(tan(x))2 and then since (tan(x))2=(sec(x))2-1, we have (tan(x))4=(tan(x))2(sec(x))2-(tan(x))2. So let's compute two integrals:
    (tan(x))2(sec(x))2dx: if we put w=tan(x), then dw=(sec(x))2dx, so the integral becomes w2dw=(1/3)w3+C=(1/3)(tan(x))3+C. We need to subtract (tan(x))2dx, but we did that last time, and it was tan(x)-x+C, so the combined result is this:
    (tan(x))4dx=(1/3)(tan(x))3-tan(x)+x+C. Neat.

    Today's tools
    This is sort of the tools we had on Monday, with one more equation whose usefulness will be demonstrated shortly. I will exchange the previous variable, x, for a new variable, , which your text prefers here.

    Derivative formulas Functional equations
          d
    --- sin() = cos()
         d
          d
    --- cos() = -sin()
         d
     d
    --- sec() = sec()tan()
    d
      d
    --- tan() = (sec())2  
    d
    1=(cos())2+(sin())2
     
    cos(2)=(cos())2-(sin())2
     
    sin(2)=2sin()cos()
     
    (sec())2=(tan())2+1
     
    (tan())2=(sec())2-1

    A circular area
    In the first workshop assignment one of the computations needed was 01sqrt(1-x2)dx. I truly expected people to recognize this as a quarter of the unit circle, and therefore report the value as Pi/4. But if we change the upper limit, then maybe things aren't as simple. So what is 01/2sqrt(1-x2)dx?
    If I want to use FTC to compute this, I should find an antiderivative for sqrt(1-x2). I tried to motivate the following substitution: x=sin() because that substitution will make both dx and sqrt(1-x2) come out "nice". Then dx=cos()d and sqrt(1-x2)=sqrt(1-sin()2)=sqrt(cos()2)=cos(). Therefore:
    sqrt(1-x2)dx=[cos()]2d.
    We use the double angle formula from the toolbox:
    [cos()]2d=(1/2)[1+cos(2)]d=(1/2)[+(1/2)sin(2)]+C
    The extra 1/2 comes from the Chain Rule worked backwards on the "inside" part of cos(2). Now I'd like to return to x-land by writing everything in terms of x instead of . Since sin()=x, we know that arcsin(x)=. That allows us to translate the first part of the answer back to x's. But what about sin(2)? Here is where I need the new formula in the toolbox: sin(2)=2sin()cos(). Each of these I already know in terms of x's because x=sin() and cos() is above (look!): it is sqrt(1-x2). And we have a formula:
    sqrt(1-x2)dx=(1/2)[arcsin(x)+x sqrt(1-x2)]+C.
    There is cancellation of one of the (1/2)'s with the 2 coming from sine's double angle formula.

    We are not yet done, since we asked for a definite integral.
    01/2sqrt(1-x2)dx=(1/2){arcsin(x)+x sqrt(1-x2)}|01/2.
    Now arcsin(0)=0 and the other term is also 0 at 0, so the lower limit gives a contribution of 0. The upper limit has (1/2){arcsin(1/2)+(1/2)sqrt(1-(1/2)2)}. With some thought we might recall that arcsin(1/2) is Pi/6, and also "compute" that sqrt(1-(1/2)2)=sqrt(3)/2. Therefore the definite integral is (1/2)(Pi/6)+(1/2)(1/2)(sqrt(3)/2).

    Geometric solution
    Actually you can "see" these numbers in the picture.
    The triangle has a base whose length is 1/2. Since the formula for the upper semicircle is y=sqrt(1-x2), the height of the triangle is sqrt(3)/2. The area of the triangle must then be (1/2)(1/2)(sqrt(3)/2).
    The base acute angle of the triangle is Pi/3, so the circular sector has inside angle Pi/6. The area of a circular sector is (1/2)(angle {in radians!)radius2. Since the radius here is 1, the area of the circular sector is (1/2)(Pi/6).

    Maple's version
    First the indefinite integral, and then the definite integral.

    > int(sqrt(1-x^2),x);
                                     2 1/2
                             x (1 - x )
                             ------------- + 1/2 arcsin(x)
                                   2
    > int(sqrt(1-x^2),x=0..1/2);
                                       1/2
                                      3       Pi
                                      ---- + ----
                                       8      12

    Another integral (QotD!)
    We looked at [x3/sqrt(1-x2]dx. Again, if x=sin() this gets converted into a "power of trig functions" integral. Actually there was little that was new about this integral, but I thought it would be cute to assign finishing the integral as the QotD with students working in pairs. I am too scared to look at what was handed in. Here is what I hope that I will read (done by me in green and done by students in blue. The exercise was yet another effort to encourage students to work together. Sigh.

    If x=sin() then dx=cos()d and sqrt(1-x2)=sqrt(1-2)=cos() and x3=sin()3 so that the integral becomes sin()3d. In turn we can "split off" one of the sines, and the result is sin()2·sin()d. This makes us think of the substitution w=cos(() with dw=-sin(()d(). So the integral changes into (1-w2)dw because again sine squared is one minus cosine squared. Now we {integrate|antidifferentiate} and the result is -w+w3+C (I pushed through the minus sign) and now back in -land we get -cos()+[cos()3/3]+C and, finally, back in x-land (we are not done officially until we are back in x-land!) we get -sqrt(1-x2)+[{sqrt(1-x2)}3/3]+C.

    Just to complete your joy here is what Maple says, and I don't see the process from the answer:

    > int(x^3/sqrt(1-x^2),x);
                                                      2
                               (-1 + x) (x + 1) (2 + x )
                               -------------------------
                                             2 1/2
                                     3 (1 - x )

    01sqrt(1+x2)
    I want to compute 011/sqrt(1+x2)dx. The value of this integral is the area under y=sqrt(1+x2)dx between 0 and 1. A picture of this area is shown to the right. The curve has height 1 at x=0, and then decreases to height sqrt(1/2) at x=1. Since sqrt(1/2) is about .7, I know that the definite integral, always between (Max. value)·(Interval length) and (Min. value)·(Interval length), is between 1 and .7.
    It is always nice to know some estimate of things to be computed. That gives us at least a rough way of checking on the methods and the result.

    How to do it
    Look in the toolbox and see (sec())2=(tan())2+1. If I look at sqrt(x2+1) then I think of trying x=tan(), so dx=[sec()]2 and sec()=srqt(x2+1). Then 1/sqrt(1+x2)dx becomes [1/sec()][sec()]2d which is sec() d. We officially know this integral because of the ludicrous computation done earlier. Its value is ln(sec()+tan())+C. We can get back to x-land using what we already know, so the antiderivative we need is ln(sqrt(x^2+1)+x)+C.
    The definite integral computation then becomes: ln(sqrt(x^2+1)+x)]01=ln(sqrt(2)+1)+ln(1+0)=ln(sqrt(2)+1) since ln(1)=0. And ln(sqrt(2)+1) is about .88137, certainly between .7 and 1.

    Maple's version
    You may ask for an antiderivative. Look at the result, which is slightly surprising:

    > int(1/sqrt(x^2+1),x);
                                      arcsinh(x)
    What is this? The function called "arcsinh" is an inverse function to one of the hyperbolic functions. The hyperbolic functions are discussed in several sections of the text. They are frequently just as interesting and relevant to describing and solving problems as the more commonly used trig functions. The theory is totally parallel. The trig functions are connected to the circle, x2+y2=1. The hyperbolic functions are connected to -x2+y2=1 or y2=1+x2. There is a Maple instruction which "translates" the inverse hyperbolic function into things we are supposed to understand. Here it is:
    > convert(arcsinh(x),ln);
                                           2     1/2
                                  ln(x + (x  + 1)   )
    The definite integral is recogizable, except for a use of -ln(A)=ln(1/A) where A=sqrt(2)-1. (You can check that 1/[sqrt(2)-1] is the same as sqrt(2)+1!) The next instruction finds an approximate numerical value of the previous answer.
    >int(1/sqrt(x^2+1),x=0..1);
                                          1/2
                                     -ln(2    - 1)
    
    > evalf(%);
                                     0.8813735879

    01[sqrt(x2-1)/x3]dx
    Because I see sqrt(x2-1) and the toolbox contains the equation (tan())2=(sec())2-1 I will "guess" at the substitution x=sec(), which gives dx=sec()tan()d and sqrt(x2-1)=tan(). With this know, I can rewrite the integral.

    [sqrt(x2-1)/x3]dx becomes [tan()/sec()3]sec()tan()d. Then cancel everything you can. The result is [cos()]2d. We already considered this integral, The key observation was:
    (cos(x))2 can be replaced by (1/2)(1+cos(2x)): the degree is halved, but the function gets more complicated by doubling the frequency.
    so [cos()]2d= (1/2)[1+cos(2)]d=(1/2)[+(1/2)sin(2)}+C=(1/2)[+sin()cos()]+C using the double angle formula for sine, also in today's toolbox.

    Back to x-land
    The translation back turns out to be interesting and more involved than similar previous transactions. We know that sec()=x and we want to know what sine and cosine of are in terms of x. One way some people use is drawing a right triangle with one acute angle equal to , and with sides selected so that sec() is x. Since (with some effort) we know that secant is ADJACENT/HYPOTENUSE, and we can think that x is x/1, well the triangle must be like what is pictured. Then Pythagoras allows us to get the oppositite side, as the square root of the difference of the squares of the hypotenuse and the adjacent side. From the triangle we can read off sin()=sqrt(x2-1)/x and cos()=1/x. Then (1/2)[+sin()cos()]+C becomes (1/2)[arcsec(x)+sqrt(x2-1)/x2]+C. As I explained in class, arcsec is a fairly loathsome function (yes, this is a value judgement about a morally neutral function). In fact, when I asked my silicon friend, the reply was the following:

    >int(sqrt(x^2-1)/x^3,x);
                    2     3/2     2     1/2
                  (x  - 1)      (x  - 1)                      1
                  ----------- - ----------- - 1/2 arctan(-----------)
                        2            2                     2     1/2
                     2 x                                 (x  - 1)
    That is, Maple does not want to deal with arcsec at all. Yes, if you really wish, there is a convert instruction to get the arcsec version. With some effort, you can look at the triangle and see what arcsec is means in terms of arctan.

    Are we stupid?
    We're really not done with the problem. I asked for a definite integral. Here is what happened to that inquiry on a machine:

    >int(sqrt(x^2-1)/x^3,x=0..1);
                                      infinity I
    I wanted to do this specifically to show you the result. The machine will do (try to do?) what you ask. This is a sort of silly answer, but the question is, indeed, sort of ridiculous. The integrand is [sqrt(x2-1)/x3]. On the interval [0,1], the bottom has x3. I bet that as x-->0+, something weird may happen: the integrand gets very, very large. That explains the infinity in the result. Later in the course we will see how to assign certain integrals finite values even when bad things happen to the integrand, but that procedure won't apply in this case. Where does the I come from? Well, look at x's inside [0,1]. Those x's make x2-1 negative and the integrand is requesting the square root of a negative number. Although we are not supposed to discuss complex numbers in this course, the machine believes we want a complex number computation, and it emits (?) an I to indicate this. So a silly question gets an appropriately silly answer.

    A final integral with a square root
    The last antiderivative of this type I looked at was something like: sqrt(x2+6x+7)dx. Here the novelty is the 4x term. Some algebra which you have likely seen before can be used to change this to a form we can handle.

    Getting rid of the x term
    We are "motivated" by the expansion: (x+A)2=x2+2Ax+A2. We will complete the square. The picture to the right is supposed to symbolize this method. Heh, heh, heh ... So:
    x2+6x+7=x2+2(3x)+7=x2+2(3x)+32-32+7=(x+3)2-9+7=(x+3)2-2.
    Now make the substitution u=x+3 with du=dx. Then sqrt(x2+6x+7)dx becomes sqrt(u2-2)dt. We can sort of handle this with a trig substition but there is -2 instead of -1.

    Start with (tan())2=(sec())2-1 and multiply by 2 to get 2(tan())2=2(sec())2-2. I "guess" that I would like to try t=sqrt(2)sec(). Then t2=2(sec())2, so t2-2 is 2(tan())2. Also dt=sqrt(2)sec()tan() d. The integral in -land is sqrt[2(tan())2]sqrt(2)sec()tan() d which is 2sec()[tan()]2d. As I said in class, I got bored here. The previous methods can handle this. The details are complicated and offer lots of opportunity for error. Look below for a final answer.

    Etc.

    > int(sqrt(x^2+6*x+7),x);
                          2           1/2
              (2 x + 6) (x  + 6 x + 7)                   2           1/2
              --------------------------- - ln(x + 3 + (x  + 6 x + 7)   )
                           4
    I hope you vaguely recognize some of the pieces. For example, the stuff inside the ln results from ln(sec+tan).


    Monday, February 11 (Lecture #6)
    Just a few more Integration by Parts ...
    The previous QotD (antiderivative of arcsin: please do it again if you got is wrong!) got a bunch of answers that I didn't like, so I wanted to demonstrate some further examples of Integration by Parts. I asked for courageous volunteers (defined here as "People who didn't run fast enough") to do the following problems.

    ln(x)dx
    The volunteers, Ms. Kofman and Mr. Szurick, kindly computed this straightforward antiderivative. If udv=uv-vdu, then u=ln(x) implies dv=dx so du=(1/x)dx and v=x. Then:
    ln(x)dx=x[ln(x)]-x(1/x)dx=x[ln(x)]-1dx=x[ln(x)]-x+C.

    sin(x)sin(3x)dx
    Here the vital (!) formulas were obtained by Ms. Javier and Mr. Velez. The lecturer showed his lack of sophistication by mispronouncing names. So we want to apply udv=uv-vdu to sin(x)sin(3x)dx. This antiderivative is certainly not as simple as the previous one.

    I think the volunteers took u=sin(x) and dv=sin(3x)dx. Then du=cos(x)dx and v=-(1/3)cos(3x). Just the computation of v needs some care, because there is a sign to worry about and then the factor (1/3) is needed to "fix up" what happens when the Chain Rule differentiates cos(3x). So udv=uv-vdu becomes:
    sin(x)sin(3x)dx=-(1/3)sin(x)cos(3x)+(1/3)cos(3x)cos(x)dx

    The plus sign is really two minus signs packaged together. Now things look bad, because it seems like we have "exchanged" the original integral for something just as bad. Well, in this case we can try again. Use integration by parts on cos(3x)cos(x)dx. (I'll pull out the multiplicative factor 1/3 but remember it later!). Take u=cos(x) and dv=cos(3x)dx. The resulting du is -sin(x) and the resulting v is (1/3)sin(3x). The signs and the multipliers are quite important. The integration by parts formula becomes:
    cos(3x)cos(x)dx=(1/3)cos(x)sin(3x)+(1/3)sin(x)sin(3x)dx.

    We get the original integral back. This plus sign is also two minus signs. All of the constants are important. Suppose we plug this into our first Integration by Parts:
    sin(x)sin(3x)dx=-(1/3)sin(x)cos(3x)+(1/3)((1/3)cos(x)sin(3x)+(1/3)sin(x)sin(3x)dx)

    Let's call JV the antiderivative we want. Then the equation above is:
    JV=-(1/3)sin(x)cos(3x)+(1/3)((1/3)cos(x)sin(3x)+(1/3) JV)
    so we can solve for JV.
    JV=-(1/3)sin(x)cos(3x)+(1/3)((1/3)cos(x)sin(3x)+(1/3) JV) is
    JV=-(1/3)sin(x)cos(3x)+(1/9)cos(x)sin(3x)+(1/9)JV so
    (1-{1/9})JV=-(1/3)sin(x)cos(3x)+(1/9)cos(x)sin(3x) and since 1-{1/9} is 8/9, we can divide by 8/9 to get
    JV=(9/8)( -(1/3)sin(x)cos(3x)+(1/9)cos(x)sin(3x))
    It is not at all clear to me that
    sin(x)sin(3x)dx=(9/8)( -(1/3)sin(x)cos(3x)+(1/9)cos(x)sin(3x))+C

    Comment I just did this antiderivative with Maple and the result was wonderfully weirdly different. But more about this later!

    A definite integral
    Please notice that sin(x) and sin(3x) are both 0 when x=0 and x=Pi (sines are always 0 at integer multiples of Pi). This means (and this is almost clear, if you assume the antiderivative result above is correct!) 0Pisin(x)sin(3x)dx=0. A picture of sin(x)sin(3x) on the interval [0,Pi] is shown to the right (a kind stranger helped me with this in class -- I would thank him here if I knew his name!). Notice that, even with the picture, it is not totally clear to me that the positive areas (above the x-axis) exactly balance out the negative area below the axis. They do, though. It turns out that integrals of this type come up very often when looking at vibrations of things, and that this integral is 0 (and other similar integrals, also) is quite useful. (I then mentioned hairs in the cochlea, which is a structure inside the ear: too much digression. Apologies!).

    sin(sqrt(x))dx
    The final example in lecture was done by Ms. Gautam and Mr. Lee. The antiderivate of sin(sqrt(x)) (this is a composition, not a multiplication!) is quite irritating. Probably the best way to begin it is with a substitution. Try w=sqrt(x), so dw=(1/2)[1/sqrt(x)]dx. Let's solve for dx: dx=2sqrt(x)dw=2w dw. Then the integral is changed:
    sin(sqrt(x))dx=2w·sin(w)dw
    Here I have pulled out the multiplicative factor 2, and changed the sqrt(x) inside the sine to w. Whew! If you don't do this initial substitution, then ... well, we have. Let me show you what happens now (I will forget the 2 for now) to 2w·sin(w)dw. We will use udv=uv-vdu with u=w and dv=sin(w) so that du=dw and v=-cos(w). The result is not hard to finish up:
    w·sin(x)dw=-w·cos(w)+cos(w)dw=-w·cos(w)+sin(w)+C.

    We can substitute back and remember the 2 so that
    sin(sqrt(x))dx=-2sqrt(x)·cos(sqrt(x))+2sin(sqrt(x))+C
    and I just mention again that there are lots of signs and constants which are sources of error.

    Integer powers of trig functions
    The goal today is to show you some algebraic tricks which can be used to compute (in principal!) the antiderivative of any integer powers of trig functions. I sincerely hope that you won't have to use these tricks too often once you're out of Math 152, and that you will have "machinery" available to compute these integrals. But, as you will see, even with machinery, you will need to cope with the results, and sometimes they can be irritating to understand and use.

    What's needed

    Sine &
    Cosine
    Tools
     d
    --- sin(x) = cos(x)
    dx
             1=(cos(x))2+(sin(x))2
     d
    --- cos(x) = -sin(x)
    dx
    cos(2x)=(cos(x))2-(sin(x))2

    sin(x)3cos(x)3dx
    This is (relatively) easy, as you will see. What we can do is "borrow" a cosine, say. What do I mean? Well:
    (sin(x)3cos(x)3dx=sin(x)3cos(x)2[cos(x)]dx
    Maybe this suggests the substitution w=sin(x). Then dw=cos(x)dx and we can write sin(x)3 as w3. What about the last chunk of the integrand (the function we're integrating)? Well, that's cos(x)2, and since cos(x)2=1-sin(x)2, we see that cos(x)2=1-w2. Now:
    sin(x)3cos(x)2[cos(x)]dx=w3[1-w2]dw=w3-w5dw=(1/4)w4-(1/6)w6+C
    If we return from w-land to x-land, the answer turns out to be (1/4)sin(x)4-(1/6)sin(x)6+C.

    And another way
    An inquisitive person might notice the following: we could have borrowed a sine. Here:
    (sin(x)3cos(x)3dx=sin(x)2cos(x)3[sin(x)]dx
    and take w=cos(x), so dw=-sin(x)dx and -dw=sin(x)dx. Now it is sin(x)2 which we should think of as 1-cos(x)2=1-w2 and replace cos(x)3 by w3, so that:
    sin(x)2cos(x)3[sin(x)]dx=[1-w2]w3dw=w5-w3dw=(1/6)w6-(1/4)w4+C
    Things may get a bit tricky. I pulled out a minus first, and then reinserted it when I multiplied the powers of w inside the integral. Then I antidifferentiated. So the answer is (substituting back cos(x) for w here) (1/6)cos(x)6-(1/4)cos(x)4+C

    What's going on?
    Let's see: we seem to have two answers for sin(x)3cos(x)3dx. They are
    (1/4)sin(x)4-(1/6)sin(x)6+C and (1/6)cos(x)6-(1/4)cos(x)4+C.
    If you love (?) trig functions, you know that there are many more trig identities besides the basic ones listed above in the Sine & Cosine Tools. Maybe the functions (1/4)sin(x)4-(1/6)sin(x)6 and (1/6)cos(x)6-(1/4)cos(x)4 are actually the same.
    Plug in x=0. Then (1/4)sin(x)4-(1/6)sin(x)6 becomes 0 (hey: sin(0)=0) and (1/6)cos(x)6-(1/4)cos(x)4 becomes 1/6-1/4 because cos(0)=1. And 1/6-1/4 is not 0. What is going on here? Let me in fact make things more difficult before explaining more.

    And Maple's answer ...
    Let's see what we get:

    > int(sin(x)^3*cos(x)^3,x);
                                     2       4              4
                          -1/6 sin(x)  cos(x)  - 1/12 cos(x)
    This seems to be different from both of the previous answers. Actually things aren't that bad because if you substitute 1-cos(x)2 for the sin(x)2 the answer becomes the cosine answer, but Maple chooses to write the answer this way. I still haven't answered: What is going on here?

    x(x+1)dx
    So let me try to integrate something really really simple and get two "different" answers. It will be an artificial example. How can we find an antiderivative of x(x+1)? Well, a sane human being would multiply and get x2+x and then integrate to get (1/3)x3+(1/2)x2 (+C). A crazy person (or a computer trying to follow a badly implemented algorithm) could do the following: integrate by parts. So:

    x (x+1)dx=(1/2)x(x+1)2-(1/2)(x+1)2dx=(1/2)x(x+1)2-(1/6)(x+1)3.
        udv   =   uv - vdu
     u=x        du=dx
    dv=(x+1)dx  v=(1/2)(x+1)2
    I chose to integrate by parts with fairly silly parts. It is all legal: silly but legal. Certainly one antiderivative of (x+1) is (1/2)(x+1)2 and then a valid antiderivative of that is (1/6)(x+1)3 (check them both by differentiating!).

    Therefore (1/3)x3+(1/2)x2 and (1/2)x(x+1)2-(1/6)(x+1)3 must both be antiderivatives of x(x+1). Please notice that the first answer has value 0 when x=0 and the second answer has value -1/6 when x=0, so these are distinct functions! Is there a problem? Actually, no. Here theory (if you remember MVT) says you can have infinitely many (not just 2!) distinct antiderivatives of one function, provided they differ by a constant. And, indeed, algebra shows exactly this:
    (1/2)x(x+1)2-(1/6)(x+1)3= (1/2)x(x2+2x+1)-(1/6)(x3+3x2+3x+1)= (1/2)x3+x2+(1/2)x-(1/6)x3-(1/2)x2-(1/2)x-(1/6)= (1/3)x3-(1/2)x2-(1/6)

    Huh? (and a picture)
    The two graphs are parallel to each other. To the right is a graph of both (1/3)x3+(1/2)x2 and (1/2)x(x+1)2-(1/6)(x+1)3.
    Of course this example is maybe quite silly, but if you use computer algebra systems, you've always got to remember that "different" answers can both be valid! A computer program can't always be relied on to give sensible (?) answers.

    Back to explaining sin(x)3cos(x)3dx
    To the right is a graph of the two different antiderivatives of sin(x)3cos(x)3 on the interval [0,2Pi]. I think that (1/4)sin(x)4-(1/6)sin(x)6 is in green and (1/6)cos(x)6-(1/4)cos(x)4 is in red and if you believe in pictures, you can see that these curves are parallel also: they differ by a constant. So you and a friend who algebraically work on antiderivatives of functions may well come up with superficially different answers, and both of them may be correct!
    This is weird and wonderful.

    sin(x)3cos(x)2dx
    This is easy. "Borrow" a sine, convert everything into cosines using a formula, etc. Things are easy when there is at least one odd power. But:

    sin(x)2cos(x)2dx
    Now everything is different. If I borrow, what remains can't be written very nicely in terms of the candidate substitution. A different trick is used. It converts squares of sines and cosines to first powers but it doubles the frequency. Here is what I mean:
    Look at the tools. We have
              1=(cos(x))2+(sin(x))2
    cos(2x)=(cos(x))2-(sin(x))2
    Add the equations and divide by 2. The result is (1/2)[1+cos(2x)]=cos(x)2.
    Subtract the equations and divide by 2. The result is (1/2)[1-cos(2x)]=sin(x)2.

    Let's use these equations in sin(x)2cos(x)2dx. So we get (1/2)[1-cos(2x)](1/2)[1+cos(2x)]dx. We started out with degree 2+2 and now we have degree 1+1, but the argument in the cosine is 2x, not x. Next, multiply:
    (1/2)[1-cos(2x)](1/2)[1+cos(2x)]dx= (1/4)1-cos(2x)2dx
    and I pulled out the two 1/2 multiplicative factors to get the 1/4. But now we have cos(2x)2 and what shall we do? A burst of genius (not really, but there is some inspiration!) turns (1/2)[1+cos(2x)]=cos(x)2 into (1/2)[1+cos(4x)]=cos(2x)2. (Halve the exponent and double the frequency!) So:
    (1/4)1-cos(2x)2dx= (1/4)1-(1/2)[1+cos(4x)]dx.
    I can "do" each of the pieces (although I got the constants confused in class!). The answer is (1/4)(x-(1/2)[x+(1/4)sin(4x)])+C.

    Incidentally, Maple's answer is the same as this one, except (sigh) it is written differently:

                                       3
                     -1/4 sin(x) cos(x)  + 1/8 sin(x) cos(x) + x/8
    I know it is the same since both answers have value 0 when x=0. The "constant" that separates them is therefore 0.

    Reduction formula
    Here is probably what Maple uses on powers of sine.
    Since (sin(x))ndx= (sin(x))n-1 sin(x)dx we can do this:

    (sin(x))n-1 sin(x)dx=(sin(x))n-1{-cos(x)}-(n-1)(-cos(x))(sin(x))n-2cos(x)dx
            udv          =       uv          -        vdu
         u=(sin(x))n-1         du=(n-1)(sin(x))n-2cos(x)dx
        dv=sin(x)dx            v=-cos(x)
    But the integral you get "out" is (sin(x))n-1{-sin(x)}-(n-1)(sin(x))n-2(cos(x))2dx) and since (cos(x))2 is the same as 1-(sin(x))2, you can "solve" for the original integral. This does work. I think the result is:
    (sin(x))ndx= (1/n)(sin(x))n-1{-cos(x)}+[(n-1)/n](sin(x))n-2dx
    I wouldn't use this strategy by hand for small powers of n, but it is lovely for a program to "know". You can see this reduction formula being used:
    > int(sin(x)^9,x);
               8                     6          16        4
    -1/9 sin(x)  cos(x) - 8/63 sin(x)  cos(x) - --- sin(x)  cos(x)
                                                105
    
           64        2          128
         - --- sin(x)  cos(x) - --- cos(x)
           315                  315

    Now secants and tangents
    I want to describe how to find (sec(x))A(tan(x))Bdx if A and B are non-negative integers. So I will concentrate of how to do this by hand. You need to know this for exams in Math 152. Again, if I were describing a method to be implemented by a program, I'd say other things. Here I will definitely only look at small A and B because things get very messy rapidly.

    What's needed for these functions

    Secant &
    Tangent
    Tools
     d
    --- sec(x) = sec(x)tan(x)
    dx
    (sec(x))2=(tan(x))2+1
       d
    --- tan(x) = (sec(x))2
      dx
    (tan(x))2=(sec(x))2-1

    Early examples
    (sec(x))2dx=tan(x)+C
    (tan(x))2=(sec(x))2-1 dx =tan(x)-x+C
    I hope that you see even these "low degree" examples have a bit of novelty. Even worse are the first powers!

    tan(x) dx=[sin(x)/cos(x)]dx=-(1/u)du=-ln(u)+C=-ln(cos(x))+C=ln(sec(x))+C
    where I rewrote tan(x) as sin(x) over cos(x), and then used the substitution u=cos(x) with du=-sin(x) dx and then got a log and then pushed the minus sign inside the log by taking the reciprocal of the log's contents! Horrible.
    Much worse, much much worse, is the following:

    1. Here is the beginning: sec(x) dx
    2. Multiply the top and bottom by sec(x)+tan(x), which doesn't change the value since this is "just" an extremely weird way of writing 1: sec(x){[sec(x)+tan(x)]/[sec(x)+tan(x)]}dx
    3. Rearrange algebraically a little bit: {[(sec(x))2+sec(x)tan(x)]/[sec(x)+tan(x)]}dx
    4. Notice (hah!) that the derivative of sec(x)+tan(x) is sec(x)tan(x)+(sec(x))2 and that, therefore (hah hah!) if you take u=sec(x)+tan(x) then du=[sec(x)tan(x)+(sec(x))2]dx which is exactly the top, so the integral is (1/u)du which is ln(u)+C.
    5. And now back to x's: the result is ln(sec(x)+tan(x))+C.
    So, clearly (not!) ln(sec(x)+tan(x))+C is the integral of sec(x).

    This "computation" is probably the single most irritating (because of the lack of motivation) in the whole darn course. The history (I don't have a convenient reference) of this fact is that it was discovered as a result of the construction of certain numerical tables used for ocean navigation. This fact is sort of absurd.

    QotD
    What is sin(x)3cos(x)2dx?
    Hey, isn't this an antiderivative which was called "easy" earlier? Huh. Nasty, nasty, nasty lecturer.


    Wednesday, February 6 (Lecture #5)
    For a discussion of the history of the stapler (including pictures) please see here or here. And please use a stapler when handing in assignments with several pages!

    Now we'll begin a major part of the course dealing with the symbolic (not numerical) computation of antiderivatives. The word "antiderivative" is long, and so I'll use the shorter word "integral".

    There are two major methods:

  • Substitution which is the counterpart of the Chain Rule. In first semester calculus you saw some simple uses of substitution. We will show some more sophisticated substitutions later in the course.
  • The integration counterpart of the Product Rule is called Integration by Parts which we'll introduce today. This method has some rather surprising consequences which aren't immediately clear with the first examples.
    There are also some miscellaneous algebraic tricks which help find many integrals, and we'll see them later.

    Meeting integration by parts
    The derivative of u(x)v(x) is u´(x)v(x)+u(x)v´(x). So this has to be also an integration formula. Let's see:
    (u´(x)v(x)+u(x)v´(x))dx=u(x)v(x)
    but even that looks a little bit silly. The left-hand side is also u´(x)v(x)dx+u(x)v´(x)dx. That doesn't seem neat. But here is another way of writing the same equation:
    u(x)v´(x)dx=u(x)v(x)-u´(x)v(x)dx
    where we took one of the integrals and put it "on the other side". This is the formula for Integration by Parts. The u and v letters are used by almost everyone. There is also some standard abbreviation which most people use. It's this: v´(x) is dv/dx, so v´(x)dx=dv. And du=u´(x)dx. Then the formula becomes more compact and easier to remember:
    udv=uv-vdu
    which is very telegraphic. The remainder of the lecture is a sequence of examples.

    Example #0
    exdx=ex+C. Well, that's not too illuminating. Let me try something a bit more complicated.

    Example #1
    How about xexdx. Notice, please, that integration is NOT multiplicative. While the integral of x is (1/2)x2 (yeah, yeah, +C), the integral of x2=x·x, is not {(1/2)x2}·{(1/2)x2} (the degree is wrong, the constant is wrong, and the idea is wrong!). So we need a new trick, and this new trick is Integration by Parts. I tend to think of Integration by Parts whenever I see a product of functions that somehow seem unrelated to each other, "like" x and ex. Your intuition will develop as you do more and more examples.

    Here I will take u=x and dv=exdx. I will need du, which is dx, and v, which is ex. I can do the derivative and the integral "on the fly" -- this is the first real example. Then udv=uv-vdu becomes
    xexdx=xex-exdx=(easy to finish!)xex-ex+C.

    Comments
    Before jumping forward to other examples, let me analyze this "easiest" example first.
    Comment A Is the result correct? Well, the method says that xex-ex+C is an antiderivative of xex. Should we believe this, or, better, is there a way of checking the result. Well, certainly: differentiation is almost always easier than integration (antidifferentiation). So let us d/dx the result:
    d/dx(xex-ex+C)=d/dx(xex)-d/dx(ex)+d/dx(C)=(ex+xex)-ex+0=xex.
    This shouldn't be so amazing, after all, since integration by parts and the product rule are inverses of each other. Integration by parts just arranges things well.
    Comment B This is a relatively easy example. There aren't many possibilities for the "parts". Certainly there will be more choices in other cases.
    Comment C This is my feeling about Intgration by Parts: I have udv, and then I trade it in for vdu, "paying" a penalty of uv. The idea is that the uv cost allows you to change the function you need to integrate. As soon as you select, say, u, you then have dv, and you can sometimes look forward and "see" vdu. You will be successful if that is somehow simpler or easier than the starting integral. Machines are fairly good at this, but, honestly, experienced human beings are even better!

    Example #2
    Let's do x2exdx. (I am trying to build a hierarchy of examples, moving from easy to more difficult.) Here try (although there are other choices!) u=x2 and dv=ex. Then we need du=2xdx and v=ex. I mentioned in class and I want to restate here: even when I am alone, and don't need to teach, I tend to write out all of the details, including explicit descriptions of u and dv and du and v and then the Integration by Parts formula. I have found that if I am lazy and don't do this, then disaster (errors!) occur far too often, and I just spend more time, because I need to do the computation again and again. So udv=uv-vdu becomes
    x2exdx=x2ex-2xexdx.

    What about 2xexdx? We can pull out the multiplicative constant 2 and just get 2xexdx. But we know what that integral is -- we just computed it! Therefore
    x2exdx=x2ex-2xexdx=x2ex&ndash(xex-ex+C)
    The final result would usually be written
    x2ex-xex+ex+C
    and I should make several comments about this. First, notice that even in this still relatively simple computation several minus signs occur. There will be a plethora of minus signs as we use integration by parts. The word plethora is a great SAT vocabulary work, and one meaning is "A superabundance; an excess". The minus signs are very easy to get confused about. A second thing is the apparent silliness of (+C) becoming just "+C". Everyone does that. This just means an additive constant, and its specific name doesn't matter. I think 3C and -5C etc. will all get renamed +C during this semester during antidifferentiation exercises.

    Example #3
    Let's do x3exdx. As I began to address this problem, I was aware of some unrest in class. So I abandoned the problem entirely, and decide instead to do

    Example #n
    Suppose n is a positive integer. What can we say about xnexdx? Well, if u=xn and v=exdx, then du=nxn-1dx and v=ex. And udv=uv-vdu becomes
    xnexdx=xnex-nxn-1exdx.
    No, I have not told you a formula for the antiderivative, but what I have done is explore the whole collection of integrals, and I hope that I have convince you that I could compute any specific "instantiation" of this collection (so I could find an antiderivative of x5ex or even x123ex).

    This sort of setup is called a reduction formula. In its simplest manifestation, there are a sequence of integrals, and the reduction formula shows how to work your way down the sequence. Properly speaking, you ought to also know how to do the lowest member of the sequence, which we do: that would be xexdx or exdx, both of which we know how to do.

    Example #7
    Let's try arctan(x)dx. If you are new at this game, this integral is quite puzzling. Hey: this is the Integration by Parts lecture, so we should compute this integral using integration by parts. So the integrand, what's inside the integral sign, must be udv. What? Well, there are not many choices. In fact, I can only see one choice, and maybe it won't be too good: u=arctan(x). Then dv=dx, so that v=x. And du=[1/{1+x2}]dx (you must know the basic facts totally well, or won't be able to get started!). So udv=uv-vdu becomes
    arctan(x)dx=arctan(x)·x- x[1/{1+x2}]dx.
    This example is slightly more realistic. We now need to compute [x/{1+x2}]dx so the integral we get in exchange for the original one is not at all "clear".

    What is [x/{1+x2}]dx? Actually, this can be computed with a fairly straightforward substitution. I will use w for the substitution variable since u is used almost always in the Integration by Parts formula. Well, if w=1+x2 (the worst part of the integrand!) then dw=2x dx. We don't have 2x dx, but we do have x dx. So (1/2)dw=x dx, so that:
    [x/{1+x2}]dx=(1/2)[1/w]dw=(1/2)ln(w)+C
    You must learn to be totally sure about simple antiderivatives, such as the very last step. Now substitute back to get (1/2)ln(1+x2)+C. The final result is
    arctan(x)dx=arctan(x)·x((1/2)ln(1+x2)+C)
    so that the antiderivative of arctan(x) is actually x·arctan(x)-(1/2)ln(1+x2)+C.

    Example #8
    I tried a definite integral, just to change pace a bit. What is 01x·sqrt(1-x)dx? First I'll get an antiderivative.

    So we need x·sqrt(1-x)dx. I don't think that choosing a "successful" u and dv pair is totally clear here. If u=sqrt(1-x), then dv=xdx, so v=(1/2)x2, and (I can do this!) du would be some stuff like -(1/2)(1-x)-1/2. The vdu we would get looks worse or more complicated than the original. So I don't like this choice. What if we try u=x and dv=sqrt(1-x)dx? Well, du=dx. If dv=sqrt(1-x)dx, then I need to make an auxiliary computation:
    sqrt(1-x)=(1-x)1/2, and (1-x)1/2dx=-w1/2dw (if 1-x=w, so -dx=dw and dx=-dw). Now w1/2dw=(2/3)w3/2 (yeah, yeah, +C). So (don't forget the minus sign!) (1-x)1/2dx=-(3/2)(1-x)3/2. Wow.
    Therefore v=-(3/2)(1-x)3/2. Then udv=uv-vdu becomes
    x·sqrt(1-x)dx=-x(2/3)(1-x)3/2+(2/3)(1-x)3/2dx.
    The last integral, (2/3)(1-x)3/2dx, we can do with the substitution w=1-x. The answer will be -(2/3)(2/5)(1-x)5/2. Now put things back together. Here is the final result.

    x·sqrt(1-x)dx=-(2/3)x·(1-x)3/2(4/15)(1-x)5/2+C.
    I wouldn't want to check the answer by differentiating! What a mess. And I made the minus sign larger, because that error is embarrassingly easy to make: it is three minus signs concatenated, and I have fouled up such signs too many times myself.

    We wanted a definite integral. The antiderivative is so confusing that I wanted to be able to check the answer. What should the answer "look like"? Here is a bunch of pictures. If you think through them, I hope you will see that the answer should be a positive number, certainly less than 1. (The bump is not symmetric, since sqrt is steeper than x, certainly.)


    The definite integral
    01x·sqrt(1-x)dx=-(2/3)x·(1-x)3/2(4/15)(1-x)5/2|01=0(from x=1)-(-4/15)(from x=0)=4/15.
    There are many opportunities for sign errors in this computation.

    I'll use this background color for material I didn't have time to do in class.
    Another way
    Suppose we want x·sqrt(1-x)dx. Hey: just directly try the substitution w=1-x. Then dw=-dx, and, since w=1-x, solve for x to get x=1-w. The integral changes: x·sqrt(1-x)dx=(1-w)·sqrt(w)(-dw)=-w1/2-w3/2dw=-((2/3)w3/2-(2/5)w5/2)+C=-((2/3)(1-x)3/2-(2/5)(1-x)5/2)+C.

    The two antiderivatives we got are here:
    -(2/3)x·(1-x)3/2(4/15)(1-x)5/2 and -((2/3)(1-x)3/2-(2/5)(1-x)5/2)
    I think these are the same functions, but the algebra needed is irritating. I can do it with calculus, though, in a second. Both of these are antiderivatives of the same function. They must differ by a constant (+C). If we plug in x=1, both of them are 0. So the +C is 0, and they are the same!

    By the way, here is what Maple tells me:

    > int(x*(1-x)^(1/2),x);
                                                    3/2
                                 2 (2 + 3 x) (1 - x)
                               - ----------------------
                                           15
    Funny, huh (again, the same function, but written differently again!).

    Example #9
    Look at sin(ln(x))dx. The integrand here is an absurd function. It is NOT a product, but a composition (read carefully!). It really does occur in applications (really real applications). You'll see it again when you study certain kinds of differential equations. Since this is the Integration by Parts lecture, we should compute using Integration by Parts (startling). Again, not many choices, so take u=sin(ln(x)) and dv=dx, so v=x and du=cos(ln(x))(1/x)dx (use the Chain Rule correctly) and udv=uv-vdu becomes
    sin(ln(x))dx=sin(ln(x))·x-x·cos(ln(x))(1/x)dx=sin(ln(x))·x-cos(ln(x))dx
    because the x and 1/x cancel. We don't seem to have made any progress, but in fact, be courageous.

    Do Integration by Parts again, this time for cos(ln(x))dx, with u=cos(ln(x)) and dv=dx. Then du=-sin(ln(x))(1/x) and v=x, so udv=uv-vdu becomes (be careful!)
    cos(ln(x))dx=cos(ln(x))·x-x·[-sin(ln(x))(1/x)]dx=cos(ln(x))·x+sin(ln(x))dx

    Suppose we push the formulas together carefully.

    sin(ln(x))dx=sin(ln(x))·x-cos(ln(x))dx= sin(ln(x))·x(cos(ln(x))·x+sin(ln(x))dx)

    This is so very very very tricky. The original integral appears on the other side with an opposite sign!

    sin(ln(x))dx=sin(ln(x))·x(cos(ln(x))·x+sin(ln(x))dx)= sin(ln(x))·x-cos(ln(x))·x-sin(ln(x))dx

    Therefore we can solve for the original integral by taking the minus indefinite integral to the other side and dividing by 2. Here is the result:
    sin(ln(x))dx=(1/2)[sin(ln(x))·x-cos(ln(x))·x]+C.
    Check the result if you like by differentiating. This is a ludicrous and wonderful example.

    QotD
    Find arcsin(x)dx. Remember that the derivative of the arcsine function is 1/sqrt(1-x2).
    Many people made errors here. There was confusion of signs and powers and multiplication. Please do it again even if you think you did it correctly!


    Monday, February 4 (Lecture #4)
    Intuition<-->Computation
    The workshop problem whose writeup is due Thursday is interesting and illustrated the dual nature of the math you're learning. We want you to be able to COMPUTE things. But we also want you to develop your INTUITION. You will almost surely make mistakes computing, and your "intuition" (which is not innate or genetic, but rather a response to patterns you will see in problems you solve) will have you recompute something. And also as you do more and more problems, you will further develop your intuition and it will guide you in doing faster and more accurate computations. In this problem, you need to compute everything and show the work and the answers. Then you may choose to explain what the answers say, using your intuition. This is difficult.

    Definite integrals
    These topics are covered in the first chapters of the text:

  • Chapter 6: Area, Volume, Density, Average Value, Work, Energy
  • Chapter 8: Fluid Pressure, Arc Length, Surface Area, Center of Mass
    We have discussed a few of them and we will discuss a few more (but not all). The text shows that computing these quantities all involve evaluating definite integrals. There are many topics covered later in the text (and in many other courses and situations) which also result in definite integrals. The next few weeks of the course are an introduction to some of the methods that people expect you to know when you are confronted (?) with an integral. There's lots more, but this is the basic stuff.

    What to do? Some alternatives ...
    So someone comes up to you on the street and says, "What's ab f(x)dx?" Here if you're lucky the integrand, f(x), is some easily recognized function. There are a bunch of algebraic tricks which may be helpful, and we will begin to study them next time. But if this is the real world, maybe all you need to know is some numerical approximation to the value of the integral.

    Numerical computation
    Scientific and technical computation is present everywhere. The algebraic tricks we'll see don't always work and sometimes all you can do is get an approximate value. I mentioned in class that computer processers and memories have been growing very quickly over the last 40 years, but that studies made of standard engineering problems requiring lots of computation show that the speedups which have come about result equally from faster processors and advances in the computational algorithms. You should know something abou the algorithms. Yeah, much of the time you will (as I do!) just essentially "push a button" to get an approximate value. But some of the time, perhaps when you least want to worry about it, your method of choice may not work too well. So you should have some background knowledge. That's what we will do today.

    The very beginning ...
    I'll show you three methods of approximating definite integrals. The first is one you sort of know already, but I want to discuss it more quantitatively. The second and third methods are quite practical, and if you wanted to, you could actually compute fairly well with them. Programming them is not too hard. I will admit, though, that what I show you today is actually not what is used in, say, most hand-held devices (such as graphing calculators). Somewhat more elaborate (sophisticated?) methods are used there.

    I'm going to try to use the notation in the text. So we'll investigate the definite integral of f over the interval [a,b]. For all three methods, we will chop up the interval into equal subintervals, say N subintervals (you're supposed to think that N will be large). Since the length of the whole interval is b-a, the length of each subinterval will be (b-a)/N. We will call this
    x.
    There are N subintervals. The function, f(x), will have N+1 values at all of the endpoints of all of the subintervals. (There's one more f value then there are subintervals.) The function values will be labeled y0, y1, y2, .... up to yN. The y-value before the last one will be yN-1. And, if you desperately wanted to know it, y2, for example, is f(a+2x)=f(a+2(b-a)/N).

    Level 0: Riemann sums, the definition
    Just approximate each piece by a rectangle. This is just the Riemann sum, which appeared in the definition of definite integrals. The side that's used doesn't matter very much, but to be specific here I'll choose the left-hand endpoint and evaluate f there, and then multiply it by the length of the subinterval.

    Error estimate
    What turns out to be important in this business is, first, how much work is the computation, and second, what sort of error estimate is valid. Let me copy what I did in class. I looked at an interval from 0 to small, so you should think of this as a very narrow interval (yeah, but the picture ...).
    The true value of the integral is 0smallf(x)dx. The rectangle approximating is has height f(0), the value on the left-hand endpoint, multiplied by the width of the subinterval, small. This is f(0)·small. But notice that this is also an integral: 0smallf(0)dx (there is no x in this integrand!). So here is the error:
    0smallf(x)dx-0smallf(0)dx
    We are integrating over the same interval so this is the same as
    0small(f(x)-f(0))dx.
    The integrand is f(x)-f(0). One of the two results I said you had to know from the first semester was MVT, the Mean Value Theorem. I will use it here, and so f(x)-f(0)=f´(!!!)x. I don't much care (and I actually don't know much about) where !!! is. In fact, let me just assume that somehow I know some estimate for the largest value of the first derivative of f: I will call this, just as the textbook does, K1. Then
    |0small(f(x)-f(0))dx|<=0smallK1x dx.
    I can actually compute the integral of x, and the result is that the error is at most K1[small2/2].

    This is the error in one piece of the rectangular approximation. But there are N pieces, and we can't assume that the errors cancel: in general, they won't, and if you're using this for real, you'd better assume the worst. So we need to multiply by N, and the total error is at most N· K1[small2/2]. Things don't look too good, since N is large, but then several students observed that small is actually (b-a)/N so there are two N's "downstairs". One will cancel but this is the result.

    Level 0
    We approximate by (x)y0+(x)y1+(x)y2+...+(x)yN-1 (we only go up to N-1, we don't use the last height on f because this is the left-hand endpoint rectangles!). We can factor, and the result is:

    Formula (x)(y0+y1+y2+...+yN-1)
    Error Less than K1(b-a)2/N where K1 is some overestimate of |f´(x)| on all of [a,b].

    The next trick, straight lines
    Let's put y=f(x) on the interval [0,1] so computations will be easier. A likely better approximation would be to use a straight line, maybe tilted, something like A+Bx. Here A and B will be selected so that the values at 0 and 1 will agree with f(x). So the integral is easy:
    01A+Bx dx=Ax+(B/2)x2|01=A+B/2.

    We know that f(0) should be A+Bx at 0, which is A, and f(1) should be A+Bx at 1, which is A+B. In applications we'll be given f(0) and f(1), and we will need to compute A+B/2. What should we do? Well, notice (?) that
    Value at 0+value at 1=A+(A+B)=2A+B, and this is twice what we want, A+B/2.
    Therefore we should just approximate the definite integral by [f(0)+f(1)]/2. Another way to see this is just to notice that the figure I've drawn is four-sided (a quadrilateral) with two of the sides parallel: this is a trapezoid (which also names the method!) and the formula comes from the formula for the area of a trapezoid.

    Putting it together
    The picture attempts to illustrate what happens when a bunch of trapezoids is used. Due to the scale of the picture and the thickness of the lines, it is hard to see the error, but it is there. The error is there because the graph is not made of line segments: it curves (in fact, it curves, and somehow the amount the graph changes from being a line is measured by the second derivative, which magically appears below).

    What does the trapezoid formula look like? Here:
    [(x)/2](y0+y1)+[(x)/2](y1+y2)+[(x)/2](y2+y3)+...+[(x)/2](yN-1+yN)
    If you notice, this can be reorganized a bit.

    Trapezoid Rule
    Here is the reorganized formula, and an error estimate (getting this error estimate is not as easy as the one before). The formula is called the Trapezoid Rule.

    Formula [(x)/2](y0+2y1+2y2+...+2yN-1+yN)
    Error Less than K2(b-a)3/(12N2) where K2 is some overestimate of |f´´(x)| on all of [a,b].

    Here what is important is the N2 on the bottom, since that gets larger much faster than N alone.

    Ha: use three sample points, and parabolas!
    Back to y=f(x) on [0,1], and let's use A+Bx+Cx2 where A and B and C are selected so that at 0 and 1/2 and 1 the values will be f(0), f(1/2), and f(1). Because parabolas curve and maybe most functions have graphs that curve also, we might hope that the integral of the parabola is closer to the true value of the integral of the function. Now
    01A+Bx+Cx2dx=Ax+(B/2)x2+(C/3)x3|01=A+B/2+C/3.

    Well, f(0) is A and f(1/2) is A+(B/2)+(C/4) and f(1) is A+B+C. Now one needs some inspiration in order to write A+B/2+C/3 in terms of those three quantities. Well, here is the inspiration. Suppose you take 4 times the value at 1/2: that's 4A+2B+C. Add on the values at 0 and at 1. The result is A+(4A+2B+C)+(A+B+C)=6A+3B+2C. (There are other ways of guessing, ways which are more systematic, and allow generalization, but I don't have time to show them to you: I am sorry.) Now 6A+3B+2C happens to be 6 times the integral, so we should divide f(0)+4f(1/2)+f(1) by 6. Sigh.

    Simpson's Rule
    I want to lift the formula from the [0,1] case and use it in general. Let's "transport" the parabola setup to the more general picture, piecewise. So what do we need? First, we need to assume that N is even. O.k.: fine. But the width of the subinterval is x, and this corresponds to ... what? In the interval case, this corresponds to 1/2. So we should just divide by 3 here. So this is what happens in the first few pairs of intervals:
    1y0+4y1+1y2 gets multiplied by (x)/3.
    1y2+4y3+1y4 gets multiplied by (x)/3.
    1y4+4y5+1y6 gets multiplied by (x)/3.
    ·  ·  ·
    1yN-2+4yN-1+1yN gets multiplied by (x)/3.

    If you observe the "structure" of the formula, you can see what happens. So this is Simpson's Rule:

    Formula [(x)/3](1y0+4y1+2y2+4y3+2y4+...2yN-2+4yN-1+1yN-1)
    Error Less than K4(b-a)5/(180N4) where K4 is some overestimate of |f4(x)| on all of [a,b].

    The implementation of Simpson's Rule is not much more work than the Trapezoid Rule of the "Rectangular Rule": just keep a running total of the odd and even heights inside the interval, multiply the odd final total by 4 and the even final total by 2, add on the end heights, and finish by multipling by a third of the interval length. Seriously, that's not too much work.

    What happened to the error?
    The fantastic thing is that the error is not some number divided by the fourth power of N. That's unexpected. I have gone through a direct proof of the error formula. It is not pleasant, but it can be done (there are some very clever proofs -- I only went through an "elementary" proof). What is amazing is that there's an N4 and not a cubic power. Why? Well, accidentally (more or less!) the Simpson's Rule formula is valid for x3: we're just lucky. What do I mean? Well, 01x3dx=1/4, certainly (since x3dx=[x4/4]+C). And the idea was that we should compute f(0)+4f(1/2)+f(1) divided by 6. Well, if f(x)=x3, then f(0)=0, f(1/2)=1/8 and f(1)=1. So f(0)+4f(1/2)+f(1)=0+4(1/8)+1=3/2. When we divide that by 6 we get (3/2)/6=1/4: the correct answer! So we gain another power of accuracy, and the error formula is even smaller.

    Some numerical evidence
    I computed (well, a machine did, at my direction!) approximations to two examples and wrote the results on the board. One was 12[1/x]dx=ln(x)]12=ln(2)=ln(1)=ln(2)-0=ln(2), which I "know". The other is 01[4/{1+x2}]dx=4 arctan(x)]01=4 arctan(1)-4 arctan(0)=4(Pi/4)-4(0)=Pi.Here are the results, with the three different rules and with a varying number of pieces in the partition.

    12(1/x) dx, approximately 0.6931471806
    n=Left Hand RuleTrapezoid RuleSimpson's Rule
    10  
    100  
    1,000  
    10,000  
    100,000  
    0.7187714032
    0.6956534302
    0.6933972431
    0.6931721811
    0.6931496806
    0.6937714035
    0.6931534305
    0.6931472430
    0.6931471810
     
    0.6931473748
    0.6931471808
    0.6931471803
     
     
    01(4/{1+x2) dx, approximately 3.141592654 (Pi)
    n=Left Hand RuleTrapezoid RuleSimpson's Rule
    10  
    100  
    1,000  
    10,000  
    100,000  
    3.239925989
    3.151575986
    3.142592487
    3.141692652
    3.141602654
    3.139925989
    3.141575988
    3.142592487
    3.141592652
     
    3.141592652
    3.141592653
     
     
     

    Things to think about
    Although in theory any one of these computational schemes can give you any accuracy desired, in practice there are other considerations. First, you can worry about the amount of computational time. Function evaluations take time on real machines. The lowest row (n=100,000) took about half a minute. Second, numbers are represented on real machines using floating point techniques, and arithmetic using floating point numbers passes along and increases errors, so reducing the number of divisions, multiplications, etc. is definitely a good idea. For both of these reasons, and some others, the table should convince you that the Trapezoid Rule and, especially, Simpson's Rule, are worthwhile. They require almost the same amount of computation, just a little more bookkeeping. But the n2 and especially the n4 "downstairs" in the error estimates make these Rules worthwhile.

    QotD
    TimeRate, in gal/hr
    1:0050
    2:0070
    3:0035
    4:0060
    5:0040
    I gave some data ("flow rates" measured at various times) shown in the table to the right. Of course this had to be for toxic waste or something like that. Sigh.

    If you've gotta have the numbers (?) I think they are 215 and 210 and 226.6666...


    Wednesday, January 30 (Lecture #3)
    Now rotate around the y-axis
    Suppose we take the region bounded by the y-axis, y=x2+4, and y=x3, which we analyzed last time, and try to rotate it around the y-axis.

    We can switch the roles of x and y, and try to do the problem using the method we had last time. So we will take the Sum of dy slices, from Bottom (y=0) to Top (y=8). Each slice will have approximate volume dy (the height) multiplied by the cross-sectional area. Now we have problems. What is the cross-sectional area?

    When y goes from 0 to 4, the cross-sectional area is just the area of a circle. O.k., and the circle's radius is "x" when the point (x,y) is on the profile curve for the right boundary. The right boundary is given by y=x3, and since we are integrating with respect to y, the controlling variable is y, and we should write everything (such as x!) in terms of y. Well, if y=x3, then x=y1/3, and the cross-sectional area is Pi(y1/3)2=Piy2/3. But this is only valid for y's between 0 and 4.

    When y is between 4 and 8, the cross-sectional area changes dramatically. It is an annular region, a region between two circles with the same centers. Looking at the picture, I hope that you can see there's an inner radius resulting from the curve y=x2+4, and an outer radius, coming from y=x3. Well, the thickness is still dy, and a little piece dV of the volume will be Pi(rout2-rin2)dy. We need to write the two r's in terms of y. And each of them is a horizontal measurement, so they are x's. Well, for rout we get y1/3 as in the previous paragraph. For rin we need to solve y=x2+4 for x. This is not too hard, so x2=y-4, and this seems to have two roots. But in this case the picture advises us that the x we want is certainly the positive root. So rin=sqrt(y-4). The cross-sectional area when y is between 4 and 8 is Pi((y1/3)2-(sqrt(y-4))2)= Pi(y2/3-(y-4)).

    To compute the total volume we will need two definite integrals because the formulas for the cross-sectional areas are given piecewise. So here it is: 04Pi y2/3dy+48Pi(y2/3-(y-4))dy.
    Comments Certainly we can complete this computation. But I hope that you can also see that generally there might be serious difficulties with this approach. We might need to break the interval of integration up in several pieces, and "solving" for x might be very difficult.

    Another way to find volumes
    We can find the volume when the region is rotated around the y-axis using a different technique, the method of thin shells. Chop the region up using vertical lines, and let's see what happens when we take a thin rectangle which is dx wide and rotate it around the y-axis.
    I think what's created looks more like a thin ribbon, but this is classically called a thin shell, so that's what we should call it. The ribbon has a height and a radius and a very tiny thickness, dx. When its rotated around, the circumference of the circle produced is 2PiRadius. If we "cut" the shell and unroll it, we get approximately a rectangular solid which has measurements 2PiRadius and Height and dx. The volume should be, therefore, 2PiRadius·Height dx.

    The computation
    Thje controlling variable is x, and we need to write everything in terms of x. Well, the Radius itself is just x (the distance to the y-axis is x: this confuses me sometimes but maybe you see it clearly). The Height is the difference between the top curve and the bottom curve, so it is (x2+4-x3). We need to add up (o.k., one last time: Sum) the slices from left (x=0) to right (x=2). The result is
    022Pi(x)(x2+4-x3)dx=2Pi02(x3+4x-x4)dx=2Pi([x4/4]+2x2-[x5/5]|02=2Pi(4+8-[32/5]).
    You can check that the other method gives the same result (I actually did, and it does).

    Difficulties/opportunities
    The more different ways you know to do a computation, the better off you will be strategically. Some problems may yield to one method, and be horribly recalcitrant with another. So please learn different tricks.

    Problem from the textbook
    Here is problem 48 (must be very difficult!) from section 6.4.

    Use the Shell or Disk Method (whichever is easier) to compute the volume of the solid obtained by rotating the region shown (y=x-x12) about
    (a) the x-axis (b) the y-axis.

    Let's solve (a): we do it dx and get
    LeftRightPi(Radius)2dx=x=0x=1Pi(x-x12)2dx=Pi01x2-2x13+x24dx=Pi([x3/3]-2[x14/14]+[x25/25])|01=Pi([1/3]-[2/14]+[1/25]).

    Now for (b). If I wanted to do this dy, I would need to solve y=x-x12 for x. I don't know a formula for this, and NO ONE ELSE IN THE WORLD DOES. This would not be a feasible method. But dx things are easy (thin shells). Here we go:
    LeftRight2Pi(Radius)(Height)dx=012Pi(x)(x-x12)dx=2Pi01(x2-x13)dx=2Pi([x3/3]-[x14/14]|01=2pi([1/3]-[1/14]).

    Hooke's Law
    I began my discussion of work with a demonstration of Hooke's Law, using specially obtained titanium (?) wire hangers and specially obtained elasticium (?) bands. Maybe now I can take a $10,000 tax deduction (doubtful). But I don't have time to write up the problems in the order they were done.

    I am desperately trying to catch up in writing this diary, so I am using some of the pictures and examples from last year. I am sorry. I will try to do better in the future. How can I get behind when we're only 10 days into the course? My apologies.

    Work
    which is physics which is something I know little about. I have been told that Work=Force·Distance. Also I have been told that units matter, and the most generally used units for Distance, Force, and Work are meters, newtons, and joules. I will use as my units feet, pounds, and foot-pounds. Sigh. So lifting 10 pounds for 5 feet does 50 foot-pounds of work. Huh. The only thing wrong is that the abbreviation for pound is lb.

    Pulling a chain up a cliff
    I have an iron chain which weighs 3 pounds per foot and is 100 feet long. It hangs from the edge of a tall cliff. How much work is required to pull the chain to the top of the cliff?

    Here's a picture of the chain. (Drawing the pictures is the fun part for me.) We can imagine the chain's length being broken up into tiny pieces, and then we would need to lift the pieces up the cliff. Let's see: suppose we have a piece which is x feet from the top of the cliff, and a tiny piece of length dx is imagined there. Then the weight of that tiny piece is 3 dx (the 3 above is actually a sort of linear density). To lift just that piece to the top of the cliff needs x·3 dx amount of work. But the whole chain is made up of these pieces, and so we need to add up this amount of work, and (due to the way I set this up) we should take the integral from the top (x=0) to the bottom (x=100) of the chain. This will get the total work:
    01003x dx=(3/2)x2|0100=(3/2)(100)2.

    Springs
    Many real world springs obey Hooke's Law over "a portion of their elastic range". This means that the distortion of the spring from its equilibrium length is in a direction opposite to the impressed force and has length directly proportional to the force. This is, more or less, "F=kx", where F is the force and x is the distortion from equilibrium and k is a constant, frequently called the spring constant. So twice the weight on a spring will distort it twice as much, but you probably should not assume the same for, say, ten thousand times as much weight. Here's a typical Hooke's law/work problem.

    Pulling a spring
    In equilibrium a spring is 2 feet long. A weight of 10 pounds stretches it to 2.5 feet. How much work is needed to stretch the spring from 3 feet long to 5 feet long?

    Since 10 pounds changes the length of a spring by .5 feet, we know that 10=k(.5) so that the spring constant, k, must be 20. Now consider the various stages of the spring as it goes from the start position (when the length is 3 and the distortion of 1) to the end position (when the length is 5 and the distortion is 3). I'll call the distortion, x. Perhaps we could consider an intermediate position. If we pull the spring just a little bit more (change the length from x to x+dx) we won't change the force very much. The force needed in that intermediate position is 20x. The additional distance we're stretching the spring is dx, so the "piece of work" we're doing is 20x dx. To get the total work we need to add up the pieces of work from 3 feet long (when x=1) to 5 feet long (when x=3).
    1320x dx=10x2|13=10(32)-10(12).
    Caution When I do these problems, an easy mistake to make is to confuse the spring length with the distortion from equilibrium. Hooke's law applies to the distortion, so that is what must be considered.

    Emptying a pool
    A pool has a rectangular top, 10 feet by 30 feet. The pool is 1 foot deep at one of the edges which is 10 feet long, and is 8 feet deep at the other edge which is 10 feet long. The depth varies linearly between these edges. The pool is filled with water but the top of the water level is 1 foot below the top of the pool. How much work is needed to pump out the water in the pool (that is, to the top of the pool?).

    An oblique view of the pool is shown to the right. I hope that this picture corresponds to what your view of the description in words above. We need to raise the water to the top of the pool. To do this, we need some information about the force needed (the weight of the water).

    The density of water is about 62.5 pounds per cubic foot. Generally, of course, stuff near the bottom compresses, but it turns out that water has rather low compressibility and we can accept the 62.5 as valid for all of the water in the pool.

    Although the lovely picture above pleases me (artistically!), a more reasonable view might be sideways. I will put the origin of a coordinate system for depth at the bottom of the pool (certainly there may be one or two other reasonable places to put it). Then I will look at a typical intermediate slice of the water volume at height x from the bottom of the pool. The slice will have thickness dx. The reason to look at this is that all of the water in that slice will need to be lifted the same distance to the top of the pool. So this method of organizing the computation allows me to put the distance into one part of the problem, and then concentrate on the force (the weight of the slice) in another part of the problem. But now we need to think about the volume of the slice. It is dx thick, and I hope you can see that the cross-section of the slice is a rectangle. It goes entirely across the 10 foot width of the pool, and what varies in the slice is the length, which I labeled L in the diagram. Similar triangles tell me that L/x=30/7 so that L=(30/7)x. The volume of a slice is (10)(30/7)x dx, so that the weight of a slice is (62.5)(10)(30/7)x dx. This slice needs to be lifted to the top of the pool (not just the top of the water!) and this distance is 1+(7-x)=8-x (I wrote it this way to emphasize that 7-x is the distance to the top of the water, and 1 more foot to get to the top of the pool). So the amount of work needed is (8-x)(62.5)(10)(30/7)x dx. To get the total work I need to add up the work from the bottom of the water (x=0) to the top of the water (x=7):
    07(8-x)(62.5)(10)(30/7)x dx=(62.5)(10)(30/7)078x-x2dx=(62.5)(10)(30/7) (4x2-x3/3)|07=(62.5)(10)(30/7)(4(72)-73/3).

    Some comments on solutions of the work problems
    The methods of solution are reasonable and the selection of problems that I showed you was carefully structured.


    Monday, January 28 (Lecture #2)
    I mentioned some things to do which might increase student success in this course:
    Attend class.  Do the homework problems.  Read the textbook.  Ask questions in class, office hours, via e-mail ....

    As I mentioned, none of these have been shown to be as well-correlated with success as this one: forming study groups with other students. Please form groups to study this course. PLEASE!.
    This page has been created to help you.

    Diary entry in progress!

    The volume of a right circular cone

    The volume of a sphere

    The volume of a strange object
    y=x2+4 and y=x3 and the y-axis.

    Or an even stranger one

    The volume of a torus

    How to understand this result









    Wednesday, January 23 (Lecture #1)
    An information sheet was distributed, so the students are now known.

    What do you need to know?
    Math 152 is the second semester of the three semester calculus sequence which is given for students who really need to know calculus (or who are pretty darn curious!). In many respects it is the most technical, most computational of the three semesters. I personally think it has many fewer big ideas and lots of computational tricks. What do you need to know to begin this course appropriately?

    1. You need to know quite a bit about specific functions. For example, you should be able to complete the following chart with not much effort.

      FunctionDomain & rangeGraph
      {in|de}creasing, concavity, asymptotics
      DerivativeIntegral
      (antiderivative)
      Powers of x

      x2, x3, sqrt(x), x1/3, 1/x, etc.
      YES!!!   
      exp(x)=ex you  
      ln(x)  should 
      sin(x)fill   
      cos(x) in box
      tan(x)  every 
      arctan(x)ofthis chart 
      arcsin(x)
      correctly!!!
        

    2. The most important results to remember from earlier calculus are the Fundamental Theorem of Calculus (FTC) and the Mean Value Theorem (MVT). By FTC I mean a bunch of ideas, something like:
      • The definite integral is defined to be a limit of a sum, and the sum is gotten in the following strange way: slice up the domain interval into many subintervals; multiply function values in each subinterval by the length of that subinterval; add up the products. Amazingly, that process converges to a specific number as the largest length of the subintervals gets shorter. The specific limiting value is the definite integral.
      • One way to compute the definite integral is to find an antiderivative of the integrand (the function whose values you're looking at), and then taking the difference of that function's values.
      • The definite integral itself, when considered with a variable upper bound, has derivative equal to the integrand function.
      MVT is a slightly more slippery idea, because it is presented as a fact about secant lines and tangent lines (the average value [difference of the function values at the endpoints divided by the length of the interval] is equal to at least one instantaneous rate of change [derivative] in the interval). In fact, the way MVT is used computationally is as part of an equation, so f(a+h)=f(a)+f´(c)h etc.. We will need to relearn MVT later this semester.

    We also may sometimes need secant and even (sigh!) arcsec. Some poor engineering and physics majors may need to learn about the hyperbolic functions, so I will describe them later this semester.

    What this course is about
    Math 152 is quite technical. The principle excuse for the technicality is that if you will have a career in science or engineering, the methods of the course are part of the assumed background of everyone. The course asks students to do some hand computation which can be very elaborate. In most workplaces, this computation will likely be strongly assisted by Maple or Mathematica or Matlab. (I use Maple myself but the others have similar qualities.) The excuse for having students learn to compute by hand is that they should then have some feeling for what strategies are useful and for what the "shape" of the answers is like.

    More precisely (about as precise as I can be at this stage) here is what the course is about:

    Part 1: the uses of the definite integral
    Definite integrals are used to compute lots and lots of quantities: areas, volumes, masses, moments, pressures, ... hundreds of other things you will learn about. A friend of mine wrote in a recently published book that "This method of finding areas is paradigmatic for an entire class of problems in which one is multiplying two quantities such as

    where the value of the first quantity can vary as the second quantity increases." He is a great scholar, and uses words precisely. The word "paradigm" means "an example or pattern." The definite integral can be used to compute or approximate many quantities (many more than are in the list just given). That's the real power of calculus. Very few of you will compute many areas professionally (or, actually, any areas professionally!). But I am fairly sure that almost all of you will need to investigate and compute many definite integrals. So initially we will consider some simple uses of definite integrals.

    Part 2: computing definite integrals
    Once you have the creature (a definite integral), what is it? 38.5? Pi/sqrt(2)? We need some methods.

    Part 3: how to approximate functions
    Many functions are used to model physical situations. They can be very complicated. A result called Taylor's Theorem can be used to approximate these intricate and weird (!!) functions. Taylor's Theorem is a generalization of MVT, and it shows how to approximate functions by polynomials. Polynomials are easy to compute. The type of approximation leads rapidly to a new way of describing functions, using what are called infinite series, especially a specific type of these called power series. These descriptions, which again have lots of intricate algbra involved, will be studied for a big chunk of the semester.

    That's the plan of the course. There are a few minor additional topics, but please take a look at the syllabus. It will give you a good idea of where we are headed.

    How do we teach it?
    There are two lectures each week. The lecturer is correct 72.6% of the time, and needs students to point out the almost inevitable exxors. The diary may help. There is an additional meeting each week. Most of those meetings will have most of their time devoted to workshops. Small groups of students will investigate calculus problems. One of these problems will later be designated for a writeup. Attendance will be taken at every meeting of the course, and quizzes may or may not be given without further announcement.

    Let's begin
    We will compute the area in the plane enclosed by y=x3 and the line segment which joins (0,0) and (2,8). The region is shown to the right. The points (0,0) and (2,8) are on y=x3, and the region is bounded by the line y=4x and the cubic curve. (This is not supposed to be difficult to see!).

    First method
    We slice the area by lines parallel to the y-axis. I think of the lines as dx apart. The region is chopped up into things which are almost rectangles, and the area of each piece is going to be HEIGHT·dx. We will get a good approximation to the total area by taking the Sum of the areas of these almost rectangular pieces. Of course what I mean by "Sum" is a definite integral, because that includes a limiting process which makes increases the accuracy of the approximations. So in this setup, we will have LeftRightHeight dx. We add up the slices from the left to the right of the region. Here we have slices which are dx thick, and we should try to write everything in terms of x. Let's see: the Left and Right are easy enough, because the left-most point of the region occurs when x=0, and the right-most point of the region occurs when x=2. What about the height of the rectangularish (that's a word?) slice? Well, the height will be the difference between the top measurement, that is, the curve which forms the boundary of the region with larger y values, and the bottom, the curve which forms the boundary of the region with lower y values. This is a rather simple region, and it isn't too difficult (I hope!) to see that Top(x)=4x and Bottom(x)=x3. In more complicated cases, the curves can cross, and to compute the area we may need to break up the definite integral so cancellation doesn't occur (if you don't know what I mean, please reread section 6.1, and learn again that the definite integral computes the net signed area). Please remember also that the Height will always be gifven by Top(x)-Bottom(x): this formula is valid no matter what the signs of the functions are, as long as Top(x) is geometrically higher than Bottom(x) (well, of course, since then Top(x)>Bottom(x)).

    O.k., now we have x=0x=2(4x-x3)dx. This definite integral is sufficiently simple that it can be computed directly using FTC. We "guess" an antiderivative, and here's the computation:
    02(4x-x3)dx=2x2-x4/4|02=(2(22)-24/4)-0=8-4=4.

    And again
    Let's compute the area of the region in the plane enclosed by y=x3 and the line segment which joints (0,0) and (2,8). Huh? Yeah, well, I want to do it again, but I want to do it a different way. The more techniques you have available, the more likely you will be able to analyze a model successfully or complete a computation, even if your favorite method fails. In this case, I want to "dissect" or take apart the region dy.

    Draw many horizontal lines in the region, and space the horizontal lines dy apart. The region is broken up into pieces, each of which is sort of a rectangle. The rectangle has some Width and a height of dy, so its area is just about Width·dy. Again we will Sum these strips, now from the bottom (the smallest value of y) to the top, the largest value of y. So the area of the region is BottomTopWidth dy. To carry out the computation, we need to write everything in terms of y. Well, the bottom value of y is 0 and the top value of y is 8. That's easy. What about the width? Each strip has a right and left border, and the distance of these borders to the y-axis varies with y. So we need these distances, which I called in the accompanying diagram Left(y) and Right(y). For example, the Left(y) border corresponds to the line segment, which has equation y=4x. Here x is the distance to the y-axis, so we need x in terms of y. This is a toy problem! We take y=4x and solve for x to get x=(1/4)y. Similarly, for Right(y), the equation y=x3 becomes x=y1/3, and Right(y)=y1/3. Now let's compute the area again.
    y=0y=8(y1/3-(1/4)y)dy=(3/4)y4/3-(1/8)y2|08=((3/4)84/3-(1/8)82)-(0)=(3/4)24-8=12-8=4.

    Comments
    I'm really happy that the two results were the same. As I mentioned in class, the second computation took me three tries in "rehearsal" before I got the answers to coincide. Embarrassment is a great motivator. It turns out (as you will see in Math 251) that these dual computations are really quite interesting. We got 12-8=4 and 8-4=4. Some much more complicated computations are really similar.

    Yes, these is a toy computation. Let's see: I'll work with toys because I have limited time in class. I'll work with toys because the computational details would otherwise obscure the ideas. I'll work with toys, well, because I can do them. In order to finish the second computation, I needed to find the inverses of the functions x-->4x and x-->x3. I can do this. Many other functions do not have inverses which are easy to compute. I hope you recognize this problem.

    The pictures I have been drawing are "stylized". That is, I tried to draw what I thought were the essential features (straight and curved lines where they should be straight and curved, for example). But I neglected some proportions. People who use computers and calculators sometimes are not sensitive to this feature, which even in this case leads to some distortion. To the right is a picture with true proportions. You can compare it to what been shown in the other illustrations.

    Now a volume
    Suppose a solid object has as its base the region we've been describing: enclosed by y=x3 and the line segment which joints (0,0) and (2,8). Suppose the cross-sections or slices of the solid by planes perpendicular to the xy-plane and parallel to the x-axis are isoceles right triangles, with one leg of the triangle in the xy-plane. Sketch this solid, and compute its volume.

    If you are new to this subject, there is much information "encoded" in the parabraph above. I hope you know the base, the bottom of the solid. It is a flat region in the plane. The solid itself is above this region. The important sentence in the paragraph is

    Suppose the cross-sections or slices of the solid by planes perpendicular to the xy-plane and parallel to the x-axis are isoceles right triangles, with one leg of the triangle in the xy-plane.
    This is rather compact and technical language. First, let's consider the slices. Each slice is an isoceles right triangle. An isoceles triangle has two sides which are the same length. Since in a right triangle, the hypotenuse is longer than either of the legs, the only way a right triangle can be isoceles is when the legs have the same length. And that will occur when both of the acute angles equal 45o or Pi/4 radians. I think that an isoceles right triangle looks like what is shown to the right. If the base or bottom side of the triangle (a leg!) has length L, then the height, another leg, will also have length L, and the hypotenuse will have length sqrt(2)L. The area of this triangle will be (1/2)L2.

    What can the solid object look like? Here I'll just make an attempt. If you are new to this stuff, your attempts may not be terrific the first few times, but they will improve if you practice. I think my version of the solid looks like what is shown to the right. It has a flat bottom and a flat side, and the third side is curved, but is made up of lots of hypotenuses (is that the plural? I also worry about hippopotamuses, or musi ...). Of course, such solids can't exist in real life, and, for example, engineers therefore should not worry about them. NOT CORRECT!!! Even if your first attempt at drawing the solid is not agreeable, I hope that you would eventually feel you could build one by carving it out of wood or shaping clay.

    Another word ...
    I don't think in the previous discussion that I emphasized enough that the cross-sections were to be perpendicular to the base. There are lots of ways to slice solids, and then to describe the solids. I could take a loaf of bread and slice it perpendicular to the base, the bottom of the loaf. Or I could be more artistic (?) and slice it in some way that was angled to the base ("obliquely"). Below is an attempt to show you what I mean. We are analyzing a solid which is similar to the left-hand loaf of bread, where the slices are perpendicular to the base.

    How to compute the volume
    We could get the total amount of bread by adding up the bread in all the slices. Similarly, we will get the total volume of our solid by imagining that it is dissected by numerous appropriate slices. To take advantage of the description, the slices will be parallel to the x-axis and perpendicular to the xy-plane. We also will think that the slices are about dy thick. Each individual slice is almost a nice solid, dy thick, with sides that are almost equal, having an area of (1/2)L2 where L is the indicated length in the figure. So dV, a piece of the volume, will be about (1/2)L2dy. And the total volume is obtained by adding up the pieces of volume, V=dV.

    Let's be more precise. We will integrate with respect to y. The limits of integration will be as in the second computation of volume: y=0 to y=8. The length labeled L here is exactly what I called Width there, so L=Width=Right(y)-Left(y)=y1/3-(1/4)y, and we need to compute y=0y=8(1/2)(y1/3-(1/4)y)2dy. We can "pull out" the (1/2) but the best thing to do to the rest is "expand" it (multiply out). Here we go:
    y=0y=8(1/2)(y1/3-(1/4)y)2dy=(1/2)y=0y=8y2/3-(2/4)y4/3+(1/[16])y2 dy=(1/2)((3/5)y5/3-(3/[14])y7/3+(1/[48])y3(1/2))|08=([128]/[105]) clearly

    No, not clearly!!!. In fact, if you had to do this on an exam or for homework, please report the answer as (1/2)((3/5)85/3-(3/[14])87/3+(1/[48])83(1/2)). That's a very very good way to report the answer. I got the number given because a friend told me.

    > int((1/2)*(y^(1/3)-(1/4)*y)^2,y=0..8);
                                                    128
                                                    ---
                                                    105
    And another volume
    Suppose we have a solid with the same base, so that the cross-sections or slices of the solid which are parallel to the y-axis and perpendicular to the xy-plane are half-discs (semicircles) with diameters in the xy-plane. What does the solid look like, and what is its volume? Hew of course we will slice the solid dx. The cross-sectional area is the area of half of a circle whose diameter is L. Well, the area of a whole circle with radius Pi is Pi·r2. Here r is (1/2)L, so that the cross-sectional area is (1/2)Pi[(1/2)L]2. Repeating: the first 1/2 is because we have half of the area of a circle, and the second 1/2, inside the parentheses, is because we are changing diameter into radius. Here the setup is dx. The limits of integration look back to the first computation of the area, so that x=0 is the lower limit and x=2 is the upper limit. L is what I called Height then, so L=4x-x3. What is the volume of the solid? Here we go. Notice that the (Pi/8) factor comes from Pi(1/2)(1/2)2 pulled out of the integral (we can do that with multiplicative factors!).
    (Pi/8)02(4x-x3)2dx= (Pi/8)0216x2-8x4+x6dx=(Pi/8)([16/3]x3-[8/5]x5+[1/7]x7|02=(Pi/8)([16/3]23-[8/5]25+[1/7]27-0
    Again, this is the way I would leave this answer, please please please!!!. If you are a weirdo, and need "precision" then the exact value is Pi([128]/[105]). I don't know why there is a coincidence with the previous computation. I didn't plan on it. Sigh.

    QotD
    I'll try to give a simple computation, usually towards the end of each lecture, which I call the Question of the Day. Students get full credit for handing in any answer. (Yeah, a way to take attendance.) This is also a way for me to see if people understand what I am doing. This is also a way for students, if they wish, to see if they can do (correctly!) what the lecturer considers to be a "simple computation". Here the QotD was the computation of the integral above.


    Maintained by greenfie@math.rutgers.edu and last modified 1/24/2008.