课程: Probability Foundations for Data Science
Calculus review: Limits and derivatives
- [Instructor] In this video, I will give you a quick refresher on some basic calculus concepts you will need to know for this course. The main topics you will need to know are limits, derivatives and integrals. I will do my best to guide you through understanding how these concepts are used in this video and when they arise in this course. Let's begin with the topic of limits. A limit is used to define the value that a function approaches as the input approaches a defined point. This is denoted by the following equation where you have the limit function f of x, as x approaches the value a, and this is going to be equal to l. There are a few different directions and magnitudes limits can go. Limits from the left are denoted with a negative value and a constant, so you have the limit of x going to a in that negative direction for your function f of x. They can go from the right and they're denoted with a positive value in a constant, so you have the limit of x going to a with that plus sign. Sometimes the plus sign will be there, sometimes it'll just be implied. And again, that'll be for your function f of x. And then finally, when it comes to magnitude, sometimes instead of a constant value, you'll have either positive infinity or negative infinity for your limit to go to. So again, I'll be noted as limit of x go into infinity or x to negative infinity for your function f of x. Let's look at a simple limit example. Let's say you want to find the limit as x approaches four for the function two multiplied by x plus three. The way you do this is typically you just solve for the function. So in this case, as x is approaching four, you'd multiply two times four and add three to get the value of 11. So that means that the limit for this function as x approaches four is going to be 11. Next step are derivatives. A derivative represents the rate of change of a function with respect to a variable. The derivative of f of x with respect to x is defined by the following equation. So you have f' x, which you'll be representing your derivative, and it is equal to the limit as h goes to zero of your function f of x plus h, minus your function f of x divided by h. You'll notice in this case, it's as that limit is approaching zero. And again, you can't necessarily divide something by zero, so that's why you use the limit in this certain scenario for the definition. There are a few different ways that you can represent derivatives. For example, you can have it be f' x for your function. Sometimes it's denoted as d over dx, and then your function f of x. And then sometimes it's denoted by a variable such as y or x with the apostrophe. And in this case, that means that y or x is going to be equal to your function f of x. There are five main rules when it comes to using derivatives. First up is the power rule. So let's say you're taking the derivative of a variable x to the power of n. The result of this will be the n multiplied by x to the power of n minus one. So essentially you're taking the power down and multiplying that previous power by a variable x. Next step is the sum rule. This rule states when you take the derivative of function f of x, plus function g of x, it is the same as taking the derivative of f of x and then simply adding it to the derivative of g of x. This helps when it comes to solving equations for you to be able to separate things out, make it a little bit easier. After that is the product rule. So let's say you're taking the derivative of function f of x, and function g of x. In this case, it's a little different than the summing rule. So the results for this one, it's going to be the derivative of f of x, multiplied by just the function g of x, and then you'll add that to just the function of f of x, multiplied by the derivative of function g of x. Next step is the quotient rule, and this acts very similar to the product rule. You'll notice the top portion is pretty similar to the results from the product rule. So when you take the derivative of function f of x divided by function g of x, you'll get the derivative of f of x multiplied by just the function g of x. Subtract that by just the function of f of x multiplied by the derivative of g of x. And finally, you'll divide all of this by the function g of x squared. Finally, there's the chain rule. So let's say you are taking the derivative of a function f of the function of g of x. So again, you're kind of like, nesting a function in this case. So with this one, the result is going to be the derivative of your function f of your function g of x, and multiply that by the derivative of your function g of x. Let's look at this in a simple derivative example. In this case, you have the function is going to be four multiplied by x cubed. To get the derivative, you'll be using the power rule here, and an easy way to think of it is you're going down with your derivatives. So think derivative down. This will bring the power down, and so you'll multiply that previous power three by your constant four to get a value of 12. And then you'll multiply that by your new x, which is going to be squared, because again, you're going to take that power down by one from three to two. Let's look at another derivative example. Let's say you want to take the derivative of the function x plus three multiplied by x squared. In this case, you'll be using both the power rule and the sum rule. So in this case, you can separate out the derivatives into two different pieces, take their separate derivatives and add them back together at the end. So if you're taking just the derivative of x, you're essentially going to be taking x to the power of one, and you're going to be multiplying it by that previous power, which is one, and multiplying it by x, which is now to the zero, which x to the zero is going to be. So essentially, one multiplied by one is going to equal a value of one for your derivative of x. Moving on to the second portion, you have three multiplied by x squared. So in this case, you're going to take your power down and multiply that previous power of two by three to get a new constant value of six, and you're going to be multiplying that just by x because x is now going to be to the one versus two. But again, usually we don't put x to the power of one, we should put x. Now, you should have a better overall understanding of how to work with limits and derivatives in calculus. Up next, you'll learn how to work with integrals.