Calculating Integrals
There's three ways to calculate an integral:
- Approximate the integral with Riemann Sums of rectangles (or some other geometrical object like a trapezoid). We saw this when we were making estimates of the car count on Route 15 in Johnson, Vermont at the start of this chapter.
- Ask a computer to do it. This is effectively what I've been doing to build the applets in the previous exercises. The code is pretty easy. To calculate the integral of
f(x)=x^2
fromx=1
tox=2
, just type this into a Geogebra input bar:integral(x^2,1,2)
- Calculate the integral "by hand" using the Fundamental Theorem of Calculus.
f(x)=x^2
from x=1
to x=2
with the code integral(x^2,1,2)
. Note: you could also use the code integral(f,1,2)
since the function has already been declared with the name f
. There is a slight advantage to the second code snippet, since if down the road you decide to change f(x)
to something different, the integral will automatically update the integral to reflect the change.Try typing in any other function you like and calculate some integrals. Geogebra is REALLY good at calculating integrals. It won't get stumped unless you get into some really pathological functions.
A fun one to try right now is a function called h
(x)=
floor(x)
. Type it into the input bar now. It should look like a staircase. The function floor(x)
takes any input and simply rounds down to the whole number "floor". So 1.2 is "floored" to 1 while -1.2 is "floored" to -2. Try integrating floor(x)
from 1 to 5. Can you see why the integral is 10?So that brings us to method 3 for calculating integrals. I hope it didn't go unnoticed by you that the 3rd method of calculating integrals mentioned something that sounded kind of important: The Fundamental Theorem of Calculus.
First of all, if you haven't heard it already, the word "theorem" simply means "mathematical fact that has been proven true beyond all doubt". Notice that I didn't say "beyond all reasonable doubt." I said "all doubt." This means that in the world of human intellect, there's very little that's more of a sure thing than a "theorem." Theorems trump all "laws of science" and "Articles of Constitutions" as the most truthful statements known to human beings. On very rare occasions a theorem ends up being overturned, but these instances are extremely rare. In some sense, the business of mathematicians is to a.) discover new theorems and b.) safeguard the word "theorem" by ensuring no one gets to call anything a theorem unless it's been checked out very thoroughly.
Back to the Fundamental Theorem of Calculus. This particular theorem (remember: mathematical fact that has been proven true beyond all doubt) provides an incredible tool for calculating integrals. Click ahead to check it out.