3 minutes read

You already know how to take derivatives of trigonometric functions, polynomials and simple product or quotients of these functions. But you can be dealing with more complicated functions, such as f(x)=(x52x+11)7f(x)= (x^5 -2x+11)^7 or f(x)=tan(cosx2)3f(x) = \tan (\cos x^2)^3. How can you take derivatives of such functions? In this topic, you are going to learn about it.

Composite functions

A composite function is a function that is written inside another function. For example, a function f(g(x))f(g(x)) is a composite function of f(g)f(g) and g(x)g(x). A function f(g(x))f(g(x)) is read as "ff of gg of xx".

The function g(x)g(x) is called an inner function. The function f(g)f(g) is called an outer function.

So, the function

F(x)=(x52x+11)7F(x)= (x^5 -2x+11)^7is a composite function of the functions f(g)=g7f(g) = g^7 and g(x)=x52x+11g(x) = x^5-2x+11. So, F(x)=f(g(x))F(x) = f(g(x))Also, we denote this composite function as (fg)(x)(f \circ g)(x). Thus,

f(g(x))=(fg)(x)f(g(x)) = (f \circ g)(x)

The chain rule

When we have a composite function, we will use the chain rule in order to take its derivative: if we have F(x)=f(g(x))F(x) = f(g(x)), then

F(x)=[f(g(x))]=f(g(x))g(x)F'(x) = [f(g(x))]'=f'(g(x))\cdot g'(x)To see how it works, let's look at the functionF(x)=(x4+2)13F(x) = (x^4+2)^\frac{1}{3}The function F(x)F(x) is a composite function:

f(g)=g13 and g(x)=x4+2, so F(x)=f(g(x))f(g) = g^{\frac{1}{3}} \ \text{and} \ g(x) = x^4 + 2, \ \text{so} \ F(x) = f(g(x))If we want to find a derivative of F(x)F(x), we use the chain rule:

F(x)=((x4+2)13)=13(x4+2)131(x4+2)F'(x) = \left((x^4+2)^\frac{1}{3}\right)' = \dfrac{1}{3}(x^4+2)^{\frac{1}{3}-1} \cdot (x^4+2)'That means that moving from the outside in, we can take the derivative of the function as though this exponent to 13\dfrac{1}{3} is the only operation, leaving the inside as it is. But since the inside function (i.e x4+2x^4 + 2) is another function, we have to multiply our result by the derivative of what's inside. We apply the power rule for outer function. We have used the power rule for positive integer exponents, but we can do this with fractional exponents too. We take the exponent and bring it to the front, and then subtract one from the exponent.

Now we take a derivative of an inner function: (x4+2)=4x3(x^4 + 2)' = 4x^3Now we can write down the final result:

F(x)=((x4+2)13)=13(x4+2)234x3=4x33(x4+2)23F'(x) = \left((x^4+2)^\frac{1}{3}\right)' = \dfrac{1}{3}(x^4+2)^{-\frac{2}{3}} \cdot 4x^3=\dfrac{4x^3}{3\sqrt[3]{(x^4 + 2)^2}}So, with the chain rule, when we have a composite function, 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.

Order matters

Say we want to get the derivative of the function

F(x)=cos(x3)F(x) = \cos (x^3)We see that here there are two functions operating on xx: the outer function is cosine and the inner function is exponent. So, let's apply the chain rule:

F(x)=sin(x3)(x3)=sin(x3)3x2=3x2sin(x3)F'(x) =- \sin (x^3) \cdot (x^3)' = -\sin(x^3) \cdot 3x^2 = -3x^2\sin(x^3)Now let's look at the function G(x)=cos3xG(x) = \cos^3xHere the situation is reversed: the outer function involves the third degree of the input, while the inner function is cosine. Let's take the derivative of the outer function, which means pulling the 3 down to get 3cos2x3\cos^2x, and then we multiply it by the derivative of the inner function: the derivative of cosx\cos x is sinx-\sin x, soG(x)=3cos2x(sinx)=3cos2xsinxG'(x) = 3\cos^2 x \cdot (-\sin x) = -3\cos^2 x \sin x

Notice that the order in which we apply the chain rule is important.

One more example

Consider the function F(x)=cos(sin(cotx))F(x) = \cos (\sin (\cot x))Here we see three functions all operating at once. Let's just apply the chain rule the same way we have already done it: the outermost function is cosine. So,

F(x)=sin(sin(cotx))(sin(cotx))F'(x) = -\sin (\sin (\cot x)) \cdot (\sin (\cot x))'Now let's apply the chain rule again:

F(x)=sin(sin(cotx))(sin(cotx))=sin(sin(cotx))cos(cotx)cotxF'(x) = -\sin (\sin (\cot x)) \cdot (\sin (\cot x))' = -\sin (\sin (\cot x)) \cdot \cos (\cot x) \cdot \cot' xWe know thatcotx=1sin2x\cot 'x = - \dfrac{1}{\sin^2 x}

Therefore, in the end we can write

F(x)=sin(sin(cotx))cos(cotx)(1sin2x)=sin(sin(cotx))cos(cotx)sin2xF'(x) = -\sin (\sin (\cot x)) \cdot \cos (\cot x) \cdot \left(-\dfrac{1}{\sin^2 x}\right) = \dfrac{\sin (\sin (\cot x)) \cdot \cos (\cot x) }{\sin^2 x}Thus, we can use the chain rule as many times as necessary.

Conclusion

In this topic, you have learned about derivatives of composite functions. A composite function is a function that is written inside another function. You have studied the chain rule, using which you can find the derivative of such functions.

26 learners liked this piece of theory. 1 didn't like it. What about you?
Report a typo