In this explainer, we will learn how to find the first derivative of a function using combinations of the product, quotient, and chain rules.
Many functions are constructed from simpler functions by combining them in a combination of the following three ways:
- addition and subtraction: ;
- multiplication and division: and ;
- composition: .
Fortunately, there are rules for differentiating functions that are formed in these ways. For addition and subtraction, we can use the linearity of the derivative; for multiplication and division, we have the product rule and quotient rule; and for composition, we can apply the chain rule.
Rules of Differentiation
For differentiable functions and and constants and , we have the following rules:
- Linearity: .
- Product rule: .
- Quotient rule: for , .
- Chain rule: .
Using these rules in conjunction with standard derivatives, we are able to differentiate any combination of elementary functions. Although it is possible to differentiate any combination of elementary functions, it is often not a trivial exercise and it can be challenging to identify the correct rules to apply, the best order to apply them, and whether there are algebraic simplifications that will make the process easier. In this explainer, we will look at a number of examples which will highlight the skills we need to navigate this landscape.
In many ways, we can think of complex functions like an onion where each layer is one of the three ways we can combine functions. To differentiate, we peel off each layer in turn, which will result in expressions that are simpler and easier to differentiate. For example, if we consider the function
we can get lost in the details. Generally, the best approach is to start at our outermost layer.
Hence, for our function , we begin by thinking of it as a sum of two functions,
and , to which
we can apply the linearity of the derivative. In this way, we can ignore the complexity of the two expressions
and simplify the task of finding the derivate by removing one layer of complexity. We can then consider each term
separately and apply a similar approach. For example, for the first expression, we see that we have a quotient;
therefore, we can apply the quotient rule to the quotient of the two expressions
and . Once again, we are ignoring the complexity of the individual expressions
and removing another layer from the function. We can keep doing this until we finally get to an elementary
function that we can differentiate. We can represent this visually as follows.
Notice that all the functions at the bottom of the tree are functions that we can differentiate easily. Hence, we see that, by using the appropriate rules at each stage, we can find the derivative of very complex functions.
We will now look at a few examples where we apply this method. In the first example, we will consider a function defined in terms of polynomials and radical functions.
Example 1: Using the Rules of Differentiation with Rational Functions
Evaluate at if .
Answer
The outermost layer of this function is the negative sign. However, since we can simply take the minus sign outside of the derivative, we need not deal with this explicitly. We therefore consider the next layer which is the quotient. We can apply the quotient rule, by setting and . The derivative of is straightforward: , whereas the derivative of is not as simple. is certainly simpler than ; therefore, we are heading in the right direction. Considering the expression for , we can see that it is the composition of the functions and . We can, therefore, apply the chain rule to calculate the derivative. First, we find the derivatives of and ; at this point, we have derivatives that we can easily evaluate using the power rule. Hence,
Substituting these expressions back into the chain rule, we have
We can now apply the quotient rule as follows:
By expressing the numerator as a single fraction, we have
Finally, we recall that ; therefore,
Substituting in this expression gives
Example 2: Choosing the Best Strategy to Differentiate
Find the derivative of the function .
Answer
Before we dive into differentiating this function, it is worth considering what method we will use because there is more than one way to approach this. Since we can see that is the product of two functions, we could decompose it using the product rule. This would leave us with two functions we need to differentiate: and . Both of these would need the chain rule. Alternatively, we can rewrite the expression for the function in the form . We see that it is the composition of two functions which we can apply the chain rule to; then, we have one function we need the product rule to differentiate.
Therefore, in this case, the second method is actually easier and requires less steps as the two diagrams demonstrate.
We will, therefore, use the second method.
We start by applying the chain rule to . Setting and , we have
To find , we can apply the product rule:
Therefore, applying the chain rule, we have
The last example demonstrated two important points: firstly, that it is often worth considering the method we are going to use before we dive into the details and, secondly, that it is important to consider whether we can simplify our method with the use of some algebraic manipulation; this will not always be possible but it is certainly worth considering whether this is possible before getting lost in the algebra. In the following examples, we will see where we can and cannot simplify the expression we need to differentiate.
Example 3: Using the Rules of Differentiation with Exponential Functions
Find the derivative of the function .
Answer
This function can be decomposed as the product of and . However, it is worth considering whether it is possible to simplify the expression we have for the function. Unfortunately, there do not appear to be any useful algebraic techniques or identities that we can use for this function. Therefore, we will apply the product rule directly to the function. Hence,
We can now evaluate the derivative using the chain rule:
Hence, substituting this back into the expression for , we have
Example 4: Using the Rules of Differentiation with Trigonometric Functions
If , find .
Answer
At the top level, this function is a quotient of two functions and . However, before we dive into the details of differentiating this function, it is worth considering whether we can use any trigonometric identities to simplify the expression. Since we have a sine-squared term, we can use the Pythagorean identity to write this as as follows:
We can now factor the expressions in the numerator and denominator to get We now have a common factor in the numerator and denominator that we can cancel. We can do this since we know that, for to be defined, its domain must not include the points where . Hence, we can assume that on the domain of the function and can consequently cancel this common factor as follows: We now have an expression we can differentiate extremely easily. Hence,
Clearly, taking the time to consider whether we can simplify the expression has been very useful. The alternative method to applying the quotient rule followed by the chain rule and then trying to simplify would involve a lot more steps and therefore has a greater propensity for error.
Example 5: Using the Rules of Differentiation with Logarithmic Functions
Differentiate the function .
Answer
At the outermost level, this is a composition of the natural logarithm with another function. We could, therefore, use the chain rule; then, we would be left with finding the derivative of a radical function to which we could apply the chain rule a second time, and then we would need to finally use the quotient rule. However, before we get lost in all the algebra, we should consider whether we can use the rules of logarithms to simplify the expression for the function. Using the rule that , we can rewrite this expression as
Clearly, this is much simpler to deal with. However, we should not stop here. We can, in fact, use another rule of logarithms, namely, the quotient rule: . This gives us the following expression for :
This expression is clearly much simpler to differentiate than the original one we were given. We can therefore apply the chain rule to differentiate each term as follows:
We can now rewrite the expression in the parentheses as a single fraction as follows:
Key Points
- Using the rules of differentiation, we can calculate the derivatives on any combination of elementary functions.
- It is important to consider the method we will use before applying it. This can help ensure we choose the simplest and most efficient method.
- Generally, we consider the function from the top down (or from the outside in). Hence, at each step, we decompose it into two simpler functions.
- It is important to look for ways we might be able to simplify the expression defining the function. Oftentimes, by applying algebraic techniques, identities, and rules to particular functions, we can produce a simple expression for the function that is significantly easier to differentiate.