Professor Dave here, let’s learn the chain

rule. We know how to take derivatives of polynomials

in standard form, trigonometric functions, as well as simple products and quotients of

these functions. But unfortunately, functions can get more

complicated than this. What if we have a trinomial raised to an exponent? Or a trig function operating on a polynomial? When we have multiple operations happening

at once within a function, in order to take its derivative, we will have to use something

called the chain rule. To see how this works, let’s look at this

function, the square root of (x squared plus one). None of the rules of differentiation that

we have learned so far will help us with this. That’s because this is actually a composite

function. To our input x, we are squaring and adding

one, and then we are taking the square root of all that, which as we recall, means raising

it to the one half power. So we could really say that f of x is (x to

the one half) and g of x is (x squared plus one), and if we call the composite function

capital F of x, in trying to find the derivative of capital F of x, we are actually trying

to take the derivative of f of g of x. The way we do this, according to the chain

rule, is that we find f prime of g of x, and then multiply it by g prime of x. What that means is that moving from the outside

in, we can take the derivative of the function as though this exponent is the only operation,

leaving the inside as it is. But since the inside is another function,

we have to multiply our result by the derivative of what’s inside. So looking at (x squared plus one) to the

one half power, let’s apply the power rule. Now we are used to using the power rule for

positive integer exponents, but don’t worry, we can do this with fractional exponents too,

and it won’t be any different. We just take the exponent and bring it to

the front, and then subtract one from the exponent, so we get one half times this parenthetical

term, which is now raised to the negative one half power. If we recall our rules of exponents, raising

something to a negative exponent is the same as one over that thing raised to the positive

version of that exponent, so this becomes one over the quantity (x squared plus one)

to the one half power, and we know that this simply means the square root, so we can go

back to expressing this as root (x squared plus one), incorporate the one half by putting

two in the denominator, and this is what we get. But now we must remember, according to the

chain rule, we have to multiply this by the derivative of the function inside the parenthetical

as well, and the derivative of (x squared plus one) is two x, so let’s put two x up

top, cancel out the two, and we are left with x over root (x squared plus one). So with the chain rule, when we have multiple

functions happening at once, we differentiate the outer function first, as it operates on

the inner function and keeping the inner function the same, and then we multiply by the derivative

of the inner function. Let’s try a few more for practice. Say we want to get the derivative of the sine

of x squared. So we can clearly see that here there are

two functions operating on x, the outer function is sine, and the inner function is this exponent. So let’s apply the chain rule. The derivative of sine is cosine, so we get

cosine x squared, but then we have to multiply by the derivative of the inner function, x

squared, which gives us two x, so we get two x cosine x squared. Just to see the reverse scenario, what if

we have sine squared of x. Let’s recall that this notation implies

that the function sine of x is being squared, so we can also express that like this, with

sine x in parentheses, being raised to the second power. Now the situation is reversed, and the outer

function involves squaring the input, while the inner function is sine. So let’s take the derivative of the outer

function, which means pulling the two down here to get two sine x. But then we multiply by the derivative of

the inner function, and the derivative of sine is cosine, so we get two sine x cosine

x. Apart from good practice, these two examples

should also prove to you that it is indeed important the order in which we apply the

chain rule, as we do get different answers. It’s the derivative of the outer function

as applied to the inner function, times the derivative of the inner function. Now let’s try some other examples. Take the quantity (x to the fourth minus one)

raised to the fiftieth power. This huge exponent might seem daunting, but

let’s just apply the chain rule. The outer function is this exponent, so we

take the fifty and put it down here, leave what’s inside the parentheses just as it

is, and reduce the exponent to forty nine. This is no different than what we are used

to. But then we multiply by the derivative of

the inner function, and that will be four x cubed, so combining these terms, we get

(two hundred x cubed) times the quantity (x to the fourth minus one) raised to the forty-ninth

power. A little messy perhaps, but not difficult

at all. However, there are instances in which we will

have to combine the chain rule with the power rule or quotient rule. Take for example (x minus one) over (x plus

one) quantity squared. Naturally we need the chain rule. We take the derivative of the outer function,

and we get two times this parenthetical. But now, we must multiply by the derivative

of the inner function, and to do that we need the quotient rule. Let’s save our place in this problem so

that we can come back to it once we find this other derivative, and set up our quotient. That will be (x plus one) times one, minus (x minus one) times one, over x plus one quantity squared. Simplifying the top, and being careful to

distribute this negative sign, we get two over x plus one quantity squared. Now since this is the derivative of this quotient,

we can plug this in back here, where we needed it. We can simplify by combining the 2’s in

the numerator to get four, and since the denominators have the same term, let’s just make this

(x plus one) quantity cubed. And that’s pretty much all we can do. Let’s try another. (X plus three) quantity squared times (x squared

minus four) quantity cubed. This time we will have to use the product

rule and the chain rule, but we will have to use the product rule first. This means the first function times the derivative

of the second, plus the second function times the derivative of the first. But for each derivative, we must use the chain

rule, so let’s expand these portions. For the first derivative, we pull the three

out front and change the exponent to a two, remembering to then multiply by the derivative

of what’s inside, which is two x. For the other, we do the same thing, getting

two times the quantity x plus three, and the derivative of what’s inside is simply one

in this case. From here, most of the work is already done,

so let’s just simplify a little bit until we get two terms. From here we could identify the greatest common

factor of these two terms, and factor it out. Then just distribute everything that’s left

inside to get one term, and this is therefore the most simplified way to express our answer. Let’s do just one more example to illustrate

how crucial the chain rule is. What if we have sine of cosine of tangent

of x. This is a new situation, as we see three functions

all operating at once. But let’s not worry too much, let’s just

apply the chain rule the same way we already have, working from the outside in. The outermost function is sine, so let’s

not worry what sine is operating on, since that won’t change. Just think of it as being equal to U for the

time being. The derivative of sine is cosine, so we get

cosine of U, or the cosine of what was originally in there, so cosine of cosine of tangent x. But then we have to multiply by the derivative

of what was inside, and the derivative of U, or the derivative of cosine of tangent

of x, will itself require the application of the chain rule. So let’s just keep working our way through

this, not touching any of the work we’ve already done, but now evaluating this other

derivative using the chain rule. For this part, the outer function is cosine,

and the derivative of cosine is negative sine, so we get the negative sine of tangent x,

but then we multiply by the derivative of the inner function, so the derivative of tangent

x, and if we remember our derivatives of trig functions from the previous tutorial, that

is equal to secant squared x. So this is what we are left with. All we can do is bring the negative sign to

the front, and we get negative cosine of cosine of tangent x, times sine of tangent x, times

secant squared x. So we can see that even when looking at three,

or four, or literally any number of functions operating all at once, there is nothing new

to apply, it’s all about applying the chain rule as many times as we need to. Of course things can get pretty messy, but

as long as we stay organized, using the right notation and applying the chain rule properly,

we should have no problem getting the right answer. Let’s check comprehension.