Rules for computing derivatives¶
Part 4 · Derivatives · Chapter 4 · lecture notes by Fabio Furini · Chapter PDF
1. Rules for computing derivatives¶
-
We now look at the relation between the derivative operation and the main operations on functions that we already know; in particular we will show the relation between:
-
differentiation and algebraic operations
-
differentiation and composition
-
differentiation and inversion
-
1.1 Algebra of derivatives¶
Theorem 1: algebra of derivatives
Let \(f\),\(g\): \((a,b) \rr \R\) be two functions differentiable in \((a,b)\).
Then \(f \pm g\), \(f \cdot g\), \(f / g~~(g \neq 0)\) are differentiable in \((a, b)\) and the following formulas hold:
-
From rule \(\eqref{DD2}\) we deduce
\[\begin{equation} \label{DD4} ( k \cdot g)' = k \cdot g' \qquad {\rm ~~with~~} k\in \R {\rm ~~constant} \end{equation}\]since the derivative of a constant is equal to zero.
-
From rule \(\eqref{DD3}\) we deduce
\[\begin{equation} \label{DD5} \left(\frac{1}{g}\right)' = - \frac{g'}{g^2} \qquad (g \neq 0) \end{equation}\] -
Rule \(\eqref{DD2}\) is called the Leibniz rule (product rule) and it extends to the product of \(n\) functions:
\[\begin{equation} \label{DDLEIBNIZ} (f_1 \: f_2 \cdots f_n )' = f_1' \: f_2 \cdots f_n + f_1 \: f'_2 \cdots f_n + {\rm \dots} + f_1 \: f_2 \cdots f'_n \end{equation}\] -
The theorem actually has a pointwise character: that is, if \(f\) and \(g\) are differentiable at a point \(x_0 \in (a, b)\), then at that point \(f \pm g\), \(f \cdot g\), \(f / g\) are also differentiable, and the formulas above hold (and they extend to intervals).
Proof
We prove rule \(\eqref{DD2}\). Fixing \(x \in (a, b)\), we have
and hence the difference quotient can be written as:
We have
since \(f\) is continuous, being differentiable.
Hence
□
Proof
We prove rule \(\eqref{DD5}\). Fixing \(x \in (a, b)\), the difference quotient can be written as:
We have
since \(g\) is continuous, being differentiable.
Hence
□
Proof
Note that rule \(\eqref{DD3}\) follows from rules \(\eqref{DD2}\) and \(\eqref{DD5}\); indeed:
□
Remark 1
Given the function \(f(x)=\tan x\), the derivative function is \(f'(x)=\frac{1}{\cos^2 x} = 1 + \tan^2 x\).
Proof
Using formula \(\eqref{DD3}\) we have
□
Remark 2
Given the function \(f(x)=\cot x\), the derivative function is \(f'(x)=-\frac{1}{\sin^2 x} = -(1 + \cot^2 x)\).
Proof
Using formula \(\eqref{DD3}\) we have
□
1.2 Derivative of a composite function¶
Theorem 2: chain rule
Let \(g \circ f\) be the composite function of two functions \(f\) and \(g\). If \(f\) is differentiable at a point \(x\) and \(g\) is differentiable at \(y = f ( x)\), then \(g \circ f\) is differentiable at \(x\) and the following formula holds:
Proof
We have
If we set
By the continuity of \(f\), \(h \rr 0\) implies \(k \rr 0\). With the new notation we have:
We now observe that the definition of derivative:
can be rewritten, for \(k \neq 0\), as
where \(\varepsilon (k)\) denotes a quantity that tends to zero as \(k \rr 0\).
Multiplying both sides of the previous equation by \(k\) we find
a relation that also holds for \(k = 0\). Therefore:
Dividing by \(h\), and observing that
which implies, as seen above, also \(k \to 0\), we obtain the claim. □
-
As the name “chain rule” suggests, \(\eqref{CAT1}\) can be generalized to the composition of any number of functions, composed one with another. For example, for three functions we have:
\[ \left(~f\bigg(g \big(h(x) \big ) \bigg)~\right)' = f'\bigg(g \big(h(x) \big ) \bigg) \cdot g' \big(h(x) \big ) \cdot h'(x) \]
Example 1: Derivative of a composite function
We compute the derivative function of the composite function:
The two functions are:
Both functions are differentiable on all of \(\R\). We have
hence, using the chain rule \(\eqref{CAT1}\) and substituting back, we obtain:
Consider the composite function \(g \big(f (x)\big)\), equivalently written \((g \circ f)(x)\). Setting \(y=f(x)\) and \(w = g(y)\), and using the (Leibniz) notation
the (chain) rule \(\eqref{CAT1}\) can be rewritten as:
Rule \(\eqref{CAT2}\) expresses the fact that the rate of change of \(w\) with respect to \(x\) is the product of the “intermediate” rates of change, of \(w\) with respect to \(y\) and of \(y\) with respect to \(x\).
Example 2: Derivative of a composite function
Consider the composite function of the previous exercise. Setting
and using Leibniz's notation, rule \(\eqref{CAT2}\) would be written:
And hence, substituting \(y= \sin x\), we obtain:
Example 3: Derivative of a composite function
We compute the derivative function of the composite function (multiplied by a constant):
The two functions are:
Both functions are differentiable on all of \(\R\). We have:
hence, using rule \(\eqref{CAT1}\), rule \(\eqref{DD4}\) and substituting back, we obtain:
Example 4: Derivative of a product of composite functions
We compute the derivative function of the product of two composite functions times a constant:
The functions are:
The functions are differentiable on all of \(\R\). We have:
consequently, using the chain rule \(\eqref{CAT1}\) and substituting back, we obtain:
Hence, using rule \(\eqref{DD2}\) and rule \(\eqref{DD4}\):
Example 5: Derivative of a composite function
Let \(f(x)>0\) be differentiable; we compute the derivative of the function
using the chain rule \(\eqref{CAT1}\) we have:
Remark 3
Given the function \(f(x)=a^x\), with \(a>0\), the derivative function is \(f'(x)=a^x \cdot \log a\).
Proof
We have
hence, using the formulas for the derivative of \(e^y\) (with \(y=x\: \log a\)) and for the derivative of a composite function, we have
□
Remark 4
Given the function \(f(x)=\log_a x\), with \(a>0,a\neq 1\), the derivative function is \(f'(x)=\frac{1}{x \: \log a}\).
Proof
We have
hence, using the formulas for the derivative of \(\log x\) and for the derivative of \(k \: f(x)\), we have:
□
Remark 5
Given the function \(f(x)=\sinh x\), the derivative function is \(f'(x)=\cosh x\).
Proof
We have:
□
Remark 6
Given the function \(f(x)=\cosh x\), the derivative function is \(f'(x)=\sinh x\).
Proof
We have:
□
The derivatives of functions of the type:
are based on rewriting the function (with \(f(x) > 0\)) in the following form:
We have:
Example 6: Derivative of a function raised to another function
We compute the derivative of the function
The two functions are:
Hence:
Consider the absolute value of a function: \(|f(x)|\). At the points where \(f(x) \neq 0\), the differentiation of a composite function gives:
In general, we expect the function \(|f(x)|\) to have corner points at the points where \(f(x)\) vanishes.
Example 7: Derivative of a function with absolute value
We compute the derivative function of the function:
equivalently:
At \(x_0 =1\), we need to use the limit of the difference quotient:
If \(h \rr 0^-\) we have \(|h^2-2\;h| = h^2-2\;h\), hence:
If \(h \rr 0^+\) we have \(|h^2-2\;h| = -h^2+2\;h\), hence:
The function is not differentiable at \(x_0 =1\) and \(x_0 =3\) (by arguments analogous to those for \(x_0 =1\)), where it has corner points.
Example 8: Derivative of a function with absolute value
We compute the derivative of the function:
For \(x \neq -1\), we have:
At \(x_0 =-1\), we need to use the limit of the difference quotient:
We have:
We conclude that, since the limit of the difference quotient does not exist, the function is not differentiable at \(x_0 =-1\). The function has a corner point at \(x_0 = - 1\).
We now consider the derivatives of some logarithmic functions. We compute:
Moreover, by the differentiation of composite functions we have:
Sometimes it is convenient to use the properties of logarithms to transform a logarithmic function before computing its derivative function:
1.3 Derivative of the inverse function¶
Theorem 3: derivative of the inverse function
Let \(f : (a, b) \rr \R\) be a continuous and invertible function in \((a, b)\) and \(g = f^{-1}\) its inverse function, defined in \(f\big( (a, b) \big)\).
Assume moreover that \(f'(x_0) \neq 0\) exists for some \(x_0 \in (a, b)\).
Then \(g\) is differentiable at \(y_0= f (x_0)\) and
Proof
Let:
Consider the difference quotient of \(g\) at \(y_0\):
If \(k\neq 0\), then \(f(x_0+h)-f(x_0) \neq 0\) and hence also \(h \neq 0\); therefore the last quotient can also be rewritten in the form:
Moreover, for \(k \rr 0\) we have \(g (y_0 + k) \rr g(y_0)\) because \(g\) is continuous, being the inverse of a continuous function on an interval (theorem on the continuity of inverse functions); on the other hand \(h = g (y_0 + k) - g (y_0)\), hence for \(k \rr 0\) also \(h \rr 0\), and by hypothesis
hence the following limit exists
□
-
We observe that, assuming the differentiability of \(f^{-1}\), \(\eqref{INV}\) follows immediately from the identity
\[ g\big(f(x)\big) = x \]and from the chain rule:
\[ g'\big(f(x)\big)\cdot f'(x) = 1 \]from which, if \(f'(x) \neq 0\), \(\eqref{INV}\) follows. The proof we have given, however, is necessary in order to deduce the differentiability of \(g\) from our hypotheses on \(f\).
-
\(\eqref{INV}\) has a simple geometric meaning, recalling that the graphs of \(f\) and \(g=f^{-1}\) are symmetric with respect to the bisector \(y = x\). Geometrically we have:
hence the angles \(\alpha\) and \(\beta\) are complementary, that is:
\[ \left( \alpha + \beta = \frac{\pi}{2} \right) \]and hence
\[ f'(x) = \tan \alpha = \tan \left( \frac{\pi}{2} - \beta \right) = \frac{1}{\tan \beta} = \frac{1}{g'(y)} \]
With Leibniz's notation, setting \(y=f(x)\) and \(x=g(y)\), \(\eqref{INV}\) is written in the form
- Pay attention to the fact that in the formula for the derivative of the inverse function, the derivatives \(f'\) and \(g'\) are computed at two different points: this is the main thing to be careful about when applying this theorem.
Remark 7
Given the function \(f(y)=\arctan y\), the derivative function is \(f'(y)=\frac{1}{{1 + y^2}}\).
Proof
We set \(y = \tan x\), \(x = \arctan y\) with \(x \in \left(-\frac{\pi}{2}, \frac{\pi}{2} \right)\), \(y \in \R\). We have:
□
Remark 8
Given the function \(f(y)=\arcsin y\), the derivative function is \(f'(y)=\frac{1}{\sqrt{1 - y^2}}\)
Proof
We set \(y = \sin x\), \(x = \arcsin y\), with \(x \in \left[ -\frac{\pi}{2}, \frac{\pi}{2} \right]\), \(y \in [-1, 1 ]\). Since for those values of \(x\) we have
we have:
□
Remark 9
Given the function \(f(y)=\arccos y\), the derivative function is \(f'(y)=-\frac{1}{\sqrt{1 - y^2}}\)
Proof
Now we set \(y = \cos x\), \(x = \arccos y\), with \(x \in \left[0, \pi \right]\), \(y \in [-1, 1 ]\). Since for those values of \(x\) we have
we have
□
- Note that the functions \(\arcsin x\), \(\arccos x\), although defined and continuous on \([- 1, 1]\), are not differentiable at the endpoints of the interval: precisely, at these points they have a vertical tangent.
The usefulness of the theorem on the derivative of the inverse function lies in the fact that it allows us to compute the derivative of the inverse function \(g\) even in situations where we do not know how to write \(g\) explicitly.
Example 9: Derivative of the inverse function
Let
The function is strictly increasing on all of \(\R\), hence invertible; let \(g\) be its inverse. We compute, for example, \(g' (y_0)\) for \(y_0 = f(0) = 1\). We have:
Hence:
Remark 10
Given the function \(f(y)=\setsinH y\) (the inverse hyperbolic sine), the derivative function is \(f'(y)=\frac{1}{\sqrt{y^2+1}}\)
Proof
Now we set \(y = \sinH x\), \(x = \setsinH y\), with \(x \in \R\), \(y \in \R\). Since for those values of \(x\) we have
we have:
□
Remark 11
Given the function \(f(y)=\setcosH y\) (the inverse hyperbolic cosine), the derivative function is \(f'(y)=\frac{1}{\sqrt{y^2-1}}\)
Proof
Now we set \(y = \cosH x\), \(x = \setcosH y\), with \(x \in [0,+\infty)\), \(y \in [1,+\infty)\). Since for those values of \(x\) we have
we have:
□
1.4 Logarithmic derivative and elasticity¶
Definition 1: of logarithmic derivative
Given \(f > 0\), the logarithmic derivative function of \(f\) is the derivative function of \(\log f\); in formulas:
-
The logarithmic derivative has the meaning of relative growth rate of \(f\) with respect to \(x\).
-
In some cases the relative growth rate \(\frac{f'(x)}{f(x)}\) is often more meaningful than the absolute rate \(f'(x)\).
-
For example, a yearly capital increase of 1 billion out of a total of 10 has a very different effect from an increase of 1 billion out of 1000 billion. In the first case the relative rate of change is 1/ 10, in the second 1/1 000, while the absolute increases are equal.
When we are interested in visualizing relative increases, we use graphs on a semi-logarithmic scale: the values of \(x\) are placed on the \(x\)-axis, while the values of \(\log \big( f(x)\big)\) are placed on the \(y\)-axis
- This kind of representation is also used when \(f(x)\) grows so rapidly that it would require an excessive compression of the scale (unit of measure) on the \(y\)-axis (or on the \(x\)-axis).
A log-log graph (graph on a logarithmic scale) is a graph in which, instead of \(x\), the values of \(\log x\) are placed on the \(x\)-axis and, instead of \(f(x)\), the values of \(\log f(x)\) are placed on the \(y\)-axis
Definition 2: of elasticity
The slope of the tangent line to a graph on a logarithmic scale is called the elasticity of \(f\) and is denoted by \(E(x)\).
- Elasticity represents the relative rate of change of \(f\) with respect to relative changes of \(x\), and it equals the derivative of \(\log f\) with respect to \(\log x\)
-
To find the analytic expression of \(E(x)\), we observe that, by the theorem on the differentiation of composite functions, setting \(u = \log x\) we have:
\[ \frac{d \log f}{dx} = \frac{d \log f}{du} \frac{du}{dx} {\rm ~~~~i.e.~~~~} \frac{f'(x)}{f(x)} = E(x) \cdot \frac{1}{x} \]from which we obtain:
\[ E(x) = x \cdot \frac{f'(x)}{f(x)} \]
Example 10: elasticity
We compute the elasticity of the power function \(f(x)= x^\alpha\), \(x>0\), \(\alpha \in \R\); we have: