Your subscription plan will change at the end of your current billing period. You’ll continue to have access to your current plan until then.
Welcome back!
Hi ,
We'd like to know you better so we can create more relevant courses. What do you do for work?
Course Syllabus
You've achieved today's streak!
Complete one lesson every day to keep the streak going.
Su
Mo
Tu
We
Th
Fr
Sa
You earned a Free Pass!
Free Passes help protect your daily streak. Complete more lessons to earn up to 3 Free Passes.
Elevate Your Career with Full Learning Experience
Unlock Plus AI learning and gain exclusive insights from industry leaders
Access exclusive features like graded notebooks and quizzes
Earn unlimited certificates to enhance your resume
Starting at $1 USD/mo after a free trial – cancel anytime
In the previous video, you learned how the derivative of a derivative can appear naturally in Newton's method. This derivative of a derivative actually has a name, the second derivative. In this video, I'm going to show you the second derivative, some of its properties, and how it can be really useful in optimization problems. So previously, you learned how to use Newton's method for optimization, and remember that this was the iterative step. In order to find the minima or the maxima of the function, you need to find the zeros of the derivative. At some point, you use this thing, the derivative of the derivative. So that's new. That's the second derivative, and it's very, very useful. It gives us a lot of information about the function. In Lagrangian notation, that can be written as d squared f over dx squared, or as d by dx up d by dx of f. In Lagrangian notation, it's much simpler. If f prime is the derivative, then the second derivative is f prime prime of x. Now, I like to understand things in real life, and remember that to understand the first derivative, we use velocity, because if x is the distance traveled by a car, then v is velocity, and v is the rate of change of distance with respect to time, or dx over dt. Well, in this case, what's the rate of change of velocity with respect to time? It's simply the acceleration. Acceleration is dv by dt, or d squared x over dt squared. Acceleration tells us how much the velocity is changing with respect to time. So if your acceleration is positive, it means your velocity is increasing with respect to time, and if the acceleration is negative, it means the velocity is decreasing with respect to time. And if you have zero acceleration, it means you have constant velocity. So now, let's do some plots. Imagine that you're driving your car, and this is the plot. So in the horizontal axis, you have time, and in the vertical axis, you have distance. And let's say that the plot is this one over here. So let's analyze it bit by bit, and let's see how it translates in terms of velocity. So at the start of your trip, your car stopped, and you need to start it and increase your velocity until you reach a constant speed. So the slope keeps getting bigger as time goes by. Now, imagine that this piece of function can be modeled as 750t squared. And let's say that this behavior goes on for 2 minutes, or 2 over 60 hours. Now, the derivatives for these first minutes is the line 1500t. Why? Because the derivative of 750t squared is 1500t. Now let's say that for the next couple of minutes, you keep going at a steady pace, so you have the same rate of change. Now let's say that this can be modeled by the equation 50t minus 5 over 6. That's a line. It's a linear equation. Now since the distance is linear, then you've reached a constant velocity of 50 kilometers per hour. Why? Because the derivative of 50t minus 5 over 6 with respect to t is simply 50. Now let's say that you keep going for 5 minutes until you realize that you forgot your wallet at home, and you actually need to go back. So at this point, you start pressing the brakes, and the brakes make you slow down until you stop. And when you stop, you have a derivative of 0. And notice that you've reached the maximum, because this is as far as you got. After this, you start going back. So you start turning around and going at a negative speed. And now notice that the slope starts positive, but keeps getting smaller and smaller until it reaches 0 at the peak value of the distance. And finally, it gets negative when you start going in the opposite direction. So this one over here is the graph of the speed. You started positive, then you reached 0 when you stopped, and then you started going negative because you started going in the opposite direction as before. Let's say that the expression for the distance was this one, minus 1500t squared plus 300t minus 11.26. So what's the equation for the line? Well, it's the derivative of this, which is 300 minus 3000t. It's a linear equation. Now let's say that after two minutes of going back, you finally set at a constant speed until you reach the starting point. So what happens is that over here, you have a constant speed. And let's say the distance function is 55 over 6 minus 50t. Therefore, the velocity is minus 50. So now that we have the graph of velocity based on the graph of distance, let's find the graph of acceleration based on the graph of velocity. So for your first two minutes, your speed is a line. That means your derivative is a constant, which is a value 1500. Because you have a constant acceleration, then your speed increases linearly. Now between two and five minutes, when you travel at constant speed, the acceleration is simply zero. When you travel at constant speed, you're not accelerating. There's no change in velocity. Now between five and seven minutes, your speed is again a line, but now with negative slope, because your deceleration is minus 3000. Or in other words, your acceleration is minus 3000 because you're decelerating. And finally, for the final stretch, you have an acceleration of zero again, because you're going at a constant speed of minus 50. So when we put the first graph and the third graph together, we go from x to a, from distance all the way to acceleration. And as you can see, for the first two minutes, when the distance increases at an increasing rate, you have a positive acceleration. Between two and five minutes, when you travel at a constant pace, the acceleration is zero. After six minutes, you keep going forward, but slower and slower, and between seven minutes you're going back. So for these transitions, you experience a negative acceleration. Notice that at the maximum distance traveled, you had a negative acceleration, meaning a negative second derivative. This is very important. And finally, until the end of your trip, your acceleration becomes zero, since you're again going at a steady pace. So as you can see, the second derivative gives a measure of the amount by which a curve deviates from being a straight line. This is called the curvature. Let me get a bit more into the curvature. When you have a positive second derivative, as in the first piece of the distance, you have a concave up function. This is also a convex function. In this function, as you can see, the second derivative is positive, and the function is increasing at an increasing rate. You're increasing the speed, and therefore your distance increases more and more each time. Over here you have the opposite. Your function is concave down, and that happens when the second derivative is negative. For the other two, the second derivative is zero. For this, it's inconclusive, so you have no curvature. Now let me get a bit more into curvature. This over here is a concave up function. It looks like a happy face. And this one over here, it's a concave down function. It looks like a sad face. And the way to tell is when the second derivative is positive, you have a concave up or convex function. And when the second derivative is negative, you have a concave down function. And how is this useful for optimization? Well, the second derivative tells you if something is a maximum or a minimum. Remember that the points of derivative zero are the candidates for maximum or minimum, but we don't know if they're maximum or minimum. So the second derivative tells us. Take a look at the first one. This one over here has a derivative of zero, and the second derivative is positive. And it's a local minimum. However, this one over here is a local maximum, and the second derivative is negative. However, for the other two, it's inconclusive. When the second derivative is zero, we don't know if we're at a presence of a maximum or a minimum. Now, there's something very interesting that happens, and it's that the first derivative tells us one thing, and the second derivative tells us another thing. When the first derivative is positive, we have an increasing function, and when it's negative, we have a decreasing function. However, when the second derivative is positive, we have concave up, and when the second derivative is negative, we have concave down. And as you can see, when you have a concave up point, the point with derivative zero is a local minimum, whereas when you have a concave down, the point where the derivative is zero is a local maximum.