1.5. Rules for derivatives#
Some useful rules for derivatives to apply are:
Rule |
\(f(x)\) |
\(f'(x)\) |
---|---|---|
Constant |
\(k\) |
\(0\) |
Power |
\(x^n\), \(n \ne 0\) |
\(nx^{n-1}\) |
Multiple |
\(k u(x)\) |
\(k u'(x)\) |
Sum |
\(u(x) + v(x)\) |
\(u'(x) + v'(x)\) |
Difference |
\(u(x) - v(x)\) |
\(u'(x) - v'(x)\) |
Exponential |
\(a^x\) |
\(a^x \ln a\) |
Logarithm |
\(\log_a x\) |
\(\dfrac{1}{x \ln a}\) |
Note that two special cases of the last two derivatives occur when \(a = e\):
\(\displaystyle f(x) = x^3\)
Solution
(1.71)#\[\begin{equation} f'(x) = 3x^{3-1} = 3x^2 \end{equation}\]\(\displaystyle f(x) = -x^2 + 3\)
Solution
(1.72)#\[\begin{align} f'(x) &= \frac{d}{dx}(-x^2) + \frac{d}{dx}(3) \\ &= -\frac{d}{dx}(x^2) + \frac{d}{dx}(3) \\ &= -2x^{2-1} + 0 \\ &= -2x \end{align}\]\(\displaystyle f(x) = \frac{4x^3}{3} - x + 2e^x\)
Solution
(1.73)#\[\begin{align} f'(x) &= \frac{4}{3} \frac{d}{dx}(x^3) - \frac{d}{dx}(x) + 2 \frac{d}{dx}(e^x) \\ &= \frac{4}{3}(3x^2) - 1 + 2e^x \\ &= 4x^2 - 1 + 2e^x \end{align}\]\(\displaystyle f(x) = \frac{3}{x^2} + \sqrt{x}\)
Solution
(1.74)#\[\begin{align} f'(x) &= 3 \frac{d}{dx}(x^{-2}) + \frac{d}{dx}(x^{1/2}) \\ &= 3(-2x^{-3}) + \frac{1}{2} x^{-1/2} \\ &= \frac{-6}{x^3} + \frac{1}{2\sqrt{x}} \end{align}\]\(f(x) = \log(4x)\)
Solution
(1.75)#\[\begin{align} f'(x) &= \frac{d}{dx} [\log 4 + \log x] \\ &= \frac{d}{dx}(\log 4) + \frac{d}{dx}(\log x) \\ &= 0 + \frac{1}{x \ln 10} \end{align}\]
There are other rules related to functions that are products, quotients, compositions, or trigonometric. We will go over each of those in more detail next.
1.5.1. Product rule#
The product rule is used to differentiate functions that can be written as the product of two smaller functions.
To demonstrate this rule, consider \(f(x) = (x-3)(x-1)\). Previously, we would have needed to expand this function before differentiating:
With the product rule, instead we recognize
so
This example is a little silly, but the product rule is a life saver for functions that are hard to expand!
\(f(x) = (x+1)(2x^2 + 5)(5x^3-4)\)
Solution
Identify:
(1.80)#\[\begin{equation} u = x+1 \qquad v = (2x^2+5)(5x^3-4) \end{equation}\]so
(1.81)#\[\begin{equation} f'(x) = (x+1)v' + (2x^2 +3)(5x^3-4)(1) \end{equation}\]The derivative \(v'\) can be evaluated by a second product rule!
(1.82)#\[\begin{align} u &= 2x^2+5 & v &= 5x^3-4 \\ u' &= 4x & v' &= 15x^2 \end{align}\]finally giving
(1.83)#\[\begin{align} f'(x) &= (x+1)[(2x^2+3)(15x^2) + (5x^3-4)(4x)] \\ &+ (2x^2+5)(5x^3-4) \end{align}\]\(f(x) = \dfrac{1}{x} e^x\)
\(f(x) = (x^2+3)\ln x\)
1.5.2. Quotient Rule#
Hint
One mnemonic that may or may not help remember this:
If the quotient rule you wish to know, it’s “low-d-high less high-d-low”… then draw the line and, down below, denominator squared will go.
To demonstrate this rule, consider \(f(x) = (x-1)/x\). Previously, we would have needed to separate the numerator before differentiating:
With the qoutient rule, instead we recognize
so
This was obviously harder than the old way, but there are other cases where it is helpful to do the quotient rule!
\(\displaystyle f(x) = \frac{x^2 -1}{x^4 + 2}\)
\(\displaystyle f(x) = \frac{e^{x}}{1 + x}\)
\(\displaystyle f(x) = \frac{(x - 1)(x^2 - 2x)}{x^4}\)
Solution
(1.96)#\[\begin{align} u &= & v &= x^4\\ u' &= 3x^2 - 6x + 2 & v' &= 4x^3 \\ \end{align}\]so
(1.97)#\[\begin{align} f'(x) &= \frac{x^4 \cdot (3x^2-6x+2) - (x^3 -3x^2 +2x) \cdot 4x^3}{x^8} \\ &= \frac{-x^6 + 6x^5 - 6x^4}{x^8} \\ &= -\frac{1}{x^2} + \frac{6}{x^3} - \frac{6}{x^4} \end{align}\]Note, though, that in this case we could also have expanded the numerator, divided through by \(x^8\), and differentiated term-by-term to arrive at the same answer. The faster route depends on the problem!
1.5.3. Chain rule#
The chain rule is used to differentiate composite functions, when the “inside” of the function is more complicated than what we know.
To demonstrate this rule, consider \(f(x) = (x-1)^2\). Previously, we would have needed to expand this function before differentiating:
With the chain rule, instead we recognize
so
The results match! Some additional examples:
\(f(x) = e^{x^2}\)
\(f(x) = \ln(1 + 2x)\)
\(f(x) = \dfrac{2}{1 + 2x}\)
1.5.4. Trigonometric functions#
\(f(x)\) |
\(f'(x)\) |
\(f(x)\) |
\(f'(x)\) |
---|---|---|---|
\(\sin x\) |
\(\cos x\) |
\(\csc x\) |
\(-\csc x \cot x\) |
\(\cos x\) |
\(-\sin x\) |
\(\sec(x)\) |
\(\sec x \tan x\) |
\(\tan x\) |
\(\sec^2 x\) |
\(\cot x\) |
\(-\csc^2 x\) |
All of these follow from knowing only two derivatives: \(\sin x\) and \(\cos x\)! For example, to find the derivative of \(\tan x\), use the quotient rule:
Or, to find the derivative of \(\csc x\), use the chain rule:
Example: Harmonic oscillator
A harmonic oscillator is a mass m on a Hookean spring. The spring force is \(F = -kx\), where k is the spring constant and x is the displacement of the mass.

If the mass is initially displaced to \(x(0)\), it will then move according to:
where

How fast is the oscillator moving at any given time? When is the oscillator moving fastest?
We want to calculate the velocity \(v = x'(t)\). Use the chain rule with:
so
A function is at an extrema when its derivative is zero. If the function is velocity, this derivative is the acceleration a and is equal to zero, \(a = v' = 0\). This means the mass is not accelerating! Using the chain rule again:
The roots occur at \(t = T/4\) or \(3T/4\), when \(x = 0\) and the spring is no longer stretched. All potential energy has been converted to kinetic energy!
\(f(x) = 3 \cos x + \sin x\)
Solution
(1.115)#\[\begin{align} f' &= 3 \dd{}{}{x}(\cos x) + 4 \dd{}{}{x}(\sin x)\\ &= -3\sin x + 4\cos x \end{align}\]\(f(x) = 2 \sin x \cos x\)
\(f(x) = \sin 2x\)
\(f(x) = \tan({x^2+2x+3})\)
\(f(x) = e^{\cos^2 x}\)
Solution
Use the chain rule with
(1.122)#\[\begin{align} u &= \cos^2 x & f = e^{u}\\ u' &= \dd{}{}{x}(\cos^2 x) & f' = e^{u} \end{align}\]So
(1.123)#\[\begin{equation} f' = e^{u} u' = e^{\cos^2 x} \dd{}{}{x}(\cos^2 x) \end{equation}\]Use the chain rule again with
(1.124)#\[\begin{align} u &= \cos x & f = u^{2}\\ u' &= -\sin x & f' = 2u\\ \end{align}\]So
(1.125)#\[\begin{align} f' &= e^{\cos^2 x}(2uu')\\ &= e^{\cos^2 x}(2\cos x \cdot -\sin x)\\ &= -2 \sin x \cos x e^{\cos^2 x}\\ \end{align}\]