Integrals
Too often in math, we dive into showing that a certain fact is true with a long series of formulas before stepping back and making sure that it feels reasonable and preferably obvious, at least at an intuitive level. In this lecture, we are going to talk about integrals, and that they are an inverse of derivatives. Here, we're just going to focus on one example. Imagine that you're sitting in a car, and you can't see out the window. All you see is the speedometer.
At some point, the car starts moving, speeds up, and then slows back down to a stop, all over the course of
There, I showed how the derivative of a distance versus time function gives you a velocity versus time function. So in our current situation, where all we know is velocity, it should make sense that finding a distance versus time function is going to come down to asking what function has a derivative of t times
To start off, notice that this question would be a lot easier if the car was just moving at a constant velocity, right? In that case, you could just multiply the velocity in meters per second times the amount of time that has passed in seconds, and that would give you the number of meters traveled. And notice, you can visualize that product, that distance, as an area, and if visualizing distance as area seems kind of weird, I'm right there with you. It's just that on this plot, where the horizontal direction has units of seconds and the vertical direction has units of meters per second, units of area just very naturally correspond to meters.
But what makes our situation hard is that velocity is not constant. It's incessantly changing at every single instant. It would even be a lot easier if it only ever changed at a handful of points, maybe staying static for the first second and then suddenly discontinuously jumping to a constant
That would make it uncomfortable for the driver. In fact, it's actually physically impossible, but it would make your calculations a lot more straightforward. You could just compute the distance traveled on each interval by multiplying the constant velocity on that interval by the change in time, and then just add all of those up.
So what we're going to do is approximate the velocity function as if it was constant on a bunch of intervals, and then, as is common in calculus, we'll see how refining that approximation leads us to something more precise. Here, let's make this a little more concrete by throwing in some numbers. Chop up the time axis between
Now consider one of those intervals, like the one between t equals
You could choose this constant to be anything between
So for convenience, on an interval like this, let's just approximate the speed with whatever the true car's velocity is at the start of that interval, the height of the graph above the left side, which in this case is
And the same goes for every other interval. The approximated distance is v of t times dt. It's just that you'd be plugging in a different value for t at each one of these, giving a different height for each rectangle.
I'm going to write out an expression for the sum of the areas of all those rectangles in kind of a funny way. Take this symbol here, which looks like a stretched S for sum, and then put a
Two things are implicit in this notation. First of all, that value dt plays two separate roles. Not only is it a factor in each quantity that we're adding up, it also indicates the spacing between each sampled time step.
So when you make dt smaller and smaller, even though it decreases the area of each rectangle, it increases the total number of rectangles whose areas we're adding up, because if they're thinner, it takes more of them to fill that space. And second, the reason we don't use the usual sigma notation to indicate a sum is that this expression is technically not any particular sum for any particular choice of dt. It's meant to express whatever that sum approaches as dt approaches
Remember, smaller choices of dt indicate closer approximations for the original question, how far does the car actually go? So this limiting value for the sum, the area under this curve, gives us the precise answer to the question in full unapproximated precision. Now tell me that's not surprising. We had this pretty complicated idea of approximations that can involve adding up a huge number of very tiny things, and yet the value that those approximations approach can be described so simply.
It's just the area underneath this curve. This expression is called an integral of v of t, since it brings all of its values together, it integrates them. Now at this point you could say, how does this help? You've just reframed one hard question, finding how far the car has traveled, into an equally hard problem, finding the area between this graph and the horizontal axis.
And you'd be right. If the velocity-distance duo was the only thing that we cared about, most of this video, with all of the area under a curve nonsense, would be a waste of time. We could just skip straight ahead to finding an antiderivative.
But finding the area between a function's graph and the horizontal axis is somewhat of a common language for many disparate problems that can be broken down and approximated as the sum of a large number of small things. You'll see more in the next video, but for now I'll just say in the abstract that understanding how to interpret and how to compute the area under a graph is a very general problem-solving tool. In fact, the first video of this series already covered the basics of how this works.
But now that we have more of a background with derivatives, we can actually take this idea to its completion. For a velocity example, think of this right endpoint as a variable, capital T. So we're thinking of this integral of the velocity function between
That is what velocity means. But there's another way to see this, purely in terms of this graph and this area, which generalizes a lot better to other integral problems. A slight nudge of dt to the input causes that area to increase, some little ds represented by the area of this sliver.
The height of that sliver is the height of the graph at that point, v of T, and its width is dt. And for small enough dt, we can basically consider that sliver to be a rectangle. So this little bit of added area, ds, is approximately equal to v of T times dt.
And because that's an approximation, think it's better and better for smaller dt. The derivative of that area function, ds, dt, at this point equals vT, the value of the velocity function at whatever time we started on. And that right there, that's a super general argument.
The derivative of any function giving the area under a graph like this is equal to the function for the graph itself. So if our velocity function is T times
So if we just scale that up by a factor of
And then making that negative, you'd see that negative
We could add any constant we want to this function, and its derivative is still going to be 8T minus T squared. The derivative of a constant just always goes to zero. And if you were to graph S of T, you could think of this in the sense that moving a graph of a distance function up and down does nothing to affect its slope at every input.
So in reality, there's actually infinitely many different possible anti-derivative functions. And every one of them looks like 4T squared minus
This integral has to be zero when we drag that right endpoint all the way to the left endpoint, right? The distance traveled by the car between zero seconds and zero seconds is, well, zero. So, as we found, the area as a function of capital T is an anti-derivative for the stuff inside. And to choose what constant to add to this expression, what you do is subtract off the value of that anti-derivative function at the lower bound.
If you think about it for a moment, that ensures that the integral from the lower bound to itself will indeed be zero. As it so happens, when you evaluate the function we have right here at T equals
What you do is evaluate the anti-derivative we found at the top bound,
Then, the integral equals this anti-derivative evaluated at the top bound minus its value at the bottom bound. And this fact right here that you're staring at is the fundamental theorem of calculus. And I want you to appreciate something kind of crazy about this fact.
The integral, the limiting value for the sum of all of these thin rectangles, takes into account every single input on the continuum from the lower bound to the upper bound. That's why we use the word integrate, it brings them all together. And yet, to actually compute it using an anti-derivative, you only look at two inputs, the top bound and the bottom bound.
It almost feels like cheating. Finding the anti-derivative implicitly accounts for all of the information needed to add up the values between those two bounds. That's just crazy to me.
This idea is deep, and there's a lot packed into this whole concept. So let's just recap everything that just happened, shall we? We wanted to figure out how far a car goes just by looking at the speedometer. And what makes that hard is that velocity is always changing.
If you approximate velocity to be constant on multiple different intervals, you could figure out how far the car goes on each interval just with multiplication, and then add all of those up. Better and better approximations for the original problem correspond to collections of rectangles, whose aggregate area is closer and closer to being the area under this curve between the start time and the end time. So that area under the curve is actually the precise distance traveled for the true nowhere constant velocity function.
If you think of that area as a function itself, with a variable right endpoint, you can deduce that the derivative of that area function must equal the height of the graph at every point. And that's really the key right there. It means that to find a function giving this area, you ask, what function has v of t as a derivative? There are actually infinitely many antiderivatives of a given function, since you can always just add some constant without affecting the derivative.
So you account for that by subtracting off the value of whatever antiderivative function you choose at the bottom bound. By the way, one important thing to bring up before we leave is the idea of negative area. What if the velocity function was negative at some point, meaning the car goes backwards? It's still true that a tiny distance traveled, ds, on a little time interval is about equal to the velocity at that time multiplied by the tiny change in time.
It's just that the number you'd plug in for velocity would be negative, so the tiny change in distance is negative. In terms of our thin rectangles, if a rectangle goes below the horizontal axis like this, its area represents a bit of distance traveled backwards. So if what you want in the end is to find a distance between the car's start point and its end point, this is something you're going to want to subtract.
And that's generally true of integrals. Whenever a graph dips below the horizontal axis, the area between that portion of the graph and the horizontal axis is counted as negative. And what you'll commonly hear is that integrals don't measure area per se, they measure the signed area between the graph and the horizontal axis.
Next up, I'm going to bring up more context where this idea of an integral and area under curves comes up, along with some other intuitions for this fundamental theorem of calculus. Maybe you remember, chapter
I really can't imagine a better sponsor for this channel, because it's a company whose books and whose courses I recommend to people anyway. They were highly influential to me when I was a student developing a love for creative math. So if you're a parent looking to foster your own child's love for the subject, or if you're a student who wants to see what math has to offer beyond rote schoolwork, I cannot recommend the art of problem-solving enough.
Whether that's their newest development to build the right intuitions in elementary school kids called Beast Academy, or their courses in higher level topics and contest preparation, going to aops.com slash 3blue1brown, or clicking on the link in the description, lets them know that you came from this channel, which may encourage them to support future projects like this one. I consider these videos a success not when they teach people a particular bit of math, which can only ever be a drop in the ocean, but when they encourage people to go and explore that expanse for themselves. And the art of problem-solving is among the few great places to actually do that exploration.