A colleague of mine and I, in the course of teaching integral calculus for the umpteenth time, were wondering if we could expand the class of examples that our students are exposed to when computing Riemann integrals from the definition. Most such examples involve polynomial functions, and they work nicely because we have some well-known formulas, like
$\displaystyle\sum_{i=1}^n 1 = n$,
$\displaystyle\sum_{i=1}^n i = \frac{n(n+1)}{2}$,
and $\displaystyle\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$. (And certainly, there are others.)
But we wanted to expand the class of examples beyond polynomial functions, and started to think about trig functions. We came up with a computation for $\int_0^\pi \sin(x)\;dx$ using the definition of the Reimann integral, which I provide below.
Question: Is the computation below in the literature somewhere? If so, where?
Computation:
Using a Riemann sum with right endpoints, we have
$$\int_{0}^\pi \sin(x)\; dx = \lim_{n \to \infty}\sum_{i=1}^n \sin(x_i) \Delta x$$ where $\Delta x = \frac{\pi}{n}$ and $x_i = i\Delta x$.
The trick is to rewrite the Riemann sum $\sum_{i=1}^n \sin(x_i) \Delta x$ as a telescoping sum using the difference of cosines identity: $$\cos(b) - \cos(a) = 2 \sin\left(\frac{a+b}{2}\right)\sin\left(\frac{a-b}{2}\right)$$
Setting $a = \frac{2i+1}{2}\Delta x$ and $b = \frac{2i-1}{2}\Delta x$ yields
$$\cos\left(\frac{2i-1}{2}\Delta x\right) - \cos\left(\frac{2i+1}{2}\Delta x\right) = 2 \sin\left(i \Delta x\right) \sin\left(\frac{\Delta x}{2}\right)$$
Solving for $\sin(i \Delta x)$ gives
$$\sin(i \Delta x) = \frac{\cos\left(\frac{2i-1}{2}\Delta x\right) - \cos\left(\frac{2i+1}{2}\Delta x\right)}{2 \sin\left(\frac{\Delta x}{2}\right)}$$
The Riemann sum now is $$\sum_{i=1}^n \sin(i \Delta x) \Delta x = \frac{\frac{\Delta x}{2}}{\sin\left(\frac{\Delta x}{2}\right)} \sum_{i=1}^n \left[\cos\left(\frac{2i-1}{2}\Delta x\right) - \cos\left(\frac{2i+1}{2}\Delta x\right)\right]$$
The latter sum is telescoping, and so $$\sum_{i=1}^n \sin(i \Delta x) \Delta x = \frac{\frac{\Delta x}{2}}{\sin\left(\frac{\Delta x}{2}\right)}\left[ \cos\left(\frac{\Delta x}{2}\right) - \cos\left(\frac{2n+1}{2}\Delta x\right)\right]$$
Now recalling that $\displaystyle \Delta x = \frac{\pi}{n}$ and taking $n \to \infty$ we have
$\begin{align} \int_0^\pi \sin(x)\;dx &= \lim_{n \to \infty} \frac{\frac{\Delta x}{2}}{\sin\left(\frac{\Delta x}{2}\right)}\left[ \cos\left(\frac{\Delta x}{2}\right) - \cos\left(\frac{2n+1}{2}\Delta x\right)\right]\\ & = 1 \cdot \left[ \cos(0)-\cos(\pi)\right]\\ & = 2 \end{align}$
One nice thing about this computation is that you can replace $\pi$ with an arbitrary upper limit of integration $c$ and compute that $\int_0^c \sin(x) \;dx = 1 - \cos(c)$. From there, one can easily compute $$\int_a^b \sin(x) \; dx = \int_0^b \sin(x) \; dx - \int_0^a \sin(x) \; dx = -\cos(b) + \cos(a)$$ (as predicted by FTC).
Question: Is the computation above in the literature somewhere? If so, where?
Below are some references I found in my "math library" at home this morning. Before posting just now, I quickly searched to see which were online and I've included links for those I found. The Boyer paper URL is a JSTOR item I don't have access to, but I've included the URL anyway because many here are probably at colleges/universities that have JSTOR access.
At the risk of pointing out the obvious, this method doesn't prove the Riemann integrability of ${\sin x},$ since equal length partitions are used along with endpoint evaluations. For instance, under this restriction the limit of the Riemann sums of the characteristic function of the rationals on a given compact interval exists. What this calculation does is give the value of the (Reimann) integral on a given compact interval under the assumption that the integral exists.
Direct quotes from original sources are indicated by italics. Within such a quote: (1) italics in the original is indicated by non-italics here; (2) brief additions and/or words of further explanation by me are indicated by non-italics between square braces "[stuff by me]"; (3) omissions in the original are indicated using "$[\dots]$".
[1] [Author not known], Sur la sinussoide [On the sinusoid], Question D'Examen, Nouvelles Annales de Mathématiques (1) 7 (1848), 436-437.
[2] William Elwood Byerly, Elements of the Integral Calculus, 2nd edition, Ginn and Company, 1892, xvi + 339 + 11 + 32 pages.
[3] Carl Benjamin Boyer, History of the derivative and integral of the sine, Mathematics Teacher 40 #6 (October 1947), 267-275.
[4] Mark Bridger, A note on areas under a sine curve, The Pentagon 18 #1 (Fall 1958), 24-26.
[5] Richard Courant and Fritz John, Introduction to Calculus and Analysis, Volume I, John Wiley and Sons (Interscience Publishers), 1965, xxiv + 661 pages.
[6] Godfrey Harold Hardy, A Course of Pure Mathematics, 10th edition, Cambridge University Press, 1952, xii + 509 pages.
[7] Kenneth Sielke Miller and John Breffni Walsh, Elementary and Advanced Trigonometry, Harper and Brothers, 1962, xii + 350 pages.
[8] Isidor Pavlovich Natanson, Summation of Infinitely Small Quantities, Topics in Mathematics, D. C. Heath and Company, 1963, viii + 59 pages.
[9] John Meigs Hubbell Olmsted, Intermediate Analysis. An Introduction to the Theory of Functions of One Real Variable, The Appleton-Century Mathematics Series, Appleton-Century-Crofts, 1956, xiv + 306 pages.
[10] Michael David Spivak, Calculus, 3rd edition, Publish or Perish, 1994, xiv + 670 pages.
[11] Isaac Todhunter, A Treatise on the Integral Calculus, 6th edition, MacMillan and Company, 1880, viii + 408 pages.
[12] Edwin Bidwell Wilson, Advanced Calculus, Ginn and Company, 1911, x + 566 pages.
(ADDED 3 DAYS LATER) I thought it would be useful to archive in my answer some references for evaluating definite integrals of other functions by Reimann sums. However, because I want to get this finished during my lunch hour and I don't want to substantially increase the length of this already long answer, I will use briefer citations.
Harding/Barnett, Solution to Calculus Problem #369, Amer. Math. Monthly 22 #6 (June 1915), 208-210.
Barnett, Solution to Calculus Problem #366, Amer. Math. Monthly 22 #5 (May 1915), 168-169.
Eli Maor, On the direct integration $\int_{a}^{b}x^{n}\,dx,$ Int. J. Math. Educ. Sci. Technol. 5 (1974), 199-200.
Finally, the following are similar to the kind of things found in Natanson's Summation of Infinitely Small Quantities:
W. R. Longley, Some limit proofs in solid geometry, Amer. Math. Monthly 31 #4 (April 1924), 196-202.
Joseph B. Reynolds, Some applications of algebra to theorems in solid geometry, Mathematics Teacher 18 #1 (January 1925), 1-9.
Jos. B. Reynolds, Finding plane areas by algebra, Mathematics Teacher 21 #4 (April 1928), 197-203.