## Section7.5Implicit Differentiation and Derivatives of Inverse Functions

When we developed the power rule for derivatives, we were able to prove the rule was true for positive integers as well as for the special case of integer multiples of $\frac{1}{2}\text{.}$ Other reciprocal powers like $\frac{1}{3}\text{,}$ $\frac{1}{4}\text{,}$ or $\frac{1}{5}$ are the inverses of the corresponding integer powers 3, 4, or 5, respectively. Having established the differentiation rule for exponential functions, we want to find the rule for their inverses, the logarithm functions.

In preparation for differentiation rules of inverse functions, this section introduces the concept of an implicit function. Implicit functions and the chain rule result in the process of implicit differentiation, which creates an equation involving the derivative of the implicit function. We then use this process to complete the rules of differentiation.

### Subsection7.5.1Implicit Functions

A function is defined explicitly when a formula for the output is given in terms of the input. If we define a dependent variable using such a function, say $y=f(x)\text{,}$ then we say $y$ is defined explicitly as a function of $x\text{.}$

On the other hand, we also encounter situations where two variables are related through an equation but not in a way that is an explicit formula. When the graph of the equation defines a curve, say in the $(x,y)$ plane, we say that the equation defines $y$ as an implicit function of $x\text{.}$ (It also defines $x$ as an implicit function of $y\text{,}$ depending on which variable we wish to consider as the dependent variable.)

###### Example7.5.1

The equation $2x-3y=6$ has a graph that is a line. This equation defines $y$ as an implicit function of $x\text{.}$ If we solve for $y$ to find

\begin{equation*} y = \frac{2x-6}{3}, \end{equation*}

then we have now defined $y$ as an explicit function of $x\text{.}$

A graph does not represent a function when it fails the vertical line test. In spite of this, connected segments of the graph that individually pass the vertical line test can still be treated as functions for which we seek to find the derivative. It is in this context that we are interested in implicit functions.

###### Example7.5.2

The equation $x^2+y^2=4$ has a graph that is a circle centered at $(0,0)$ and with radius 2. The graph fails the vertical line test which means that the relation fails to define $y$ as a function of $x\text{.}$ However, the top half of the circle considered separately is a function, as is the bottom half of the circle. We see this when we attempt to solve the equation for $y$ and obtain

\begin{gather*} y^2 = 4 - x^2, \\ y = \pm \sqrt{4-x^2}. \end{gather*}

Each of the branches of the graph, $y=\sqrt{4-x^2}$ and $y=-\sqrt{4-x^2}\text{,}$ defines $y$ as an explicit function of $x\text{.}$ The original equation $x^2+y^2=4$ defines both of these functions implicitly without requiring solving for $y\text{.}$

When an equation involving two variables (like $x$ and $y$) has a graph that consists of curves, the connected components of those curves that individually pass the vertical line test define the dependent variable (e.g., $y$) as an implicit function of the independent variable (e.g., $x$).

### Subsection7.5.2Implicit Differentiation

Once we recognize that an equation defines $y$ as an implicit function of $x\text{,}$ we can compute the derivative $y'=\frac{dy}{dx}$ using a process called implicit differentiation. Recall that when a dependent variable $y$ is a function of $x\text{,}$ computing a derivative of a function of $y$ requires an application of the chain rule. We also must use any other differentiation rule as appropriate.

###### Example7.5.3

Suppose that $y$ is a function of $x\text{.}$ Find the derivatives of the following expressions in terms of $x\text{,}$ $y$ and $y'\text{.}$

1. $\displaystyle \frac{d}{dx}[y^3]$
2. $\displaystyle \frac{d}{dx}[x^2 y]$
3. $\displaystyle \frac{d}{dx}[xe^{x+y}]$
Solution

We find the derivative by recognizing how the expression is computed and using the appropriate rules of differentiation.

1. The expression $y^3$ is a composition $(y(x))^3$ so that the chain rule along with the power rule allow us to find the derivative:

\begin{equation*} \frac{d}{dx}[y^3] = 3y^2 \cdot y'. \end{equation*}
2. The expression $x^2 y$ is a product of $x^2$ and $y(x)\text{,}$ so the derivative will require using the product rule of derivatives.

\begin{equation*} \frac{d}{dx}[x^2 y] = \frac{d}{dx}[x^2] \cdot y + x^2 \cdot \frac{d}{dx}[y] = 2xy + x^2 y' \end{equation*}
3. The expression $xe^{x+y}$ is a product of $x$ and $e^{x+y}\text{,}$ so we start by using the product rule. To differentiate $e^{x+y}\text{,}$ we need the chain rule for $e^u$ where $u=x+y\text{.}$ Finally, when we differentiate $y\text{,}$ we get the function $y'\text{.}$

\begin{align*} \frac{d}{dx}[xe^{x+y}] &= \frac{d}{dx}[x] e^{x+y} + x \frac{d}{dx}[e^{x+y}] \\ &= e^{x+y} + x e^{x+y} \frac{d}{dx}[x+y] \\ &= e^{x+y} + x e^{x+y} (1+y') \\ & = e^{x+y}(1+x+xy') \end{align*}

Implicit differentiation builds on the idea that if $f(x) = g(x)$ for all $x$ in an interval, then $f'(x)=g'(x)$ on the same interval. That is, if two functions are equal then their derivatives must be equal. So consider an equation in $x$ and $y$ that defines $y$ as an implicit function of $x\text{.}$ We can think of the left side of the equation as defining one function (like the $f(x)$ in the earlier sentence) and the right side of the equation as defining a second function (like the $g(x)$). Then the derivatives of the two sides of the equations must also be equal.

Implicit differentiation uses the following steps.

1. Start with an equation involving your two variables, say $x$ and $y\text{.}$ It may be desirable to find an equivalent equation for which derivatives are easier to compute.

2. Create a new equation by differentiating each side of the equation. The dependent variable must be treated as an implicit function so that the new equation involves the variables $x$ and $y$ and the derivative $y'=\frac{dy}{dx}$).

3. Solve the new equation for $y'=\frac{dy}{dx}$ as a function of $x$ and $y\text{.}$ If the slope at a particular point is desired, substitute the values of $x$ and $y$ to find a value for $y'\text{.}$

###### Example7.5.4

The equation $x^2+5y^2 = 15-3xy$ defines an ellipse, shown below. What is the slope of the curve at the point $(2,1)\text{?}$

Solution

We recognize $y$ as an implicit function of $x$ and differentiate the two functions in the equation to create a new equation.

\begin{gather*} \frac{d}{dx}[x^2+5y^2] = \frac{d}{dx}[15-3xy] \\ 2x + 10 y y' = 0 - (3\cdot y + 3x \cdot y') \\ 2x + 10 y y' = -3y -3xy' \end{gather*}

From this new equation, we solve for $y'$ by moving all terms with $y'$ to the same side of the equation.

\begin{equation*} 2x+3y = -3xy' - 10yy' \end{equation*}

Next, factor out the common factor of $y'$ and the solve for $y'$ with division.

\begin{gather*} 2x+3y = -(3x + 10y)y' \\ -\frac{2x+3y}{3x+10y} = y' \end{gather*}

This gives us the formula for the slope at any point in terms of $x$ and $y\text{,}$

\begin{equation*} \frac{dy}{dx} = y' = -\frac{2x+3y}{3x+10y}. \end{equation*}

To find the actual slope at the point $(x,y)=(2,1)\text{,}$ we use the values $x=2$ and $y=1\text{:}$

\begin{equation*} \left.\frac{dy}{dx}\right|_{(x,y)=(2,1)} = -\frac{2(2)+3(1)}{3(2)+10(1)} = -\frac{7}{16} = -\frac{7}{16}. \end{equation*}

We could also find the equation of the tangent line knowing this information,

\begin{equation*} y = \frac{-7}{16}(x-2) + 1. \end{equation*}

### Subsection7.5.3Derivatives of Inverse Functions

Suppose that we know a function $f(x)$ and its derivative $f'(x)\text{.}$ We are now interested in knowing how this information might relate to its inverse. In general, the function $f$ does not necessarily have an inverse function unless it happens to be one-to-one. So suppose that $f$ has an inverse function $f^{-1}\text{.}$

The equation for the graph of the inverse function is $y=f^{-1}(x)\text{.}$ By virtue of being an inverse function, this equation is equivalent to the inverse equation

\begin{equation*} f(y) = x. \end{equation*}

We can use this equation and the ideas of implicit differentiation to find the derivative of the inverse function,

\begin{equation*} \frac{d}{dx}[f^{-1}(x)] = \frac{dy}{dx} = y'. \end{equation*}

Differentiating the left side of the inverse equation and the chain rule leads to an implicit differentiation equation

\begin{equation*} f'(y) \cdot y' = 1, \end{equation*}

from which we can solve for $y'$ to get

\begin{equation*} y' = \frac{dy}{dx} = \frac{1}{f'(y)}. \end{equation*}

This result is saying that the slope for the inverse function is related to the slope of the original function. If the graph of $f$ has a point $(a,b)$ and a derivative $f'(a)\text{,}$ then the graph of the inverse function includes the corresponding point $(b,a)$ and has the reciprocal rate of change $\left.\frac{df^{-1}}{dx}\right|_b=\frac{1}{f'(a)}\text{.}$ To find the rate of change of an inverse function, we need to identify the corresponding point for the original function, $a=f^{-1}(b)\text{.}$ This is formally stated in the following theorem, with $x$ as a variable in place of $b\text{.}$

This first example illustrates the principle for a specific point.

###### Example7.5.6

A function $f(x)= x^3+3x$ has an inverse function because it is one-to-one, but the formula for the inverse function $f^{-1}(x)$ is not easy to find. Because $f(1)=4$ we know $f^{-1}(4)=1\text{.}$ Find the equation of the tangent line to $y=f^{-1}(x)$ at $x=4\text{.}$

Solution

This problem requires using the theorem for derivatives of inverse functions. We know that the original function $f(x)=x^3+3x$ has a derivative $f'(x) = 3x^2+3\text{.}$ Consequently, the graph of $f$ has a tangent line with slope $f'(1)=3(1^2)+3=6$ at the point $(1,4)\text{.}$ The inverse function $y=f^{-1}(x)$ must then have a corresponding point $(4,1)$ and tangent line with slope $\frac{1}{6}\text{.}$

Formally, the theorem for derivatives of inverse functions states that for $y=f^{-1}(x)\text{,}$

\begin{equation*} \left. \frac{dy}{dx} \right|_{x=4} = \frac{1}{f'(f^{-1}(4))}. \end{equation*}

Because $f^{-1}(4)=1$ and $f'(1) = 6\text{,}$ we know,

\begin{equation*} \left. \frac{dy}{dx} \right|_{x=4} = \frac{1}{f'(1)} = \frac{1}{6}. \end{equation*}

Knowing the slope and the point, we can find the equation for the tangent line,

\begin{equation*} y = 1 + \frac{1}{6}(x-4). \end{equation*}

When finding the derivative of an inverse function with the goal of finding a formula, we need to simplify the expression $f'(f^{-1}(x))\text{.}$ In many cases, this composition will simplify nicely.

###### Example7.5.7

The functions $f(x)=x^2$ for $x\ge 0$ and $f^{-1}(x)=\sqrt{x}$ are inverse functions. Use the derivative of an inverse function to find $\frac{d}{dx}[\sqrt{x}]\text{.}$

Solution

The original equation for the square root is $y=\sqrt{x}\text{,}$ which is equivalent to the inverse equation,

\begin{equation*} y^2 = x. \end{equation*}

\begin{equation*} 2y y' = 1 \quad \Rightarrow \quad y' = \frac{1}{2y}. \end{equation*}

Using the original inverse $y=\sqrt{x}\text{,}$ this simplifies to

\begin{equation*} \frac{d}{dx}[\sqrt{x}] = y' = \frac{1}{2 \sqrt{x}}. \end{equation*}

Alternatively, just using the theorem for derivatives of inverse functions with $f(x) = x^2$ and $f^{-1}(x) =\sqrt{x}\text{,}$ we have $f'(x)=2x$ so that

\begin{equation*} \frac{d}{dx}[\sqrt{x}] = \frac{1}{f'(f^{-1}(x))} = \frac{1}{2 \sqrt{x}}. \end{equation*}
###### Example7.5.8

The functions $f(x)=e^x$ and $f^{-1}(x)=\ln{x}$ are inverse functions. Use the derivative of an inverse function to find $\frac{d}{dx}[\ln(x)]\text{.}$

Solution

The original equation for the logarithm is $y=\ln(x)\text{,}$ defined for $x \gt 0\text{,}$ which is equivalent to the inverse equation,

\begin{equation*} e^y = x. \end{equation*}

\begin{equation*} e^y y' = 1 \quad \Rightarrow \quad y' = \frac{1}{e^y}. \end{equation*}

Using the original inverse $y=\ln(x)\text{,}$ this simplifies to

\begin{equation*} \frac{d}{dx}[\ln(x)] = y' = \frac{1}{e^{\ln(x)}}= \frac{1}{x}. \end{equation*}

The theorem for derivatives of inverse functions with $f(x) = e^x$ and $f^{-1}(x) =\ln(x)\text{,}$ we have $f'(x)=e^x$ so that

\begin{equation*} \frac{d}{dx}[\ln(x)] = \frac{1}{f'(f^{-1}(x))} = \frac{1}{e^{\ln(x)}} = \frac{1}{x}. \end{equation*}

The previous example is important. We summarize the result as a theorem. The implicit differentiation argument required $x \gt 0\text{.}$ We can extend the result by considering the logarithm of the absolute value of $x\text{.}$

For $x \gt 0\text{,}$ we have $|x|=x$ and $\ln(|x|) = \ln(x)\text{.}$ Implicit differentiation showed $\displaystyle \frac{d}{dx}[\ln(|x|)] = \frac{1}{x}\text{.}$ For $x \lt 0\text{,}$ we have $|x|=-x$ and $\ln(|x|) = \ln(-x)\text{.}$ Differentiation requires the chain rule,

\begin{align*} \frac{d}{dx}[\ln(|x|)] &= \frac{d}{dx}[\ln(-x)] \\ &\underset{u=-x}{=} \frac{1}{u} \cdot \frac{du}{dx} \\ &= \frac{1}{-x} \cdot (-1) = \frac{1}{x}. \end{align*}

Therefore, the differentiation rule is true for all $x \ne 0$

Using the chain rule gives us a more general differentiation rule,

\begin{equation*} \frac{d}{dx}[\ln(|u|)] = \frac{1}{u} \frac{du}{dx}\text{.} \end{equation*}

This is summarized as a theorem.

### Subsection7.5.4Summary

• An equation in two variables generally defines a curve in the plane. When the equation is solved for one of the variables, the equation defines that dependent variable as an explicit function of the other.

• When an equation defines a curve but is not solved for one of the variables, we can still treat a dependent variable as an implicit function of the other. The curve overall may not satisfy the vertical line test for a function, but isolated segments of the curve could.

• Implicit differentiation treats a dependent variable as an implicit function and creates an equation for the derivative by differentiating both sides of the equation and applying the chain rule for any functions of the dependent variable.

• The equation for the derivative coming from implicit differentiation will typically depend on both variables.

• Finding the derivative of an inverse function $y=f^{-1}(x)$ is found by writing the equivalent inverse equation $x = f(y)$ and using implicit differentiation. This gives

\begin{equation*} \frac{df^{-1}}{dx} = \frac{1}{f'(y)} = \frac{1}{f'(f^{-1}(x))}. \end{equation*}
• If $y=f(x)$ has a point $(x,y)=(a,b)$ with $\frac{df}{dx}(a) = m\text{,}$ then $y=f^{-1}(x)$ has a corresponding point $(x,y)=(b,a)$ with $\frac{df^{-1}}{dx}(b) = \frac{1}{m}\text{.}$

• Because the natural logarithm is the inverse function of the natural exponential, we have

\begin{equation*} \frac{d}{dx}[\ln(x)] = \frac{1}{x}, \end{equation*}

defined only for $x \gt 0\text{.}$ Using $|x|=-x$ for $x \lt 0\text{,}$ the chain rule gives us an extension for all $x \ne 0\text{,}$

\begin{equation*} \frac{d}{dx}[\ln(|x|)] = \frac{1}{x}. \end{equation*}

The general application gives

\begin{equation*} \frac{d}{dx}[\ln(|f(x)|] = \frac{f'(x)}{f(x)}. \end{equation*}