Lesson Video: The Chain Rule | Nagwa Lesson Video: The Chain Rule | Nagwa

Lesson Video: The Chain Rule Mathematics • Second Year of Secondary School

Join Nagwa Classes

Attend live General Mathematics sessions on Nagwa Classes to learn more about this topic from an expert teacher!

In this video, we will learn how to find the derivatives of composite functions using the chain rule.

15:25

Video Transcript

In is video, we will learn how to differentiate composite functions by applying the chain rule. We will see how to apply this to simple functions initially. And then, we’ll consider more complex functions such as trigonometric and reciprocal trigonometric functions.

Firstly, a reminder of what composite functions are. They are essentially functions of a function. Suppose we have two functions, 𝑓 of π‘₯ equals two π‘₯ plus five and 𝑔 of π‘₯ equals π‘₯ cubed. The composite functions 𝑓 of 𝑔 of π‘₯ and 𝑔 of 𝑓 of π‘₯ are what we get if we composed these two functions in either order. We apply one, and then we apply the other.

𝑓 of 𝑔 of π‘₯ means we applied 𝑔 first, giving π‘₯ cubed. And then, we take this as our input for the function 𝑓, which will give two π‘₯ cubed plus five. 𝑔 of 𝑓 of π‘₯, however, is the composite function we would get if we apply 𝑓 first to give two π‘₯ plus five and then take this as our input to the function 𝑔, which would give two π‘₯ plus five all cubed. And if we distribute the parentheses and simplify, this gives eight π‘₯ cubed plus 60π‘₯ squared plus 150π‘₯ plus 125.

So, we know how to compose functions. But what about finding their derivatives? Well, in this case, if you’re asked to find the derivatives of either 𝑓 of 𝑔 of π‘₯ or 𝑔 of 𝑓 of π‘₯, it wouldn’t be too bad. Because we could compose the functions first, manipulate them algebraically, and then differentiate the resulting polynomial.

But suppose, instead, the power of π‘₯ in the function 𝑔 of π‘₯ had been 10 or 20 rather than just three, it would be extremely time consuming and tedious to distribute all these parentheses in order to give a polynomial. So, it would be much more helpful for us to have a rule that allows us to differentiate a composite function. And indeed, there is one. It’s called the chain rule.

We’ll illustrate the chain rule by first finding the derivative of the composite function 𝑔 of 𝑓 of π‘₯. So, we’ve defined the functions 𝑓 of π‘₯ and 𝑔 of π‘₯ to be two π‘₯ plus five and π‘₯ cubed, respectively. And we saw that the composite function 𝑔 of 𝑓 of π‘₯ was two π‘₯ plus five all cubed, which simplifies to eight π‘₯ cubed plus 60π‘₯ squared plus 150π‘₯ plus 125. Now let’s consider finding the derivative of this function.

To do so, we need to recall the power rule, which tells us that the derivative with respect to π‘₯ of π‘Ž, that’s a constant, multiplied by π‘₯ to the power of 𝑛 is π‘Žπ‘›π‘₯ to the power of 𝑛 minus one. And we recall also that in order to find the derivative of a sum or difference, we can just differentiate each term separately and then add them together.

So, differentiating 𝑔 of 𝑓 of π‘₯ then gives the derivative 𝑔 of 𝑓 of π‘₯ prime, which is 24π‘₯ squared plus 120π‘₯ plus 150. Remember, the derivative of a constant is just zero. So, when we differentiate that term of plus 125, it just gives zero. Now let’s see if we can manipulate this derivative to see if we can identify any relationship with the derivatives of 𝑓 and 𝑔 individually.

We’ll first take out a common factor of six to give six multiplied by four π‘₯ squared plus 20π‘₯ plus 25. We may then notice that four π‘₯ squared plus 20π‘₯ plus 25 is actually a perfect square. It’s equal to two π‘₯ plus five all squared. And as two π‘₯ plus five is our expression for 𝑓 of π‘₯, this is actually equal to 𝑓 of π‘₯ squared. But what about that six? Well, six is equal to two times three. So, we can write this whole derivative as two times three times 𝑓 of π‘₯ all squared. But how does this help?

Well, to see this, we need to find the derivatives of 𝑓 and 𝑔. Applying the power rule, we see that 𝑓 prime of π‘₯ is equal to two and 𝑔 prime of π‘₯ is equal to three π‘₯ squared. So, that two in our derivative of the composite function is the same as 𝑓 prime of π‘₯. Now three times 𝑓 of π‘₯ all squared is actually the derivative of 𝑔 evaluated at 𝑓 of π‘₯. 𝑔 prime of π‘₯ is three π‘₯ squared. So, 𝑔 prime of 𝑓 of π‘₯ is three 𝑓 of π‘₯ squared.

So, what have we found? Well, for this example, we found that the derivative of 𝑔 of 𝑓 of π‘₯ is equal to the derivative of 𝑓, that’s the derivative of the inner function, multiplied by the derivative of 𝑔, that’s the outer function, with the inner function still inside. Now this is an illustration of the chain rule. It’s not a proof but that is beyond the scope of what we’re going to look at in this video.

So, the chain rule then, it tells us that the derivative of the composite function 𝑔 of 𝑓 of π‘₯ is equal to 𝑓 prime of π‘₯ multiplied by 𝑔 prime of 𝑓 of π‘₯. We can also express the chain rule using Leibniz’s notation. If 𝑦 is equal to 𝑔 of 𝑓 of π‘₯, and we let 𝑒 equal 𝑓 of π‘₯ so that 𝑦 becomes 𝑔 of 𝑒, a function of 𝑒, then d𝑦 by dπ‘₯ is equal to d𝑦 by d𝑒 multiplied by d𝑒 by dπ‘₯.

This may look quite complicated, but it’s actually a relatively straightforward process, as we’ll see in our examples. Leibniz’s notation is really helpful because it makes the chain rule a little bit more intuitive. Remember that finding derivatives is all about small changes in π‘₯. So, let’s allow Δ𝑒 to represent a small change in 𝑒 as a result of a small change in π‘₯.

In order to find the derivative of 𝑦 with respect to π‘₯ d𝑦 by dπ‘₯, we consider the difference quotient Δ𝑦 by Ξ”π‘₯. We see that by multiplying both the numerator and denominator by Δ𝑒, which must be nonzero, and then reordering the terms, we get Δ𝑦 over Δ𝑒 multiplied by Δ𝑒 by Ξ”π‘₯. As Ξ”π‘₯ tends to zero, so will both Δ𝑒 and Δ𝑦, giving d𝑦 by dπ‘₯ equals d𝑦 by d𝑒 multiplied by d𝑒 by dπ‘₯. That is the chain rule. The chain rule allows us to differentiate a wide class of complex functions. Let’s look at some examples.

Find the first derivative of the function 𝑦 equals five π‘₯ squared minus six to the power of six.

Now we see that this is an example of a composite function. If we consider the first function to be five π‘₯ squared minus six and the second to be π‘₯ to the power of six. We take five π‘₯ squared minus six as the input to our second function, giving five π‘₯ squared minus six all to the power of six. As this is a composite function, we can apply the chain rule.

The chain rule tells us that if 𝑦 is a function of 𝑒 and 𝑒 is a function of π‘₯, then d𝑦 by dπ‘₯ is equal to d𝑦 by d𝑒 multiplied by d𝑒 by dπ‘₯. So, we need to decide how we’re going to define the function 𝑒. Well, we take 𝑒 to be our first function. It’s the part inside the parentheses, 𝑒 equals five π‘₯ squared minus six. 𝑦, therefore, becomes a function of 𝑒. 𝑦 equals 𝑒 to the sixth, and 𝑒 is a function of π‘₯.

We need to find both d𝑦 by d𝑒 and d𝑒 by dπ‘₯, which we can do by applying the power rule. In the case of the d𝑦 by d𝑒, we just need to think of all the π‘₯’s in the power rule as being 𝑒’s. We have then that d𝑦 by d𝑒 is equal to six 𝑒 to the five, and d𝑒 by dπ‘₯ is equal to 10π‘₯. We write down the chain rule and then make the relevant substitutions, giving d𝑦 by dπ‘₯ is equal to six 𝑒 to the five multiplied by 10π‘₯.

Now here’s a really important point. That derivative of 𝑦 with respect to π‘₯ must be in terms of π‘₯, and, at the moment, we still have the variable 𝑒 involved. So, we must make sure that we reverse our substitution. 𝑒 is equal to five π‘₯ squared minus six, so we have six multiplied by five π‘₯ squared minus six to the power of five multiplied by 10π‘₯. Simplifying then, we have that the first derivative of the function 𝑦 equals five π‘₯ squared minus six to the power of six is 60π‘₯ multiplied by five π‘₯ squared minus six to the power of five.

Now this illustrates a really powerful application of the chain rule, in fact, a general rule for finding the derivative of a bracket raised to a power. If we express the derivative as 10π‘₯ multiplied by six multiplied by five π‘₯ squared minus six to the power of five, then we see what we have is the derivative of the bracket, or the derivative of what’s inside the parentheses, that’s 10π‘₯, multiplied by the original power, six, multiplied by that bracket with the power reduced by one from what it was originally.

This gives us the chain rule extension to the power rule. This tells us that if we have a function 𝑓 of π‘₯ raised to a power, then the derivative is equal to 𝑓 prime of π‘₯, that’s the derivative of what’s inside the parentheses, multiplied by 𝑛 and then multiplied by 𝑓 of π‘₯ with the power reduced by one, 𝑓 of π‘₯ to the 𝑛 minus one. This is particularly useful if we have really high powers. So, let’s see how we can apply this rule to another example.

Determine the derivative of 𝑦 equals negative two π‘₯ squared minus three π‘₯ plus four to the power of 55.

Now this is where we really see the importance of the chain rule. When we have an exponent as high as 55, we certainly don’t want to attempt to distribute all the parentheses. Instead, we’re going to use the chain rule extension of the power rule, which tells us that the derivative of 𝑓 of π‘₯ to the 𝑛 is 𝑓 prime of π‘₯ multiplied by 𝑛 multiplied by 𝑓 of π‘₯ to the 𝑛 minus one.

So, 𝑓 of π‘₯ will be that function inside the parentheses, negative two π‘₯ squared minus three π‘₯ plus four. We can apply the power rule to differentiate 𝑓 of π‘₯, giving negative four π‘₯ minus three. Now we can work out d𝑦 by dπ‘₯. It’s equal to 𝑓 prime of π‘₯, that’s negative four π‘₯ minus three, multiplied by 𝑛, that’s 55, multiplied by 𝑓 of π‘₯ to the power of 𝑛 minus one, that’s negative two π‘₯ squared minus three π‘₯ plus four to the power of 54.

There’s no need to expand the parentheses. So, we’ve found that d𝑦 by dπ‘₯ is equal to 55 multiplied by negative four π‘₯ minus three multiplied by negative two π‘₯ squared minus three π‘₯ plus four to the power of 54. And we’ve done this by applying the chain rule extension to the power rule.

We can also apply the chain rule more than once within the same problem. So, let’s consider an example of this.

Find the first derivative of the function 𝑦 equals the square root of eight π‘₯ minus sin of nine π‘₯ to the power of eight.

Here we have 𝑦 is equal to the square root of another function, so we have a composite function. We’re, therefore, going to apply the chain rule. We’re going to define 𝑒 to be the function underneath the square root, so 𝑒 is equal to eight π‘₯ minus sin of nine π‘₯ to the power of eight. Then, 𝑦 is equal to the square root of 𝑒, which we can express using index notation as 𝑒 to the power of one-half.

The chain rule tells us that d𝑦 by dπ‘₯ is equal to d𝑦 by d𝑒 multiplied by d𝑒 by dπ‘₯. So, we need to find each of these derivatives. d𝑦 by d𝑒 is relatively straightforward. Using the power rule, we get one-half 𝑒 to the power of negative one-half. For d𝑒 by dπ‘₯, the derivative of eight π‘₯ is just eight. But what about the derivative of sin of nine π‘₯ to the power of eight?

We actually need to apply the chain rule again. We can let 𝑔 equal this function. And we can change the notation a little to write it as sin nine π‘₯ to the power of eight. It’s an equivalent notation, but it might it make it a little clearer how we’re going to find the derivative.

We recall the chain rule extension to the power rule, which told us that if we had a function 𝑓 of π‘₯ raised to a power 𝑛, then its derivative was 𝑓 prime of π‘₯ multiplied by 𝑛 multiplied by 𝑓 of π‘₯ to the power of 𝑛 minus one. Here, we have a function, sin of nine π‘₯ raised to a power eight, so we can apply the chain rule extension to the power rule. We need to recall one more rule which is that the derivative with respect to π‘₯ of sin π‘Žπ‘₯ is π‘Ž cos π‘Žπ‘₯.

So, we begin. The derivative of the part inside the parentheses is nine cos nine π‘₯. Then, we multiply by the power eight. And then, we have the function inside the parentheses written out again, but with the power reduced by one. Simplifying gives 72 cos nine π‘₯ sin to the power of seven nine π‘₯. So, now that we found both d𝑦 by d𝑒 and d𝑒 by dπ‘₯, we can substitute into the chain rule.

We have then that d𝑦 by dπ‘₯ is equal to a half 𝑒 to power of negative a half multiplied by eight minus 72 cos nine π‘₯ sin nine π‘₯ to the power of seven. We must also remember to replace 𝑒 in terms of π‘₯. So, 𝑒 is equal to eight π‘₯ minus sin of nine π‘₯ to the power of eight. We’ll also simplify the fractions. Dividing by that denominator of two leaves coefficients of four and 36 in the numerator.

And we recall also that 𝑒 to the power of negative a half is equal to one over root 𝑒. So, our derivative d𝑦 by dπ‘₯ simplifies to four minus 36 cos nine π‘₯ sin nine π‘₯ to the power of seven all over the square root of eight π‘₯ minus sin nine π‘₯ to the power of eight.

So, we’ve seen within this question that we can apply the chain rule more than once within the same problem. In fact, we can apply it as many times as is necessary.

Let’s remind ourselves then of some of the key points that we’ve seen in this video. The chain rule is useful for differentiating composite functions, that’s functions of other functions. If 𝑦 is equal to the composite function at 𝑔 of 𝑓 of π‘₯, then d𝑦 by dπ‘₯ is equal to 𝑓 prime of π‘₯, that’s the derivative of the inner function, multiplied by 𝑔 prime of 𝑓 of π‘₯. That’s the derivative of the outer function with the inner function still inside.

We’ve also seen the that if we make the substitution 𝑒 equals 𝑓 of π‘₯, then 𝑦 becomes a function of 𝑒. And the chain rule can be expressed as d𝑦 by dπ‘₯ is equal to d𝑦 by d𝑒 multiplied by d𝑒 by dπ‘₯. We find the derivative of 𝑦 with respect to 𝑒 and multiply by the derivative of 𝑒 with respect to π‘₯. We must make sure that we undo our substitution at the end, so that d𝑦 by dπ‘₯ is in terms of π‘₯ only.

We’ve also seen the chain rule extension to the power rule, which tells us that the derivative of a function 𝑓 of π‘₯ to the power of 𝑛 is 𝑓 prime of π‘₯ multiplied by 𝑛 multiplied by 𝑓 of π‘₯ to the 𝑛 minus one. Finally, we saw that we can apply the chain rule as many times as we like within a particular problem. The chain rule is a really powerful tool. And it opens up a really wide class of functions which we’re able to differentiate.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy