Section 13.01

Area under curves

Part 1: Areas with a finite number of subintervals

Example 1: Estimate the area under y = (Sqrt[x]) on 4 ≤ x ≤ 6 using six rectangles of equal width and ...
a.) Right endpoints







b.) Left endpoints

Example 2 Graphics:
a.) RiemannRight[4,16,3,6,1];
({{({{}})}})
b.) RiemannRight[4,16,3,6,0];
({{({{}})}})

As you can see, this topic involves sums.  So, it is fitting to tell one of the greatest stories from mathematical lore.

Historical Note: Carl Gauss

Shortly after his seventh birthday Gauss entered his first school, a squalid relic of the Middle Ages run by a virile brute, one Büttner, whose idea of teaching the hundred or so boys in his charge was to thrash them into such a state of terrified stupidity that they forgot their own names. More of the good old days for which sentimental reactionaries long. It was in this hell-hole that Gauss found his fortune.

Nothing extraordinary happened during the first two years. Then, in his tenth year, Gauss was admitted to the class in arithmetic. As it was the beginning class none of the boys had ever heard of an arithmetic progression. It was easy then for the heroic Büttner to give out a long problem in addition whose answer he could find by a formula in a few seconds. The problem was of the following sort, 81297 + 81495 + 81693 + ... + 100899, where the step from one number to the next is the same all along (here 198), and a given number of terms (here 100) are to be added.

It was the custom of the school for the boy who first got the answer to lay his slate on the table; the next laid his slate on top of the first, and so on. Büttner had barely finished stating the problem when Gauss flung his slate on the table: "There it lies," he said—"Ligget se'" in his peasant dialect. Then, for the ensuing hour, while the other boys toiled, he sat with his hands folded, favored now and then by a sarcastic glance from Büttner, who imagined the youngest pupil in the class was just another blockhead. At the end of the period Büttner looked over the slates. On Gauss' slate there appeared but a single number. To the end of his days Gauss loved to tell how the one number he had written down was the correct answer and how all the others were wrong. Gauss had not been shown the trick for doing such problems rapidly. It is very ordinary once it is known, but for a boy of ten to find it instantaneously by himself is not so ordinary. 

Bell, E. T. 1937. Men of Mathematics. New York: Simon and Schuster. (See chapter 14, "The Prince of Mathematicians: Gauss," pp. 218–269.)  

More accounts of this event may be found at: http://www.sigmaxi.org/amscionline/gauss-snippets.html

So, what was the trick ... what did Gauss do?

Arithemetic series: 
({{({{1 + 2 + 3 + … + n = ___  ___  ___}})}})

Example 2: Set up the sum for finding the area under y = x on 0 ≤ x ≤ 1 using right endpoints.

Example 3: Notation (explain or expand the sum):
Σ

(Subscript[Σ, i = 2]^5) i


(Subscript[Σ, i = 0]^4)(3  i - 1)

Example 4: Notation (write using Σ notation):
4 + 5 + 6 + … + 14


3 + 5 + 7 + … + 91

Summation (Σ) formulas:
1.) (∑_(i = 1)^n) 1 = n
2.) (∑_(i = 1)^n) c (Subscript[x, i]) = 
        c (Subscript[Σ, i = 1]^n) (Subscript[x, i])
3.) \(TraditionalForm\`∑\_\(i = 1\)\%n\ \((x\_i ± 
              y\_i)\) = Σ\_\(i = 1\)\%n\ x\_i ± Σ\_\(i = 1\)\%n\ y\_i\)
4.) (∑_(i = 1)^n) i = ((n(n + 1))/2)
5.) \(TraditionalForm\`∑\_\(i = 1\)\%n i\^2 = \(\(n(n + 1)\) \((2  n + 1)\)\)\/6\)
6.) \(TraditionalForm\`∑\_\(i = 1\)\%n i\^3 = \(\(n\^2\)(n + 1)\)\^2\/4\)

Example 2 revisited: Find the area under y = x on 0 ≤ x ≤ 1 using left endpoints.

Example 5: Use rectangles with equal width and right hand end points to find the area under y = (x^3) on [0, 1].

Part 2: Scratch

<< Graphics`Graphics`
Off[General::"spell1", NMaximize::"nrnum", Plot::"plnr", 
      Graphics::"gptn"]

\(\(Riemann[fct_:  x^2, a_:  1, b_:  3, r_:  4, nMax_:  5, end_:  1] := 
        Module[{ (*Δ, xi, t, HMax, HMin, 
              s*) }, 

f[z_] := 
            fct /. x -> 
                z; 

	Δ = \(b - a\)\/nMax; 
	xi = Table[a + i\ Δ, {i, 0, nMax}]; 
	
          t = Delete[
              Flatten[Table[{i, i}, {i, 1, 
                    nMax + 1}]], {{1}, {\(-1\)}}]; 

 (*For\ determining\ the\ window*) 
	
          HMax = \(NMaximize[{f[x], 
                  a - 2  Δ ≤ x && 
                    x ≤ 
                      b + 2  Δ}, {x}]\)[\([1]\)]; 
	
          HMin = Min[
              0, \(NMinimize[{f[x], 
                    a ≤ x && 
                      x ≤ b}, {x}]\)[\([1]\)]]; 
	
          s = 1.4  HMin - 
              0.4  HMax; 

Approx = 
            N[Sum[Δ\ f[\((1 - end)\) 
                        xi[\([t[\([2  j + 1]\)]]\)] + 
                      end\ xi[\([t[\([2  j + 2]\)]]\)]], {j, 0, 
                  nMax - 1}]]; 
Print["The approximate area is: ", Approx]; 


          DisplayTogether[{Graphics[{

 (*Vertical\ label*) 
Line[{{a - Δ, 
                        0}, {a - Δ, 
                        f[\((1 - end)\) xi[\([r]\)] + 
                            end\ xi[\([r + 1]\)]]}}], {GrayLevel[0.9], 
                    Line[{{a - 2\ Δ, 
                          f[\((1 - end)\) xi[\([r]\)] + 
                              end\ xi[\([r + 1]\)]]}, {a, 
                          f[\((1 - end)\) xi[\([r]\)] + 
                              end\ xi[\([r + 
                                      1]\)]]}}]}, 
{Dashing[{0.02, 0.02}], 
                    Line[{{a, 
                          f[\((1 - end)\) xi[\([r]\)] + 
                              end\ xi[\([r + 1]\)]]}, {xi[\([r + 1]\)], 
                          f[\((1 - end)\) xi[\([r]\)] + 
                              end\ xi[\([r + 
                                      1]\)]]}}]}, 

Text[
                    f[\((1 - end)\) xi[\([r]\)] + end\ xi[\([r + 1]\)]], {a - 
                        2  Δ, 
                      f[\((1 - end)\) xi[\([r]\)] + end\ xi[\([r + 1]\)]]\/2}], 

 (*Horizontal\ label*) 
Line[{{xi[\([r]\)], s}, {xi[\([r + 1]\)], 
                        s}}], {GrayLevel[0.9], 
                    Line[{{xi[\([r]\)], 0.75  s}, {xi[\([r]\)], 
                          1.1  s}}]}, {GrayLevel[0.9], 
                    Line[{{xi[\([r + 1]\)], 0.75  s}, {xi[\([r + 1]\)], 
                          1.1  s}}]}, 
Text[Δ, {xi[\([r]\)] + Δ\/2, 
                      1.4  s}], 

 (*Rectangles\  - \ General*) 
Table[{GrayLevel[ .7], 
                      Line[{{xi[\([t[\([2  j + 1]\)]]\)], 
                            0}, 
{xi[\([t[\([2  j + 
                                      1]\)]]\)], 
                            f[\((1 - end)\) xi[\([t[\([2  j + 1]\)]]\)] + 
                                end\ xi[\([t[\([2  j + 
                                        2]\)]]\)]]}, 
{xi[\([t[\([2  j + 2]\)]]\)], 
                            f[\((1 - end)\) xi[\([t[\([2  j + 1]\)]]\)] + 
                                end\ xi[\([t[\([2  j + 
                                        2]\)]]\)]]}, 
{xi[\([t[\([2  j + 2]\)]]\)], 0}}]}, {j, 0, 
                      nMax - 1}], 

 (*Rectangles\  - \ rth\ Rectangle*) 
Table[{Hue[Random[]], 
                      Rectangle[{xi[\([t[\([2  j + 1]\)]]\)], 
                          0}, 

{xi[\([t[\([2  j + 2]\)]]\)], f[\((1 - end)\) xi[\([t[\([2  j + 1]\)]]\)] + 
                              end\ xi[\([t[\([2  j + 2]\)]]\)]]}]}, {j, 
                      r - 1, r - 
                        1}], 

 (*dashed\ height\ inside\ rectangle*) 
{Dashing[{0.02, 0.02}], 
                    Line[{{\((1 - end)\) xi[\([r]\)] + end\ xi[\([r + 1]\)], 
                          0}, {\((1 - end)\) xi[\([r]\)] + 
                            end\ xi[\([r + 1]\)], 
                          f[\((1 - end)\) xi[\([r]\)] + 
                              end\ xi[\([r + 
                                      1]\)]]}}]}\ 

}], \  (*end\ of\ graphics*) 

 (*Function\ plot*) 
Plot[
                f[x], {x, a - 2  Δ, 
                  b + 2  Δ}]

}, \  (*end\ of\ display\ inputs*) 


 (*Graphic\ options*) 
Axes -> True, 
            AxesLabel -> TraditionalForm /@ {x, y}, 
            TextStyle -> {FontFamily -> "Times", 
                FontSize -> 14}, 
            Ticks -> {If[nMax ≤ 10, xi, False], False}, 
            PlotRange -> All, 
            ImageSize -> {400, 
                Automatic}] (*end\ of\ display\ together*) 



];\)\)

Riemann[(Sqrt[x]), 4, 16, 4, 6, 1];