Unit 6 Computing derivatives
There are a lot of tools for computing derivatives that are relatively easy to remember and use. These tools are theorems -- they can all be derived from the definition via limits and some computation. You will get familiar enough with these that you will happily use them without thinking. The structure of this chapter is philosophically backwards: we give you nearly all the tools right away, then give arguments and explanations for some of them, postponing some of the arguments and explanations until we have developed a few more tools. We do this because calculus is so much more fun when you know enough do a few computations!
Subsection 6.1 Tools for computing derivatives
There are two kinds of tools for computing derivatives. We'll use the following terminology to keep them straight.
- formulas
- Formulas are statements about the derivative of a particular function. For example, there is a formula for the derivative of the sine function: \(\frac{d}{dx}\sin(x)=\cos(x)\text{.}\)
- rules
- Rules are ways to combine information about derivatives of some functions in order to compute the derivatves of other functions.
The idea will be to leverage the formulas to help us compute the derivative of any function which can be built from our stable of basic functions.
The rules.
If we build a function out of others by adding, subtracting, multiplying, or composing, and we happen to know the derivatives of all the parts, we can express the derivative of the function we've built in terms of the derivatives of the parts.
Proposition 6.1. sum rule.
Let \(f\) and \(g\) be differentiable functions. Then \((f+g)' = f' + g'.\)Proposition 6.2. difference rule.
Let \(f\) and \(g\) be differentiable functions. Then \((f-g)' = f' - g'.\)Proposition 6.3. multiplication by a constant.
Let \(f\) be a differentiable function and \(c\) be a constant. Then \((cf)' = c f'\text{.}\)Checkpoint 74.
Using the three propositions above, as well as formulas you’ve worked out earlier, compute the derivative of \(x - 3 \sqrt{x}\text{.}\)
\(1-\frac{3}{2\sqrt{x}}\)
Proposition 6.4. product rule.
Let \(f\) and \(g\) be differentiable functions. Then \((fg)' = f' g + g' f\text{.}\)Proposition 6.5. quotient rule.
Let \(f\) and \(g\) be differentiable functions. Then for any \(x\) such that \(g(x) \neq 0\text{,}\)Proposition 6.6. chain rule.
Let \(f\) and \(g\) be differentiable functions. Let \(a\) be a real number inside an open interval in the domain of \(g\) such that \(g(a)\) is inside an open interval in the domain of \(f\text{.}\) ThenThe formulas.
We list a few formulas that are either obvious from the definition or are ones you've worked out already.
Proposition 6.7. some easy derivatives.
Let \(c\) be any real constant. Then,Checkpoint 75.
Proposition 6.8. powers and transcendental functions.
In the following list, if no restrictions are given on \(x\text{,}\) then the statement holds for all real \(x\text{.}\)- \begin{equation*} \frac{d}{dx} \; x^n = n x^{n-1} ~~~ \mbox{ when } n \mbox{ is a positive integer} \end{equation*}
- \begin{equation*} \frac{d}{dx} \; x^r = r x^{r-1} ~~~ \mbox{ when } x \neq 0 \mbox{ and } r \mbox{ is any nonzero real number} \end{equation*}
- \begin{equation*} \frac{d}{dx} \; e^x = e^x \end{equation*}
- \begin{equation*} \frac{d}{dx} \; a^x = a^x \cdot \ln a \mbox{ for } a > 0 \mbox{ and all real } x \end{equation*}
- \begin{equation*} \frac{d}{dx} \; \ln x = \frac{1}{x} \mbox{ for } x > 0 \end{equation*}
- \begin{equation*} \frac{d}{dx} \; \sin x = \cos x \end{equation*}
- \begin{equation*} \frac{d}{dx} \; \cos x = - \sin x \end{equation*}
- \begin{equation*} \frac{d}{dx} \; \tan x = \sec^2 x \mbox{ when this is finite} \end{equation*}
- \begin{equation*} \frac{d}{dx} \; \arcsin x = \frac{1}{\sqrt{1-x^2}} \end{equation*}
- \begin{equation*} \frac{d}{dx} \; \arccos x = \frac{-1}{\sqrt{1-x^2}} \end{equation*}
- \begin{equation*} \frac{d}{dx} \; \arctan x = \frac{1}{1+x^2} \end{equation*}
Checkpoint 76.
Checkpoint 77.
Let \(f(x) := x^{-1}\) and \(g(x) := x^3\text{.}\) This exercise takes you step by step through a test of the product rule.
What is \(f'\text{?}\)
What is \(g'\text{?}\)
what is \((f')(g')\text{?}\)
What is \(fg\text{?}\)
What does the product rule give you for \((fg)'\text{?}\)
What do you get for \((fg)'\) by first multiplying, then using rule 1 from Proposition 6.8(the power rule)?
You are probably pretty experienced at taking apart algebraic expressions into sums and differences of products and quotients of simpler expressions. Here are some more exercises to check that you can do this and then apply the differentiation rules above.
Checkpoint 78.
Use the sum, difference, product and quotient rules, along with derivative formulas given in Proposition 6.8, to evaluate \(f'(x)\) in each of these cases.
\(f(x) := x^3 e^x\)
\(f(x) := \frac{1}{x^{2.5}}\)
\(f(x) := x \ln x - x\)
\(f(x) := x \arcsin x\)
Taking apart algebraic expressions into compositions of functions, as is needed for the chain rule, can be a little trickier.
Example 6.9.
In order to differentiate \((1+x^2)^{1/3}\) you need to recognize this as a composition \(f(g(x))\) with \(f(x) = x^{1/3}\) and \(g(x) = 1 + x^2\text{.}\) The chain rule tells us that the derivative of \((1+x^2)^{1/3}\) at \(x=a\) will be given by
The derivative of \(x^{1/3}\) is \((1/3) x^{-2/3}\) be the power rule (the second identity in Proposition 6.8); the derivative of \(1+x^2\) is \(0 + 2x = 2x\) by the sum rule and the power rule. This shows (6.1) to equal
The next few exercises check on your understanding of the chain rule. The first two tell you how to choose \(f\) and \(g\text{.}\) The last two do not.
Checkpoint 79.
Let \(f(x) = e^x\) and \(g(x) ={-1x}\text{.}\) Use the chain rule to evaluate the derivative of \({e^{-1x}}\text{.}\)
\(-1e^{-1x}\)
Checkpoint 80.
Let \(f(x) = {\sqrt{x}}\) and \(g(x) = {1+x^{2}}\text{.}\) Use the chain rule to evaluate the derivative of \({\sqrt{1+x^{2}}}\text{.}\)
\(\frac{1}{2\sqrt{1+x^{2}}}\cdot 2x^{1}\)
Checkpoint 81.
We’ll evaluate \(h'(x)\) where \(h := \ln (1 + x^2)\text{.}\)
To do so, first make a choice of functions \(f\) and \(g\) such that \(h(x) = f(g(x))\text{.}\) \(f(t)=\) \(g(x)=\)
Now use the chain rule to find \(h'(x)\text{.}\)
Checkpoint 82.
We’ll evaluate \(h'(x)\) where \(h := e^{-x^2/2}\text{.}\)
To do so, first make a choice of functions \(f\) and \(g\) such that \(h(x) = f(g(x))\text{.}\) \(f(t)=\) \(g(x)=\)
Now use the chain rule to find \(h'(x)\text{.}\)
Subsection 6.2 Arguments and proofs
Proofs are for convincing others, as well as for deciding whether you know something for sure, in all cases. The next two exercises ask for opinions on whether or not a proof is needed. There's no right answer, but we expect you to give a good sense of why or why not.
Checkpoint 83. the sum rule: obvious or not?
The sum rule, in an applied setting, says something like this. Suppose Dick’s net worth at time \(t\text{,}\) call it \(f(t)\text{,}\) is increasing at a certain rate, and Jane’s, call it \(g(t)\text{,}\) is increasing at another rate. Then their joint fortune (they are married) is increasing at a rate that is the sum of the two individual rates. Stated in these terms, is the sum rule obvious or does it require proof?
Checkpoint 84. the chain rule: obvious or not?
In applied terms, suppose \(f(t)\) is the length in meters of a turtle that is \(t\) days old and \(g(t) = 3.3 f(t)\) is the length in feet. Then \(g'(t)\text{,}\) the rate of increase of length in feet per day, should be 3.3 times \(f'(t)\text{,}\) the rate of increase in meters per day. Obvious or not?
In case some of you answered that it was not obvious, here is a mathematical proof. In most of the upcoming proofs, we need to use the definition of the derivative as a limit of difference quotients We don't need to use the \(\varepsilon\)-\(\delta\) definition of limit, just known facts about limits.
Let \(h = f+g\text{.}\) By definition
The difference quotient on the right-hand side simplifies to \(\frac{f(x) - f(a)}{x-a} + \frac{g(x) - g(a)}{x-a} \, .\) This is a sum of two things. The limit of the sum is the sum of limits, therefore
As you can see, the logic broke this down into small steps, justified by facts we have accumulated. The proof didn't add a whole lot to our understanding, although it does help to nail down the fact that this holds whenever \(f'(a)\) and \(g'(a)\) exist, without exceptions for when one of them is zero, or undefined for values other than \(a\text{,}\) or anything like that.
We'll ask you to do one of these on your own, then not bother you with proofs of things that are borderline obvious.
Checkpoint 85.
Prove Proposition 6.3. It's pretty similar to the proof for the sum rule but a little easier.
A close up look at the product rule.
We mentioned earlier what units a derivative has, but never discussed why. Now is a good time. Taking the limit of an expression gives something with the same units. The derivative is the limit of a difference quotient \((f(x+h) - f(x)) / h\text{.}\) The numerator is the difference between two things with the same units, namely the units of the value of \(f\text{.}\) The denominator has units of the argument of \(f\text{.}\) So the difference quotient has units of the value of \(f\) divided by the argument of \(f\text{.}\) For example, if \(f(t)\) is distance traveled in the time \(t\text{,}\) then \(f'\) has units of distance per time (such as MPH).
Why is \((fg)'\) not equal to \(f' g'\text{?}\) There are many reasons, one of which is the units. In an application, the values of \(f\) and \(g\) might have different units, but if both are being differentiated with respect to \(x\) then they must have the same input units. The units of \((fg)'\) are, as we have just seen, units of \(f\) times units of \(g\) divided by units of \(x\text{,}\) the argument. Unfortunately \(f' g'\) has the units of \(f/x\) times the units of \(g/x\text{,}\) so one too many units of \(x\) in the denominator.
We now present three arguments for the product rule. When we're done, we'll take a poll of which is most convincing.
If \(f\) is a constant, so all the change in the product \(fg\) comes from changes in \(g\text{,}\) then we have seen \((fg)' = f \cdot g'\text{.}\) If \(g\) is a constant, then similarly, \((fg)' = g f'\text{.}\) In reality, both are changing, so the rate of change of the area is the sum of these two individual rates.
Suppose \(f(t)\) is the length in meters of a growing rectangular blob at time \(t\) seconds, and \(g(t)\) is its width. How fast is the area growing at time \(t\text{?}\)
Figure 6.10 shows the classical pictorial argument. When time increases by a small quantity \(\Delta t\text{,}\) both \(f\) and \(g\) increase by small quantities, which we respectively call \(\Delta f\) and \(\Delta g\text{,}\) and the area increases by \(f \Delta g\) plus \(g \Delta f\) plus \((\Delta f) (\Delta g)\text{.}\) We know that \(\Delta f\) is approximately \(f'(t) \Delta t\text{,}\) because in the limit as \(\Delta t \to 0\text{,}\) the ratio \(\Delta f / \Delta t\) converges to \(f'(t)\text{.}\) Similarly, \(\Delta g \approx g'(t) \Delta t\text{.}\) From the picture, you can see that \(\Delta (fg) = f \Delta g + g \Delta f + (\Delta g) (\Delta f)\text{.}\) So
Taking limits on the right hand side as \(\Delta t \to 0\) gives \(f' g + g' f + \lim_{\Delta t \to 0} (\Delta f)(\Delta g) / \Delta t\text{.}\) This last limit should be zero. Why? Say \(f'(t) = a\) and \(g'(t) = b\text{.}\) Then \(\Delta f \approx a \Delta t\) and \(\Delta g \approx b \Delta t\text{,}\) so
which is zero.
The simplest algebraic proof of the product rule is a bit more out of the blue because it relies on this trick:
and hence
The trick was, we added and subtracted \(f(x+h) g(x)\) in order to be able to separate the original difference quotient into two pieces, both of which look a function times a simpler difference quotient. Taking limits and using the fact that limits of sums are sums of limits, and the same for products, gives
Checkpoint 86.
Because \(f\) and \(g\) are differentiable, they are continuous (see Checkpoint 4.11 and Checkpoint 7.6). The formal proof above uses that fact that one of the two is continuous at \(x\) but does not use continuity of the other. Which continuity fact is needed?
We use the fact that \(f\) is continuous.
We use that \(g\) is continuous.
We use that both are continuous.
We don't need to use continuity of either function.
Where is this continuity fact used?
To handle \(\lim_{h \to 0} \frac{f(x+h) - f(x)}{h} \text{.}\)
To handle \(\lim_{h\rightarrow 0}\frac{g(x+h) - g(x)}{h}\text{.}\)
To handle \(\lim_{h\rightarrow 0}f(x+h)\text{.}\)
To handle \(\lim_{h \to 0} g(x)\text{.}\)
A physics proof of the derivative of the sine function.
Suppose a toy car is moving around a circular track of radius one meter, so that its speed is constant 1 meter per second; the coordinates of the point are \(x = \cos t, y = \sin t\text{.}\) By definition of radian, its angle with respect to the horizontal increases at a rate of one radian per second. The northward (\(y\)-direction) speed is the derivative of \(\sin t\text{.}\) Suppose at time \(x\) a gate opens up and the car stops turning to stay on the track and coasts straight onward at its present speed of 1. Its northward speed during the time \([x,x+1]\) is the derivative of the sine function at time \(x\text{.}\) To evaluate this, we just have to check how far northward the car went from time \(x\) to \(x+1\text{.}\) This is just analytic geometry. The car goes one unit tangent to the circle during this time interval from the point \((\cos x , \sin x)\) (B in Figure 6.11) to the point \((\cos t - \sin t, \sin t + \cos t)\) (A in the figure). Therefore the derivative of \(\sin\) is \(\cos\text{.}\) For free, we also get (by looking at the \(x\) coordinate) that the derivative of \(\cos\) is \(-\sin\text{.}\)
The chain rule.
The easiest way to make sense of the chain rule is in terms of related rates. Think of \(x, u\) and \(y\) as physical quantities related by rules. If you change \(x\text{,}\) it changes \(u\text{.}\) The specific rule is \(u = g(x)\text{.}\) If you change \(u\) it changes \(y\text{.}\) The specific rule is \(y = f(u)\text{.}\)
What does this mean quantitatively? The rate of change of \(u\) with respect to \(x\) is \(g'(x)\text{.}\) This is illustrated on the left side of Figure 6.13, where the infinitesimal changes \(dx\) and \(du\) are depicted. The slope of the hypotenuse of the small triangle is \(g'(x)\text{,}\) where in the diagram, the value of \(x\) is roughly \(1/2\text{.}\) On the right side of the figure, we see that this small change in \(u\) leads to a proportionate small change in \(y\text{.}\) The ratio, \(dy/du\) is equal to \(f'(u)\text{.}\) One question remains: at what value of \(u\) is this ratio evaluated? In the figure, it appears \(u \approx 1/8\text{.}\) More precisely, if we originally took \(x\) to be \(1/2\text{,}\) the \(u\) value will be \(f(1/2)\text{.}\) In other words, the value from the \(u\)-axis (vertical in the first graph) is copied to the second graph (where the \(u\)-axis is now the horizontal axis). In other words, \(f'\) is evaluated at \(u\text{,}\) which is \(g(x)\text{.}\) Thus \(dy/dx = du/dx \cdot dy/du |_{u = g(x)}\text{.}\)
If we want to make this into a formal proof, we might start by writing
If \(g(a+h)\) could be replaced by the tangent line approximation \(g(a) + h g'(a)\) then the proof would finish easily: letting \(\varepsilon := h g'(a)\text{,}\)
It is indeed true that the tangent line approximation is close enough to \(g\) itself to make this work, but proving that takes a trickier argument than we want to go into here.