[This article was first published on Cartesian Faith » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
This is a lecture post for my students in the CUNY MS Data Analytics program. In this series of lectures I discuss mathematical concepts from different perspectives. The goal is to ask questions and challenge standard ways of thinking about what are generally considered basic concepts. Consequently these lectures will not always be as rigorous as they could be.
This week let’s take a closer look at integration. People often describe integration as area under the curve. This is indeed true, yet I always found it a bit difficult to understand how you get from area under the curve to the Fundamental Theorem of Calculus. This theorem can be cast two different ways, and I’m referring to it as , where is the antiderivative of .
I like starting with simple examples since it’s a lot easier to understand the behavior of something when you minimize the variables introduced. Hence, let’s start by looking at a line.
xs <- seq(-1,5, by=0.02)
f <- function(x) x - 1
plot(xs, f(xs), type='l', col='green')
abline(h=0, v=0, col='grey')
There’s nothing particularly remarkable here, so let’s change that. What happens if we add to this graph the cumulative Riemann sum of for the interval [-1,5]? In other words let’s graph .
lines(xs, cumsum(f(xs)*.02), col='blue')
Well this looks kind of like a parabola, and obviously the limit is, but what’s the intuition around it? The simplest thing to do is to see what the cumulative sum of is.
This is telling us that the area of a thin strip is rather small. It’s also telling us that since the slope is positive, a little bit less negative area is being added each time. Eventually something interesting happens as . The value of the original function starts to get really small, eventually approaching 0 when . Consequently, there isn’t much contribution to the area from these parts of the line. At the slope is exactly 0, which is where . Once