Rules for calculating derivative
Learning Objectives
- Understand the rules for taking the derivative of each term
- Understand how to take the derivative of a function
Introduction
From previous lessons, you know that the derivative is the instantaneous rate of change of a function. We said that the derivative of a function at a certain point is just the slope of the function at that point. And to calculate that slope of the function at a given point, we make
For example, we saw the following table:
$ \Delta x $ | $ \Delta f/\Delta x $ |
---|---|
.1 | -171,000 |
.01 | -179,100 |
.001 | -179,910 |
.0001 | -179,991 |
This convergance around one number is called the **limit **. And we can describe what we see in the above table as the expression:
$$ f'(x) = \lim_{\Delta x\to0} \frac{\Delta f}{\Delta x} = -180,000 $$.
We read this as the limit of $\Delta f / \Delta x $ -- that is the number $\Delta f / \Delta x $ approaches -- as $ \Delta x $ approaches zero is -180,000. So, in general our definition of the derivative is:
Our rules for calculating the derivative
So far, we have calculated the derivative by changing our delta as reflected in the table above, and seeing the convergance. However, mathematicians have given us shortcuts to calculate the derivative, and that is what we'll learn about here.
The power rule
The first rule for us to learn is the power rule. The power rule states is expressed as the following. Given the following:
Then, the derivative,
This says that if a variable,
Remember that we originally calculated the derivative with our formula:
We saw that our rate of change of the function $f(x) = 3x $ was always 3.
Now let's see how this works with our power rule:
Now applying our rule that for a function with
we see that in this case
Great! This is aligns with what our graph shows, as well as our calculation using the original definition of the derivative,
Another example
Now, let's apply the power rule with another example to make sure that we have the hang of it.
Think about what our calculation for
Our rule says that $ f'(x) = 2*x $, so when
$ x = 2$ then
And when $ x = 10 $, then $ f'(10) = 2*10 = 20$.
We won't prove the power rule here. But hopefully you can see that it does seem to fit our graph of the function
It seems reasonable that the slope of the line tangent to a curve is
The constant factor rule
Believe it or not, we've already made use of the constant factor rule. The constant factor addresses how to take the derivative of a function multiplied by a constant.
So in the above example, we our function of
Applying the power rule, we know that $ \frac{\Delta f}{\Delta x}x^1 = x^{1-1} = 1 $, so we have:
In the general case, we can say, consider the function $af(x)$ where $a$ is a constant (that is, is a number and not a variable). Then $$\frac{\Delta f}{\Delta x}(af(x)) = a * \frac{\Delta f}{\Delta x}*f(x) $$
Now, don't let the fancy equations above confuse you. The rule simply says if a variable is multiplied by a constant (i.e. a number), then to take the derivative of that term, apply the power rule to the variable and multiply the variable by that same constant.
So given the function:
That's the constant factor rule in action.
The addition rule
So far all of our functions have only had one term. Remember that a term is a constant or variable that is separated by a plus or minus sign. So the function,
$ f(x) = 4x^3 - x^2 + 3x $
Ok, so to take a derivative of a function that has multiple terms, simply take the derivative of each of the terms individually. So for the function above, $ f'(x) = 12x^2 - 2x + 3 $. Do you see what we did there, we simply applied our previous rules to each of the terms individually and continued to add or subtract the terms accordingly.
The chain rule
Ok, now let's talk about the chain rule. Imagine that we would like to take the derivative of the following function:
Doing something like that can be pretting tricky right off the bat. Lucky for us, we can use the chain rule. The chain rule is essentially a trick that can be applied when our functions get complicated. The first step is using functional composition to break our function down. Ok, let's do it.
So now note that
The chain rule allows us to answer just this question. Remember, taking a derivative means changing a variable
So here $f(g(x) $ does not directly depend on
Applying the chain rule
Let's apply our chain rule step by step to the function by taking the derivative $f'(x) $ where:
Remember our chain rule is:
- First we take the derivative
$\frac{\Delta g}{\Delta x}g(x) = g'(x) = 2x + 2$ . - Then, we take the derivative
$\frac{\Delta f}{\Delta g}f(g(x))$ where$f(g(x)) = (g(x))^2 $ .
This is how we evaluate that second derivative.
The reason why is because to take that second derivative
Ok, now we have solved our two derivatives. Let's plug these derivatives back into our chain rule of
Doing so we have $$f'(g(x)) = 2g(x)(2x + 2) = 2*(3 + x^2 + 2x)*(2x + 2) $$
Leaving our equation there is fine. We've done enough math for one lesson. Hopefully, you see how using the chain rule allows us to break a complicated function up into two, and simply apply the rule to calculate the derivative.
Summary
In this section we saw a different way for calculating the derivative. The derivative of a function at a given point is still the instantaneous rate of change of that function at that point. Now we have three rules that allow us to calculate our derivative. The most tricky of these is the power rule, which says that if
Using our derivative rules, we can now calculate the derivative across the entire function. So the derivative of $f(x) = 3x $ is always 3, and the derivative of $f(x) = x^2 $ is
Finally we saw how the chain rule allows us to break a complicated function up into two, and simply apply the rule of