The Derivative, Part 7

So let’s recap: we have a rule to find derivatives of basic functions using a table, a rule to handle a function that is multiplied by a constant, a rule to handle the addition or subtraction of two (or more) functions, a rule to handle the multiplication of two (or more) functions, and a rule to handle the division of two functions. I also did an example where several of these rules can be used finding the derivative of a single function. You would think that this would exhaust all the possibilities and that you can now differentiate any function in the known universe. But alas, there is one more, perhaps the most powerful, rule yet to be presented.

This new rule is called the chain rule, so called because it allows you to find the derivative of a function, of a function, of a function, and so on.

Now there is a textbook way to present this rule and an intuitive way which I like to use. I find that the textbook approach can be confusing because there are several variables variables to keep track of. I will present both ways so that you may see the connection between the two and have a better understanding of the chain rule.

The textbook approach to the chain rule is a bit easier to see if we forego functional notation and go back to using y. However, whenever you have a function of a function f[g(x)], the chain rule is to be used. Functions like this are called composite functions. For example,

$f( x) =\text{sin}\left( x^{2}\right)$

Here, g(x) = x² and f(x) = sin(x). So f(x²) = sin(x²).

In the textbook approach you let u be the inner function (that is the function you are using as the argument for the outer function) and you let y be the function after you replace the inner function with u. I will give an explanation later on how to identify the inner and outer functions if that is not clear.

So in this case, u = x², so y = sin(u). The textbook chain rule is

$\frac{dy}{dx} =\frac{dy}{du} \times \frac{du}{dx}$

This may look scary but let me repeat this rule in English: the derivative of a composite function is the derivative of y with respect to u times the derivative of u with respect to x. So in our example, dy/du = cos(u) (using the table) and du/dx = 2x. Multiplying these together and replacing u with its definition, we get

$\frac{dy}{dx} =\text{cos}( u)\times 2x\ =\ 2x\ \text{cos}( x^{2})$

So to further explain what inner and outer functions are, suppose you wanted to take our example function and calculate its value for a certain number for x. The first thing you would do is take that number and square it. The squaring function is the inner function since it is the first thing you would do. Then you would take the sine of that squared number. The sine function then is the outer function as that is the last operation you would do.

So I explain the chain rule as follows: Take the derivative of the outer function of ‘something’ keeping the ‘something’ intact, but since the ‘something’ is not just ‘x‘ you need to multiply the result by the derivative of that ‘something’.

In this example, the ‘something’ is x². So the derivative of the sine of that ‘something’ is cos(x²), but I then need to multiply this by the derivative of the ‘something’. The derivative of x² is 2x, so the result is 2x cos(x²).

So now let’s reverse the roles of the the inner and outer functions. Consider the derivative of [sin(x)]². A very common shortcut notation for the square of a trig function like this is [sin(x)]² = sin²(x). Again, imagine actually calculating this for a particular value of x. You would first take the sine of that number (the inner function) then square the result (the outer function). We know that the derivative of the square of ‘something’ is 2 times that ‘something’ to the first power which in this case is 2 sin(x). But to compensate for this simplification, we need to multiply the result by the derivative of that ‘something’. In this case, the derivative of sin(x) is cos(x), so the final answer is 2 sin(x)cos(x).

Now to get comfortable with this, we need to do some more examples. I will do that in my next post.