Chapter 6.2 Differentiating Elementary Functions
Derivatives of Inverse Functions
We can use the chain rule to derive the derivative of inverse functions.
For example, \(e^x\) and \(\ln(x)\) are inverse functions.
Recall that if \(f\) and \(f^{-1}\) are inverse functions, then we have that for any \(x\) in the domain of \(f^{-1}\), \[f(f^{-1}(x))=x.\] If we take the derivative of both sides, we will need to use the chain rule to compute the derivative of \(f(f^{-1}(x))\). Doing that gives us \[f'(f^{-1}(x))\cdot (f^{-1}(x))'.\]
Hence \[\begin{align*}\left(f(f^{-1}(x))\right)'&=(x)'\\ f'(f^{-1}(x))\cdot (f^{-1}(x))'&=1\\ (f^{-1}(x))'&=\frac{1}{f'(f^{-1}(x))}.\end{align*}\]
Derivative of the Inverse of a Function
Take \(f\) be a function that is differentiable and invertible and take \(f^{-1}\) be its inverse function. Then, as long as \(f'(f^{-1}(a))\not=0\), \(f^{-1}\) is differentiable at \(a\). In fact, \((f^{-1}(a))'=\frac{1}{f'\left(f^{-1}(a)\right)}\)
Example 1
Show the derivative of \(f(x)=\log_a(x)\) is \[f'(x)=\frac{1}{\ln(a)x}.\] Also show that the derivative of \(f(x)=\ln(x)\) is \[f'(x)=\frac{1}{x}.\]
Take \(f(x)=\exp_a(x)\). Then its derivative is \(f'(x)=\ln(a)\exp_a(x)\) and its inverse is \(f^{-1}(x)=\log_a(x)\). Use the Derivative of the Inverse of Function Theorem:
\[ \begin{align*} \left(\log_a(x)\right)'&=\frac{1}{f'\left(f^{-1}(a)\right)}\\ &=\frac{1}{f'(\log_a(x))}\\ &=\frac{1}{\ln(a)\exp_a(\log_a(x))}\\ &=\frac{1}{\ln(a)x}. \end{align*} \]
In the case of \(\ln(x)=\log_e(x)\), the derivative is \(f'(x)=\tfrac{1}{\ln(e)x}=\tfrac{1}{x}.\)
Example 2
Show the derivative of \(f(x)=\arctan(x)\) is \[f'(x)=\frac{1}{x^2+1}.\]
Take \(f(x)=\tan(x)\). Then its derivative is \(f'(x)=\sec^2(x)\) and its inverse function is \(f^{-1}(x)=\arctan(x)\).
Use the Derivative of the Inverse of Function Theorem: e
\[ \begin{align*} \left( \arctan(a) \right)'&=\frac{1}{f'\left(f^{-1}(a)\right)}\\ &=\frac{1}{f'(\arctan(a))}\\ &=\frac{1}{\sec^2(\arctan(a))}\\ \end{align*} \]
Rewrite this expression by using trigonometry. First, the definition of arctangent states that \(\arctan(x)=y\) if and only if \(x=\tan(y)\) . Construct the following right triangle based on the equation \(x=\tan(y)\):
Use the right triangle to rewrite secant:
\[\sec^2(\arctan(a))=\sec^2(y)=\left(\sec(y)\right)^2=\left(\sqrt{a^2+1}\right)^2=a^2+1.\]
Substitute this to get
\[ \begin{align*} \left( \arctan(a) \right)'&=\frac{1}{\sec^2(\arctan(a))}\\ &=\frac{1}{a^2+1}.\\ \end{align*} \]
Derivative of Inverse Trig Functions
- Take \(f(x)=\arctan(x)\). Then \((\arctan(x))'=\frac{1}{x^2+1}.\)
- Take \(f(x)=\arccos(x)\). Then \((\arccos(x))'=-\frac{1}{\sqrt{1-x^2}}.\)
- Take \(f(x)=\arcsin(x)\). Then \((\arcsin(x))'=\frac{1}{\sqrt{1-x^2}}\)
Example 3
Compute \(f'\) of \(f(x)=\arctan\left(\log_5\left(\tfrac{x+3}{x+1}\right)\right).\)
Take \(f_1(x)=\arctan(x),f_2(x)=\log_5(x),f_3(x)=x+3,f_4(x)=x+1\) so that \[f(x)=f_1\left(f_2\left(\tfrac{f_3(x)}{f_4(x)}\right)\right).\] Take the derivative of each function to get \(f_1'(x)=\tfrac{1}{x^2+1},f_2(x)=\tfrac{1}{\ln(5)x},f_3'(x)=1,\) and \(f_4'(x)=1.\) Use the derivatives rules:
\[ \begin{align*} \left(\arctan\left(\log_5\left(\tfrac{x+3}{x+1}\right)\right)\right)'&=f_1'\left(f_2\left(\tfrac{f_3(x)}{f_4(x)}\right)\right)\cdot \left[f_2\left(\tfrac{f_3(x)}{f_4(x)}\right)\right]'&&\text{chain rule}\\ &=f_1'\left(f_2\left(\tfrac{f_3(x)}{f_4(x)}\right)\right)\cdot f_2'\left(\tfrac{f_3(x)}{f_4(x)}\right)\cdot\left[\tfrac{f_3(x)}{f_4(x)}\right]'&&\text{chain rule}\\ &=f_1'\left(f_2\left(\tfrac{f_3(x)}{f_4(x)}\right)\right)\cdot f_2'\left(\tfrac{f_3(x)}{f_4(x)}\right)\cdot\tfrac{f_3'(x)f_4(x)-f_3(x)f_4'(x)}{(f_4(x))^2}&&\text{quotient rule}\\ &=\frac{1}{\left(f_2\left(\tfrac{f_3(x)}{f_4(x)}\right)\right)^2+1}\cdot \frac{1}{\ln(5)\left[\tfrac{f_3(x)}{f_4(x)}\right]}\cdot\frac{f_3'(x)f_4(x)-f_3(x)f_4'(x)}{(f_4(x))^2}\\ &=\frac{1}{\left(\log_5\left(\tfrac{x+3}{x+1}\right)\right)^2+1}\cdot\frac{1}{\ln(5)\left(\tfrac{x+3}{x+1}\right)}\cdot\frac{1\cdot(x+3)-(x+1)\cdot1}{(x+1)^2}\\ \end{align*} \]
Implicitly Defined Functions and Their Derivatives
So far, we have been working with functions of the form \(y=f(x)\). However, not all curves can be described by functions. In fact, some curves can be described in terms of an equation.
For example, the unit circle centered at the origin can be described by the (implicit) equation \[x^2+y^2=1.\]
If we solve for \(y\), we get \(y=\sqrt{1-x^2}\), which describes the upper half of the circle, and \(y=-\sqrt{1-x^2}\), which describes the lower half of the circle.
So if we wanted to find the tangent line to unit circle at \(\left(\frac{\sqrt{2}}{2} ,\frac{\sqrt{2}}{2}\right)\), we would use \(f(x)=\sqrt{1-x^2}\) as our function, find the derivative of \(f\), evaluate the derivative at \(x=\frac{\sqrt{2}}{2}\) to get the slope of the tangent line, and then use \(L(x)=f(a)+f'(a)(x-a)\) to write the formula for the tangent line.
However, that is not always possible because not every curve that is desribed by an equation can be rewritten into the form \(y=f(x)\). So instead we use implict differentiation.
First some notation. The following all describe the same concept.
\(f'(x)\)
\(\tfrac{df}{dx}\) Leibniz notation
\(Df\) Newton-Leibniz notation
Example 4
Assume that \(y\) is defined implicitly by the equation \(x^2+4y^2=xy+\sin(y)\). Calculate \(\frac{dy}{dx}\).
Implicitly defined means that \(y=y(x)\) is a function of \(x\). So \(\frac{d}{dx}y=\frac{dy(x)}{dx}.\) Because there is no explicit formula for \(y,\) there is no further simplifcation that can be done.
Take the derivative to get:
\[ \begin{align*} x^2+4y^2&=xy+\sin(y)\\ \frac{d}{dx}(x^2+4y^2)&=\frac{d}{dx}(xy+\sin(y))\\ \frac{d}{dx}x^2+\frac{d}{dx}4y^2&=\frac{d}{dx}xy+\frac{d}{dx}\sin(y)\\ 2x+\frac{d}{dx}4(y(x))^2&=\frac{d}{dx}(x\cdot y(x))+\frac{d}{dx}\sin(y(x))&&\text{ remember }y \text{ is a function.} \end{align*} \]
Use the chain rule to get
\[\frac{d}{dx}4(y(x))^2=4\cdot 2\cdot (y(x))^1\cdot \frac{d}{dx}y(x)=8y(x)\frac{dy(x)}{dx}\]
and
\[\frac{d}{dx}\sin(y(x))=\cos(y(x))\cdot \frac{d}{dx}y(x)=\cos(y(x))\frac{dy(x)}{dx}.\]
Use the product rule to get
\[\frac{d}{dx}(x\cdot y(x))=\frac{d}{dx}(x)\cdot y(x)+x\cdot\frac{d}{dx}y(x)=1\cdot y(x)+x\frac{dy(x)}{dx}.\]
Put everything together and simplify:
\[ \begin{align*} 2x+\frac{d}{dx}4(y(x))^2&=\frac{d}{dx}(x\cdot y(x))+\frac{d}{dx}\sin(y(x))\\ 2x+8y\frac{dy}{dx}&=y+x\frac{dy}{dx}+\cos(y)\frac{dy}{dx}. \end{align*} \]
Now solve for \(\tfrac{dy}{dx}\): \[ \begin{align*} 2x+8y\frac{dy}{dx}&=y+x\frac{dy}{dx}+\cos(y)\frac{dy}{dx}\\ 2x-y&=x\frac{dy}{dx}+\cos(y)\frac{dy}{dx}-8y\frac{dy}{dx}\\ 2x-y&=(x+\cos(y)-8y)\frac{dy}{dx}\\ \frac{2x-y}{x+\cos(y)-8y}&=\frac{dy}{dx}. \end{align*} \]
Suppose that the function \(f\) has the property that \(f(x)\) is nonzero.
The chain rule implies that \[ \begin{align*} \frac{{\rm d}}{{\rm d}x}\ln(|f(x)|) = \frac{f^\prime(x)}{f(x)} \quad \text{and so} \quad f^\prime(x) = f(x)\frac{{\rm d}\ln(|f(x)|)}{{\rm d}x}. \end{align*} \]
This allows us to exploit the algebraic properties of the logarithm in order to simplify computing derivatives.
Calculus texts often refer to differentiation performed in this way as logarithmic differentiation.
Logarithm Properties
Let \(b>0\) and \(b\not=1\) and let \(n\) be a real number. Then for \(X>0,Y>0\), we have
- \(\log_b[XY]=\log_b[X]+\log_b[Y]\)
- \(\log_b\left[\frac{X}{Y}\right]=\log_b[X]-\log_b[Y]\)
- \(\log_b[X^n]=n\log_b[X]\)
Example 5
- \(\ln(x^3)=3\ln(x)\)
- \(\ln\left(\frac{x}{\tan(x)}\right)=\ln(x)-\ln(\tan(x))\)
- \(\ln\left(\sqrt{x}\tan(x)\right)=\ln\left(\sqrt{x}\right)+\ln(\tan(x))\)
Example 6
Take \(f(x)=\sqrt[5]{\frac{x^2-9}{x+4}}\). Find \(f'\) by using logarithm differentiation.
Rewrite \(f\) as \(f(x)=\left(\frac{x^2-9}{x+4}\right)^{1/5}\).
Take the logarithm of both sides and rewrite:
\[\begin{align*}f(x)&=\left(\frac{x^2-9}{x+4}\right)^{1/5}\\ \ln(f(x))&=\ln\left(\left(\frac{x^2-9}{x+4}\right)^{1/5}\right)\\ \ln(f(x))&=\frac{1}{5}\ln\left(\frac{x^2-9}{x+4}\right)\\ \ln(f(x))&=\frac{1}{5}\left(\ln\left(x^2-9\right)-\ln\left(x+4\right)\right), \end{align*} \]
Take the derivative of both sides of the equation. All the logarithm terms will involve a chain rule. Take the derivative to get
\[\begin{align*} \frac{1}{f(x)}f'(x)&=\frac{1}{5}\left(\frac{1}{x^2-9}\cdot 2x-\frac{1}{x+4}\cdot 1\right). \end{align*}\]
Multiply both sides by \(f(x)\) and plugging in \(f(x)=\left(\frac{x^2-9}{x+4}\right)^{1/5}\) to get \[\begin{align*} f'(x)&=\frac{1}{5}\left(\frac{x^2-9}{x+4}\right)^{1/5}\left(\frac{2x}{x^2-9}-\frac{1}{x+4}\right). \end{align*}\]
For any positive differentiable function \(f\), rather than use logarithmic differentiation, it can be simpler to use the formula \[f(x) = e^{\ln(f(x))}\] in order to transform the differentiation problem into something simpler.
For instance, take \(f\) to be the function that is defined for all \(x\) in \((0, \infty)\) by \[f(x) = x^x.\] What is \(f^\prime(x)\)?
Differentiate both sides of the above equality to see that \[\begin{align*} \frac{{\rm d}}{{\rm d}x} x^x &= \frac{{\rm d}}{{\rm d}x} e^{\ln(x^x)} \\&= \frac{{\rm d}}{{\rm d}x} e^{x\ln(x)} \\&= e^{x\ln(x)} (x\ln(x))' \\& = e^{x\ln(x)}\left(\ln(x) +1\right) = (\ln(x) +1)x^x.\end{align*}\]
Example 7
For each function \(f\) that is given below, determine \(f^\prime(x)\).
- \(f(x)=x^{x^2+5}\)
- \(f(x)=(\tan(x))^x\)
- Rewrite using the formula \(f(x) = e^{\ln(f(x))}\) and take the derivative to get
\[\begin{align*} \frac{{\rm d}}{{\rm d}x} x^{x^2+5} &= \frac{{\rm d}}{{\rm d}x} e^{\ln(x^{x^2+5})} \\&= \frac{{\rm d}}{{\rm d}x} e^{(x^2+5)\ln(x)} \\&= e^{(x^2+5)\ln(x)}\cdot((x^2+5)\ln(x))'\\ &=e^{(x^2+5)\ln(x)}\cdot\left(2x\ln(x)+\frac{x^2+5}{x}\right)\\ &=e^{\ln(x^{x^2+5})}\cdot\left(2x\ln(x)+\frac{x^2+5}{x}\right)\\ &=x^{x^2+5}\cdot\left(2x\ln(x)+\frac{x^2+5}{x}\right)\\ \end{align*}\]
- Rewrite using the formula \(f(x) = e^{\ln(f(x))}\) and take the derivative to get
\[\begin{align*} \frac{{\rm d}}{{\rm d}x} (\tan(x))^x &= \frac{{\rm d}}{{\rm d}x} e^{\ln((\tan(x))^x)} \\&= \frac{{\rm d}}{{\rm d}x} e^{(x)\ln(\tan(x))} \\&= e^{x\ln(\tan(x))}\cdot(x\ln(\tan(x)))'\\ &=e^{x\ln(\tan(x))}\cdot\left(\ln(\tan(x))+x\cdot\frac{\sec^2(x)}{\tan(x)}\right)\\ &=e^{\ln(\tan(x))^x}\cdot\left(\ln(\tan(x))+x\cdot\frac{\sec^2(x)}{\tan(x)}\right)\\ &=(\tan(x))^x\cdot\left(\ln(\tan(x))+x\cdot\frac{\sec^2(x)}{\tan(x)}\right)\\ \end{align*}\]