Chapter 6.2 Differentiating Elementary Functions
\[ \definecolor{ucrblue}{rgb}{0.0627,0.3843,0.6039} \definecolor{ucrgold}{rgb}{0.9686,0.6941,0.2824} \definecolor{ucrred}{rgb}{0.8941,0,0.1686} \definecolor{ucrgreen}{rgb}{0.4706,0.7451,0.1255} \definecolor{ucraccent}{rgb}{1.0000,0.9569,0.8392} \DeclareMathOperator*{\LO}{O} \DeclareMathOperator*{\Lo}{o} \DeclareMathOperator*{\abs}{abs} \DeclareMathOperator{\pow}{pow} \]
In this section, we will talk about the inverse function theorem, which allows to determine the derivative of the inverse of a function. Moreover, we will discuss how to calculate the determine the tangent line to curves when there is not an explict formula we can use to describe the curve. This involves using implicit differentation. And finally, we will discuss how to logarithms and exponentials to compute derivatives.
Derivatives of Inverse Functions
The derivative of a function and the derivative its inverse function are connected in a very simple way. Before, we introduce the theorem, let us first look at an example of a function that we can calculate its derivative, its inverse, and the derivative of its inverse.
Example 1
Take \(f\) to be the function that is given by \[f(x) = \frac{3x +1}{x-2}.\]
Determine \(f^\prime(3)\).
If our intuition about the derivatives of inverse functions is correct, then what should be the derivative of \(f^{-1}\) at \(10\)?
Identify a formula for \(f^{-1}(x)\).
Determine \(\big(f^{-1}\big)^{\prime}(10)\) and compare your answer to the answer in (b).
Part a
Use the quotient rule to see that
\[f^\prime(x)=\frac{(3)(x-2)-(3x+1)(1)}{(x-2)^2}=-\frac{7}{(x-2)^2}.\]
Therefore, \(f^\prime(3)=-7.\)
Part b
The reflection of the line \(L\) with slope \(m\) across \(\mathrm{pow}_1\) is the line \(L^{-1}\) with slope \(\frac{1}{m}\). So \((f^{-1})^\prime(10)\) should be equal to \(-\frac{1}{7}.\)
Part c
Solve the following equation for \(y\) in terms of \(x\) to obtain a formula \(f^{-1}:\)
\[x=\frac{3y+1}{y-2}.\]
The equation can be rewritten like this:
\[y=\frac{2x+1}{x-3}.\]
So, the inverse of \(f\) is given by
\[f^{-1}(x)=\frac{2x+1}{x-3}.\]
Part d
Use the quotient rule to see that
\[(f^{-1})^\prime (x)=\frac{(2)(x-3)-(2x+1)(1)}{(x-3)^2}=-\frac{7}{(x-3)^2}.\]
Evaluate the derivative at \(10\) to see that
\[(f^{-1})^\prime (10)=-\frac{7}{(10-3)^2}=-\frac{7}{7^2}=-\frac{1}{7}.\]
We can use the chain rule to derive the derivative of inverse functions.
For example, \(\mathrm{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 (Inverse Function Theorem)
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)}\)
Here is an example of theorem.
Example 2
Take \(f\) to be a continuous, invertible function on an open interval. For each of these choices of pair \((a,f(a))\) and real number \(f^\prime(a)\), determine \((f^{-1})^\prime(f(a))\):
\((a, f(a)) = (3, 5)\), \(f^\prime(3) = 2\);
\((a, f(a)) = (4, 10)\), \(f^\prime(4) = -6\).
Use the inverse Function Theorem to see that
\((f^{-1})^\prime(5) = \frac{1}{2}\)
\((f^{-1})^\prime(10) = -\frac{1}{6}.\)
In this next example, we will derive the derivative of \(\log_a\).
Example 3
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}.\)
In this next example, we derive the formula for \(\arctan.\)
Example 4
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:
\[ \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*} \]
Here is a theorem that summarizes the derivative of inverse trig functions.
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}}\)
Use this theorem to compute the following derivative.
Example 5
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*} \]
Here are some examples of taking derivatives of these functions.
Example 6
For each function \(f\) that is given below, carefully decompose \(f\) into simpler functions, write down the derivatives of the components of \(f\), and then use the rules for differentiation to determine a formula for \(f^\prime(x)\):
\(f(x) = x^4\ln(|x^3-8|)\);
\(f(x) = \frac{\arcsin\left(5x + x^2\right)}{5 + \cos(x)}\);
\(f(x) = x\left(\ln(x^2 +\sin(x) + 7)\right)^{\frac{3}{5}}\).
Part a
The function \(f\) decomposes like this:
\[f=(\pow_4) \cdot (\ln\circ \abs\circ(\pow_3-8)).\]
Use the chain rule to see that
\[\begin{align*} ( \ln\circ \abs\circ(\pow_3-8))^\prime(x)&=\ln^\prime(\abs\circ(\pow_3-8))(x)\cdot {\abs}^\prime\circ(\pow_3-8)(x)\cdot (\pow_3-8)^\prime(x)\\ &=\frac{{\abs}^\prime(x^3-8)}{|x^3-8|}\cdot(3x^2)\\ &=\frac{3x^2}{x^3-8}. \end{align*}\]
Use the product rule together with the previous observation to conclude that
\[\begin{align*} f^\prime(x)&=\pow_4^\prime(x)\cdot (\ln\circ \abs\circ(\pow_3-8))^\prime(x) +\pow_4(x)\cdot( \ln\circ \abs\circ(\pow_3-8))^\prime(x)\\ &=(4x^3)\cdot(\ln|x^3-8|) +(x^4)\cdot \left(\frac{3x^2}{x^3-8}\right)\\ &=4x^3\ln|x^3-8|+\frac{3x^6}{x^3-8}. \end{align*}\]
Part b
The function \(f\) decomposes like this:
\[f=\left(\frac{\arcsin\circ(5\pow_1+\pow_2)}{5+\cos}\right)^\prime.\]
Use the chain rule to see that
\[\begin{align*} (\arcsin\circ (5\pow_1+\pow_2))^\prime(x) &=(\arcsin^\prime\circ(5\pow_1+\pow_2))(x)\cdot(5\pow_1+\pow_2)^\prime(x)\\ &=\left(\frac{1}{\sqrt{1-(5x+x^2)^2}}\right)\cdot\left(5+2x\right)\\ &=\frac{2x+5}{\sqrt{1-(5x+x^2)^2}} \end{align*}\]
Use quotient rule together with the previous observation to conclude that
\[\begin{align*} f^\prime(x) &=\left(\frac{(\arcsin\circ (5\pow_1+\pow_2))^\prime\cdot(5+\cos)-(\arcsin\circ (5\pow_1+\pow_2))\cdot(5+\cos)^\prime}{(5+\cos)^2}\right)(x)\\ &=\frac{\left(\frac{2x+5}{\sqrt{1-(5x+x^2)^2}}\right)\cdot(5+\cos(x))-\arcsin(5x+x^2)\cdot(-\sin(x))}{(5+\cos(x))^2} \\ &=\frac{\left(\frac{2x+5}{\sqrt{1-(5x+x^2)^2}}\right)\cdot(5+\cos(x))+\arcsin(5x+x^2)\sin(x)}{(5+\cos(x))^2}. \end{align*}\]
Part c
The function \(f\) decomposes like this:
\[f=(\pow_1)\cdot(\pow_\frac{3}{5}\circ \ln\circ(\pow_2+\sin+7)).\]
Use the chain rule to see that
\[\begin{align*} (\pow_\frac{3}{5}\circ \ln\circ(\pow_2+\sin+7))^\prime(x) &=\left((\pow_\frac{3}{5})^\prime\circ \ln\circ(\pow_2+\sin+7)\right)(x)\cdot\left(\ln^\prime\circ(\pow_2+\sin+7)\right)(x)\\ &\phantom{=}\cdot\left(\pow_2+\sin+7\right)^\prime(x)\\ &=\left(\tfrac{3}{5}\left(\ln|x^2+\sin(x)+7|\right)^{-\frac{2}{5}}\right)\cdot\left(\frac{1}{x^2+\sin(x)+7}\right)\cdot(2x+\cos(x))\\ &=\left(\frac{3}{5(\ln|x^2+\sin(x)+7|)^\frac{2}{5}}\right)\cdot\left(\frac{2x+\cos(x)}{x^2+\sin(x)+7}\right). \end{align*}\]
Use product rule together with the previous observation to conclude that
\[\begin{align*} f^\prime(x) &=(\pow_1)^\prime(x)\cdot(\pow_\frac{3}{5}\circ \ln\circ(\pow_2+\sin+7))(x)\\ &\phantom{=}+(\pow_1)(x)\cdot (\pow_\frac{3}{5}\circ \ln\circ(\pow_2+\sin+7))^\prime(x) \\ &=(1)\cdot\left(\ln(x^2 +\sin(x) + 7)\right)^{\frac{3}{5}}+(x)\cdot\left(\frac{3}{5(\ln|x^2+\sin(x)+7|)^\frac{2}{5}}\right)\cdot\left(\frac{2x+\cos(x)}{x^2+\sin(x)+7}\right)\\ &=\left(\ln\left(x^2 +\sin(x) + 7\right)\right)^{\frac{3}{5}}+\left(\frac{3x}{5(\ln|x^2+\sin(x)+7|)^\frac{2}{5}}\right)\cdot\left(\frac{2x+\cos(x)}{x^2+\sin(x)+7}\right)\\ \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
Here is an example of Leinbiz notation.
Example 7
Evaluate the following:
\(\displaystyle \frac{{\rm d}}{{\rm d}x}\Big|_{x=-2}\left(\sin(x^3)\ln(x^4+3)\right)\);
\(\displaystyle \frac{{\rm d}}{{\rm d}x}\left(\arctan(5x) + \cos(2x^3+1)\right)^{\frac{5}{7}}\).
Part a
Use the product and chain rule to obtain that
\[\begin{align*} \displaystyle \frac{{\rm d}}{{\rm d}x}\Big|_{x=-2}\left(\sin(x^3)\ln(x^4+3)\right) &=\left(\frac{{\rm d}}{{\rm d}x}\Big|_{x=-2}\sin(x^3)\right)\cdot \ln((-2)^4+3)\\ &\phantom{=}+\sin((-2)^3)\cdot\left(\frac{{\rm d}}{{\rm d}x}\Big|_{x=-2}\ln(x^4+3)\right)\\ &=\left(\left( \frac{{\rm d}}{{\rm d}u}\Big|_{u=(-2)^3}\sin(u)\right)\cdot \left(\frac{{\rm d}}{{\rm d}x}\Big|_{x=-2}x^3\right)\right)\cdot\ln(19)\\ &\phantom{=}+\sin(-8)\cdot\left(\left(\frac{{\rm d}}{{\rm d}u}\Big|_{u=19}\ln(u)\right)\cdot\left(\frac{{\rm d}}{{\rm d}x}\Big|_{x=-2}(x^4+3)\right)\right)\\ &=\cos(-8)\cdot 3(-2)^2\cdot\ln(19)+\sin(-8)\cdot\frac{1}{19}\cdot4\cdot(-2)^3. \end{align*}\]
Part b
Use the the chain rule and linearity of differentiation to obtain that
\[\begin{align*} \displaystyle \tfrac{{\rm d}}{{\rm d}x}\left(\arctan(5x) + \cos(2x^3+1)\right)^{\frac{5}{7}} &=\left(\tfrac{{\rm d}}{{\rm d}u}\Big|_{u=\arctan(5x)+\cos(2x^3+1)}u^\frac{5}{7}\right)\cdot \tfrac{{\rm d}}{{\rm d}x}(\arctan(5x)+\cos(2x^3+1))\\ &=\tfrac{5}{7}(\arctan(5x)+\cos(2x^3+1))^{-\frac{2}{7}}\\ &\phantom{=}\cdot \left[\tfrac{{\rm{d}}}{{\rm{d}}u}\Big|_{u=5x}\arctan(u)\cdot\tfrac{{\rm{d}}}{{\rm{d}}x} (5x)+\tfrac{{\rm{d}}}{{\rm{d}}u}\Big|_{u=2x^3+1}\cos(u)\cdot\tfrac{{\rm{d}}}{{\rm{d}}x}(2x^3+1)\right]\\ &=\tfrac{5}{7}\left(\arctan(5x)+\cos(2x^3+1)\right)^{-\frac{2}{7}}\cdot\left(\tfrac{5}{1+(5x)^2}-6x^2\sin(2x^3+1)\right). \end{align*}\]
Now use implicit differentiation to determine the following.
Example 8
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*} \]
Here is additional practice.
Example 9
For each equation that is given below, show that the given point \((a,b)\) is in the solution set of the equation. Suppose without justification that each of these given equations determines \(y\) as a function of \(x\) in some open rectangle that contains \((a,b)\). Use implicit differentiation to determine the quantity \(\frac{{\rm d}y}{{\rm d}x}\big|_{(a,b)}\) for these choices of equation and point \((a,b)\) in the solution set of the equation:
\(x^2 + 4y^2 = 13\) and \((a,b) = \big(1, \sqrt{3}\big)\);
\(xy^2+x^2=5\) and \((a,b) = (-5, 2)\).
\(\sin\!\left(x+2y^2-1\right)=xy\) and \((a,b) = (1, 0)\).
Part a
Take the derivative with respect to \(x\) to see that
\[\frac{{\rm {d}}}{{\rm {d}}x}\left(13\right)=0\]
and
\[\frac{{\rm {d}}}{{\rm {d}}x}\left(x^2+4y^2\right)=\frac{{\rm {d}}}{{\rm {d}}x}(x^2)+4\frac{{\rm {d}}}{{\rm {d}}x}(y^2)=2x+8y\frac{{\rm {d}}y}{{\rm {d}}x}.\]
Rearrange the terms in the equality to obtain that
\[\begin{align*} \frac{{\rm {d}}}{{\rm {d}}x}\left(x^2+4y^2\right)&=\frac{{\rm {d}}}{{\rm {d}}x}(13)\\ 2x+8y\frac{{\rm {d}}y}{{\rm {d}}x}&=0\\ 8y\frac{{\rm {d}}y}{{\rm {d}}x}&=-2x\\ \frac{{\rm {d}}y}{{\rm {d}}x}&=-\frac{x}{4y}.\\ \end{align*}\]
Evaluate \(\frac{{\rm {d}}y}{{\rm {d}}x}\) at \((1,\sqrt{3})\) to obtain the equality
\[\frac{{\rm {d}}y}{{\rm {d}}x}\Big|_{(1,\sqrt{3})}=-\frac{1}{4\sqrt{3}}.\]
Part b
Take the derivative with respect to \(x\) to see that
\[\frac{{\rm {d}}}{{\rm {d}}x}\left(5\right)=0\]
and
\[\frac{{\rm {d}}}{{\rm {d}}x}\left(xy^2+x^2\right)=\frac{{\rm {d}}}{{\rm {d}}x}(xy^2)+\frac{{\rm {d}}}{{\rm {d}}x}(x^2)=y^2+2xy\frac{{\rm {d}}y}{{\rm {d}}x}+2x.\]
Rearrange the terms in the equality to obtain that
\[\begin{align*} \frac{{\rm {d}}}{{\rm {d}}x}\left(xy^2+x^2\right)&=\frac{{\rm {d}}}{{\rm {d}}x}(5)\\ y^2+2xy\frac{{\rm {d}}y}{{\rm {d}}x}+2x&=0\\ 2xy\frac{{\rm {d}}y}{{\rm {d}}x}&=-2x-y^2\\ \frac{{\rm {d}}y}{{\rm {d}}x}&=-\frac{2x+y^2}{2xy}.\\ \end{align*}\]
Evaluate \(\frac{{\rm {d}}y}{{\rm {d}}x}\) at \((-5,2)\) to obtain the equality
\[\frac{{\rm {d}}y}{{\rm {d}}x}\Big|_{(-5,2)}=-\frac{2(-5)+(2)^2}{2(-5)(2)}=-\frac{6}{20}=-\frac{3}{10}.\]
Part c
Take the derivative with respect to \(x\) to see that
\[\frac{{\rm {d}}}{{\rm {d}}x}\left(xy\right)=y+x\frac{{\rm {d}}y}{{\rm {d}}x}\]
and
\[\frac{{\rm {d}}}{{\rm {d}}x}\left(\sin(x+2y^2-1)\right)=\cos(x+2y^2-1)\frac{{\rm {d}}}{{\rm {d}}x}(x+2y^2-1)=\cos(x+2y^2-1)\left(1+4y\frac{{\rm {d}}y}{{\rm {d}}x}\right)\]
Rearrange the terms in the equality to obtain that \[\begin{align*} \frac{{\rm {d}}}{{\rm {d}}x}\left(\sin(x+2y^2-1)\right)&=\frac{{\rm {d}}}{{\rm {d}}x}(xy)\\ \cos(x+2y^2-1)\left(1+4y\frac{{\rm {d}}y}{{\rm {d}}x}\right)&=y+x\frac{{\rm{d}}y}{{\rm{d}}x}\\ \cos(x+2y^2-1)+4y\cos(x+2y^2-1)\frac{{\rm {d}}y}{{\rm {d}}x}&=y+x\frac{{\rm{d}}y}{{\rm{d}}x}\\ 4y\cos(x+2y^2-1)\frac{{\rm {d}}y}{{\rm {d}}x}-x\frac{{\rm{d}}y}{{\rm{d}}x}&=y-\cos(x^2+2y-1)\\ (4y\cos(x+2y^2-1)-x)\frac{{\rm{d}}y}{{\rm{d}}x}&=y-\cos(x+2y^2-1)\\ \frac{{\rm{d}}y}{{\rm{d}}x}&=\frac{y-\cos(x+2y^2-1)}{4y\cos(x+2y^2-1)-x}\\ \end{align*}\]
Evaluate \(\frac{{\rm {d}}y}{{\rm {d}}x}\) at \((1,0)\) to obtain the equality
\[\frac{{\rm {d}}y}{{\rm {d}}x}\Big|_{(1,0)}=\frac{0-\cos(1+2(0)^2-1)}{4(0)\cos(1+2(0)^2-1)-1}=-\frac{\cos(0)}{0-1}=1.\]
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.
It will be helpful to recall the following logarithm properties.
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]\)
Here are some quick examples of the properties.
Example 10
- \(\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))\)
Try using logarithm differetnation to calculate the following.
Example 11
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*}\]
Here are two additional examples.
Example 12
For each rational function \(f\) that is given below, use logarithmic differentiation to determine \(f^\prime(x)\):
\(f(x) = (x+1)(x+3)(x^2 +5)(x^5 -3x^2 +2x +1)\);
\(f(x) = \frac{(x^2+1)(2x+7)(x-8)}{(x+3)(x^4 - x + 2)}\).
Part a
Notice that \[\frac{{\rm{d}}}{{\rm{d}}x}\ln(|f(x)|)=\frac{f^\prime(x)}{f(x)}\quad\text{implies that}\quad f^\prime(x)=f(x)\cdot\frac{{\rm{d}}}{{\rm{d}}x}\ln(|f(x)|).\]
Use logarithm properties to see that \[\ln(|f(x)|)=\ln|x+1|+\ln|x+3|+\ln|x^2+5|+\ln|x^5-3x^2+2x+1|.\]
Use the chain rule and linearity of differentiation to get the equality
\[\begin{align*} \frac{{\rm{d}}}{{\rm{d}}x}\ln(|f(x)|) &=\frac{{\rm{d}}}{{\rm{d}}x}\left(\ln|x+1|+\ln|x+3|+\ln|x^2+5|+\ln|x^5-3x^2+2x+1|\right)\\ &=\frac{1}{x+1}+\frac{1}{x+3}+\frac{2x}{x^2+5}+\frac{5x^4-6x+2}{x^5-3x^2+2x+1}. \end{align*}\]
So
\[\begin{align*} f^\prime(x) &=f(x)\cdot\frac{{\rm{d}}}{{\rm{d}}x}\ln(|f(x)|)\\ &=\left((x+1)(x+3)(x^2 +5)(x^5 -3x^2 +2x +1)\right)\left(\tfrac{1}{x+1}+\tfrac{1}{x+3}+\tfrac{2x}{x^2+5}+\tfrac{5x^4-6x+2}{x^5-3x^2+2x+1}\right). \end{align*}\]
Part a
Use logarithm properties to see that \[\ln(|f(x)|)=\ln|x^2+1|+\ln|2x+7|+\ln|x-8|-\ln|x+3|-\ln|x^4-x+2|.\]
Use the chain rule and linearity of differentiation to get the equality
\[\begin{align*} \frac{{\rm{d}}}{{\rm{d}}x}\ln(|f(x)|) &=\frac{{\rm{d}}}{{\rm{d}}x}\left(\ln|x^2+1|+\ln|2x+7|+\ln|x-8|-\ln|x+3|-\ln|x^4-x+2|\right)\\ &=\frac{2x}{x^2+1}+\frac{2}{2x+7}+\frac{1}{x-8}-\frac{1}{x+3}-\frac{4x^3-1}{x^4-x+2}. \end{align*}\]
So
\[\begin{align*} f^\prime(x) &=f(x)\cdot\frac{{\rm{d}}}{{\rm{d}}x}\ln(|f(x)|)\\ &=\left(\frac{(x^2+1)(2x+7)(x-8)}{(x+3)(x^4 - x + 2)}\right)\cdot\left(\frac{2x}{x^2+1}+\frac{2}{2x+7}+\frac{1}{x-8}-\frac{1}{x+3}-\frac{4x^3-1}{x^4-x+2}\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 13
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*} \]
Here are three more examples to look at.
Example 14
For each of these choices of function \(f\), determine \(f^\prime(x)\):
\(f(x) = x^{x^2+5}\), where \(x>0\);
\(f(x) = x^{x^x}\), where \(x>0\);
\(f(x) = (3+\cos^2(x))^{x^2+x+4}\).
Part a
Rewrite \(f\) like this: \[f(x)=x^{x^2+5}=\exp(\ln(x^{x^2+5}))=\exp((x^2+5)\cdot\ln(x)).\]
Use the chain rule and product rule to obtain the equality
\[\begin{align*} f^\prime(x) &=\exp^\prime ((x^2+5)\cdot\ln(x))\cdot\frac{{\rm{d}}}{{\rm{d}}x}\left((x^2+5)\cdot\ln(x)\right)\\ &=\exp((x^2+5)\cdot \ln(x))\cdot \left(2x\ln(x)+\frac{x^2+5}{x}\right)\\ &=\underbrace{\exp((x^2+5)\cdot \ln(x))}_{=f(x)}\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*}\]
Alternatively, use logarithmic differentiation to see that
\[\frac{{\rm{d}}}{{\rm{d}}x}\ln(x^{x^2+5})=\frac{{\rm{d}}}{{\rm{d}}x}(x^2+5)\ln(x)=2x\ln(x)+\frac{x^2+5}{x}\]
and so
\[\begin{align*} f^\prime(x) &=f(x)\cdot \frac{{\rm{d}}}{{\rm{d}}x}\ln(x^{x^2+5})\\ &=x^{x^2+5}\left(2x\ln(x)+\frac{x^2+5}{x}\right) \end{align*}\]
Part b
Take \(g(x)=x^x\) so that \[f(x)=x^{x^x}=x^{g(x)}.\]
Rewrite \(f\) like this:
\[f(x)=x^{g(x)}=\exp(\ln(x^{g(x)}))=\exp(g(x)\cdot\ln(x)).\] Use the chain rule, the product rule, and \(g^\prime(x)=(\ln(x)+1)x^x\) to see that
\[\begin{align*} f^\prime(x) &=\exp^\prime (g(x)\cdot\ln(x))\cdot\frac{{\rm{d}}}{{\rm{d}}x}\left(g(x)\cdot\ln(x)\right)\\ &=\exp(g(x)\cdot \ln(x))\cdot \left(g^\prime(x)\ln(x)+\frac{g(x)}{x}\right)\\ &=\underbrace{\exp((g(x)\cdot \ln(x))}_{=f(x)}\cdot \left((\ln(x)+1)x^x\ln(x)+\frac{x^{x}}{x}\right)\\ &=x^{x^x}\cdot\left((\ln(x)+1)x^x\ln(x)+x^{x-1}\right). \end{align*}\]
Part c
Rewrite \(f\) like this:
\[f(x)=(3+\cos^2(x))^{x^2+x+4}=\exp((x^2+x+4)\ln(3+\cos^2(x))).\] Use the chain rule and the product rule to see that
\[\begin{align*} f^\prime(x) &=\exp^\prime((x^2+x+4)\ln(3+\cos^2(x)))\cdot \frac{{\rm{d}}}{{\rm{d}}x}\left((x^2+x+4)\ln(3+\cos^2(x)) \right)\\ &=\exp((x^2+x+4)\ln(3+\cos^2(x))\left((2x+1)\ln(3+\cos^2(x))+(x^2+x+4)\cdot(-2\cos(x)\sin(x))\right)\\ &=(3+\cos^2(x))^{x^2+x+4}\left((2x+1)\ln(3+\cos^2(x))-2(x^2+x+4)\cos(x)\sin(x)\right). \end{align*}\]
Implicit Function Theorem
Under what conditions are we guaranteed to be able to write some sort of curve as a function of \(x\) or a function of \(y\)?
To state the conditions, we need some terminology.
Given a function \(f\) of two variables \(x\) and \(y\), take \(f(a,\cdot)\) and \(f(\cdot,b)\) to be new functions that are defined in the following way:
For any \(y\), \(f(a,\cdot)(y)=f(a,y)\).
For any \(x\), \(f(\cdot,b)(c)=f(x,b)\).
That is, fix one of the variables by treating it as a constant.
Here is an example of this.
Example 15
For each of these choices of function \(f\) of two real variables and real numbers \(a\) and \(b\), determine \(f(a, \cdot)\) and \(f(\cdot, b)\):
\(f(x,y) = 3x-y\), \(a = 1\), and \(b = 2\);
\(f(x,y) = x\cos(xy)\), \(a = 2\), and \(b = 3\).
\(\left(f(\cdot,2)\right)(x)=3x-2\) and \(\left(f(1,\cdot)\right)(y)=3-y\)
\(\left(f(\cdot,3)\right)(x)=x\cos(3x)\) and \(\left(f(2,\cdot)\right)(y)=2\cos(2y)\)
In the next example, we will find the derivative of these kind of functions.
Example 16
Take \(f\) to be the function that is given by \[f(x,y) = xy^3 + x^2 +7\] Determine the derivative of \(f(3, \cdot)\) and the derivative of \(f(\cdot, 2)\), that is, find a formula for \(f^\prime(3,y)\) and for \(f^\prime(x, 2)\).
We have that \[f(3,y)=3y^3+16\quad\text{and}\quad f(x,2)=8x+x^2+7\] so \[f^\prime(3,y)=9y^2\quad\text{and}\quad f^\prime(x,2)=8+2x.\]
Here is another example.
Example 17
Take \(f\) to be the function that is given by \[f(x,y) = x\sqrt{3x^2 + y^4}.\] Determine the derivative of \(f(2, \cdot)\) and the derivative of \(f(\cdot, 1)\), that is, find a formula for \(f^\prime(2,y)\) and for \(f^\prime(x, 1)\).
We have that \[f(2,y)=2\sqrt{12+y^4}\quad\text{and}\quad f(x,1)=x\sqrt{3x^2+1}\] so \[f^\prime(2,y)=\frac{2}{2\sqrt{12+y^4}}\cdot(4y^3)=\frac{4y^3}{\sqrt{12+y^4}}\]
and
\[f^\prime(x,1)=\sqrt{3x^2+1}+\frac{x}{2\sqrt{3x^2+1}}\cdot(6x)=\sqrt{3x^2+1}+\frac{3x^2}{\sqrt{3x^2+1}}.\]
These kind of derivatives have special names.
The partial derivative of \(f\) with respect to \(x\), \(f_x\) is defined as \(f_x(a,b)=f^\prime(\cdot,b)(a).\)
The partial derivative of \(f\) with respect to \(y\), \(f_y\) is defined as \(f_y(a,b)=f^\prime(a,\cdot)(b).\)
Example 18
For each function \(f\) that is given below, calculate \(f_x(x,y)\) and \(f_y(x,y)\):
\(f(x,y) = x^2y^3 + x^5 + y + 3\);
\(f(x,y) = x^3 + \sin(y) + 1\);
\(f(x,y) = x^5\cos(y^2) + 2\);
\(f(x,y) = \sqrt{x^2 + 3y^2} + y\sqrt{5x^4+6}\).
The partial derivative of \(f\) with respect to \(x\) is \[f_x(x,y)=2xy^3+5x^4\] and the partial derivative of \(f\) with respect to \(y\) is \[f_y(x,y)=3x^2y^2+1.\]
The partial derivative of \(f\) with respect to \(x\) is \[f_x(x,y)=3x^2\] and the partial derivative of \(f\) with respect to \(y\) is \[f_y(x,y)=\cos(y).\]
The partial derivative of \(f\) with respect to \(x\) is \[f_x(x,y)=5x^4\cos(y^2)\] and the partial derivative of \(f\) with respect to \(y\) is \[f_y(x,y)=-2yx^5\sin(y^2).\]
The partial derivative of \(f\) with respect to \(x\) is \[f_x(x,y)=\frac{x}{\sqrt{x^2+3y^2}}+\frac{20x^3y}{\sqrt{5x^4+6}}\] and the partial derivative of \(f\) with respect to \(y\) is \[f_y(x,y)=\frac{3y}{\sqrt{x^2+3y^2}}+\sqrt{5x^4+6}.\]
We are now ready to state the implicit function theorem.
Implicit Function Theorem
For any real valued function \(f\) that is defined on an open rectangle \(D\), and for any \((x_0,y_0)\) in \(D\), if
- \(f\) is continuous on \(D\) and \(f(x_0,y_0)=0\)
- \(f_y\) exists on \(D\) and is continuous at \((x_0,y_0)\),
- and \(f_y(x_0,y_0)\) is not equal to \(0\),
then there is an open rectangle \(I\times J\) that contains \((x_0,y_0)\) so that the set \(g\) that is given by
\[g=R\cap \{(x,y)\in D\colon f(x,y)=0\}\]
is a function that is defined on \(I\) and differential at \(x_0\).
The analogous statement is valid with \(x\) and \(y\) switched, but in this case \(x\) will be a function of \(y.\)
Practice using this theorem with this example.
Example 19
Take \(f\) to be the function that is given by \[f(x,y) = x^2 + y^2.\] For each of these choices of \((a,b)\), determine whether the implicit function theorem guarantees that the level set \[f(x,y) = 1\] locally determines \(y\) as a function of \(x\) or \(x\) as a function of \(y\) in the intersection of some open rectangle that contains \((a,b)\):
\((a, b) = (\frac{3}{5}, \frac{4}{5})\);
\((a, b) = (1, 0)\);
\((a, b) = (0, 1)\).
Part a
The partial derivative with respect to \(x\) and \(y\) of \(f\) is, respectively, \[f_x(x,y)=2x\quad\text{and}\quad f_y(x,y)=2y.\] The partial derivatives evaluated at \((\tfrac{3}{5},\tfrac{4}{5})\) are respectively \[f_x(\tfrac{3}{5},\tfrac{4}{5})=\tfrac{6}{5}\quad\text{and}\quad f_y(\tfrac{3}{5},\tfrac{4}{5})=\tfrac{8}{5}.\] Since the partial derivative with respect to \(x\) evaluated at \((\tfrac{3}{5},\tfrac{4}{5})\) is non-zero, \(x\) is a function of \(y\). Since the partial derivative with respect to \(y\) evaluated at \((\tfrac{3}{5},\tfrac{4}{5})\) is non-zero, \(y\) is a function of \(x\).
Part b
The partial derivatives evaluated at \((1,0)\) are respectively \[f_x(1,0)=2\quad\text{and}\quad f_y(1,0)=0.\] Since the partial derivative with respect to \(x\) evaluated at \((1,0)\) is non-zero, \(x\) is a function of \(y\). The theorem is inconclusive in regards to whether \(y\) is a function of \(x.\)
Part c
The partial derivatives evaluated at \((0,1)\) are respectively \[f_x(0,1)=0\quad\text{and}\quad f_y(0,1)=2.\] Since the partial derivative with respect to \(y\) evaluated at \((0,1)\) is non-zero, \(y\) is a function of \(x\). The theorem is inconclusive in regards to whether \(x\) is a function of \(y.\)