# 2.7: Derivatives of Functions Given Implicitely

- Page ID
- 5308

Skills to Develop

In this section, we strive to understand the ideas generated by the following important questions:

- What does it mean to say that a curve is an implicit function of \(x\), rather than an explicit function of \(x\)?
- How does implicit differentiation enable us to find a formula for \(dy/dx\) when \(y\) is an implicit function of \(x\)?
- In the context of an implicit curve, how can we use \(\frac{dy}{dx}\) to answer important questions about the tangent line to the curve?

In all of our studies with derivatives to date, we have worked in a setting where we can express a formula for the function of interest explicitly in terms of \(x\). But there are many interesting curves that are determined by an equation involving \(x\) and \(y\) for which it is impossible to solve for \(y\) in terms of \(x\). Perhaps the simplest and most natural of all such curves are circles. Because of the circle’s symmetry, for each \(x\) value strictly between the endpoints of the horizontal diameter, there are two corresponding \(y\)-values.

**Figure \(\PageIndex{1}\):** At left, the circle given by \(x^2 + y^2 = 16\). In the middle, the portion of the circle \(x^2 + y^2 = 16\) that has been highlighted in the box at left. And at right, the lemniscate given by \(x^ 3 - y^3 = 6xy\).

For instance, in Figure \(\PageIndex{1}\), we have labeled \(A = (-3, \sqrt{7})\) and \(B = (-3, -\sqrt{7})\), and these points demonstrate that the circle fails the vertical line test. Hence, it is impossible to represent the circle through a single function of the form \(y = f (x)\). At the same time, portions of the circle can be represented explicitly as a function of \(x\), such as the highlighted arc that is magnified in the center of Figure \(\PageIndex{1}\). Moreover, it is evident that the circle is locally linear, so we ought to be able to find a tangent line to the curve at every point; thus, it makes sense to wonder if we can compute dy dx at any point on the circle, even though we cannot write \(y\) explicitly as a function of \(x\). Finally, we note that the righthand curve in Figure \(\PageIndex{1}\) is called a *lemniscate *and is just one of many fascinating possibilities for implicitly given curves.

In working with implicit functions, we will often be interested in finding an equation for dy dx that tells us the slope of the tangent line to the curve at a point \((x, y)\). To do so, it will be necessary for us to work with \(y\) while thinking of \(y\) as a function of \(x\), but without being able to write an explicit formula for \(y\) in terms of \(x\). The following preview activity reminds us of some ways we can compute derivatives of functions in settings where the function’s formula is not known. For instance, recall the earlier example

\[\dfrac{d}{dx} [e^{u(x)} ] = e^{u(x)}u'(x).\]

Preview Activity \(\PageIndex{1}\)

Let \(f\) be a differentiable function of \(x\) (whose formula is not known) and recall that \(\frac{d}{dx} [ f (x)]\) and \(f' (x)\) are interchangeable notations. Determine each of the following derivatives of combinations of explicit functions of \(x\), the unknown function \(f\), and an arbitrary constant \(c\).

- \(\dfrac{d}{dx} x^2 + f (x)\)
- \(\dfrac{d}{dx} x^2 f (x)\)
- \(\dfrac{d}{dx} c + x + f (x)^2\)
- \(\dfrac{d}{dx}f (x^2 )\)
- \(\dfrac{d}{dx} [x f (x) + f (cx) + c f (x)] \)

## Implicit Differentiation

Because a circle is perhaps the simplest of all curves that cannot be represented explicitly as a single function of \(x\), we begin our exploration of implicit differentiation with the example of the circle given by

\[x^2 + y^2 = 16. \label{eq9}\]

It is visually apparent that this curve is locally linear, so it makes sense for us to want to find the slope of the tangent line to the curve at any point, and moreover to think that the curve is differentiable. The big question is: how do we find a formula for \(\frac{dy}{dx}\), the slope of the tangent line to the circle at a given point on the circle? By viewing \(y\) as an implicit function of \(x\), we essentially think of \(y\) as some function whose formula \(f (x)\) is unknown, but which we can differentiate. Just as \(y\) represents an unknown formula, so too its derivative with respect to \(x\), \(\frac{dy}{dx}\), will be (at least temporarily) unknown.

Consider Equation \ref{eq9} and view \(y\) as an unknown differentiable function of \(x\). Differentiating both sides Equation \ref{eq9} with respect to \(x\), we have

\[\dfrac{d}{dx} \left[ x^2 + y^2 \right] = \dfrac{d}{dx} [16]. \label{eq11}\]

On the right side of Equation \ref{eq11}, the derivative of the constant 16 is 0, and on the left we can apply the *sum rule*, so it follows that

\[\dfrac{d}{dx} x^2 + \dfrac{d}{dx} y^2 = 0.\]

Next, it is essential that we recognize the different roles being played by \(x\) and \(y\). Since \(x\) is the independent variable, it is the variable with respect to which we are differentiating, and thus

\[\dfrac{d}{dx} [x^2 ] = 2x.\]

But \(y\) is the dependent variable and \(y\) is an implicit function of \(x\). Thus, when we want to compute \(\dfrac{d}{dx} [y^2 ]\) it is identical to the situation in Preview Activity \(\PageIndex{1}\) where we computed

\[\dfrac{d}{dx} [ f (x)^2 ].\]

In both situations, we have an unknown function being squared, and we seek the derivative of the result. This requires the chain rule, by which we find that

\[\dfrac{d}{dx} [y^2 ] = 2y^1 \dfrac{dy}{dx}.\]

Therefore, continuing our work in differentiating both sides of Equation \ref{eq9}, we now have that

\[2x + 2y \dfrac{dy}{dx} = 0. \label{eq18}\]

To find an expression for \(\frac{dy}{dx}\), we solve for it in Equation \ref{eq18}. Subtracting \(2x\) from both sides and dividing by \(2y\),

\[\dfrac{dy}{dx} = - \dfrac{ 2x}{2y} = - \dfrac{x}{y} .\]

There are several important things to observe about the result that

\[\dfrac{d}{dx} = - \dfrac{x}{y}. \label{eq20}\]

First, this expression for the derivative involves both \(x\) and \(y\). It makes sense that this should be the case, since for each value of \(x\) between -4 and 4, there are two corresponding points on the circle, and the slope of the tangent line is different at each of these points. Second, this formula is entirely consistent with our understanding of circles. If we consider the radius from the origin to the point \((a, b)\), the slope of this line segment is \(m_r = b a\). The tangent line to the circle at \((a, b)\) will be perpendicular to the radius, and thus have slope \(m_t = - a b\), as shown in Figure \(\PageIndex{2}\). Finally, the slope of the tangent line is zero at \((0, 4)\) and \((0, −4)\), and is undefined at \((−4, 0)\) and \((4, 0)\); all of these values are consistent with Equation \ref{eq20}.

**Figure \(\PageIndex{2}\)**: The circle given by \(x^2 + y^2 = 16\) with point (a, b) on the circle and the tangent line at that point, with labeled slopes of the radial line, \(m_r\), and tangent line, \(m_t\).

Essentially the idea of an implicit function is that it can be broken into pieces where each piece can be viewed as an explicit function of \(x\), and the combination of those pieces constitutes the full implicit function. For the circle, we could choose to take the top half as one explicit function of \(x\), and the bottom half as another.

We consider the following more complicated example to investigate and demonstrate some additional algebraic issues that arise in problems involving implicit differentiation.

Example \(\PageIndex{1}\)

For the curve given implicitly by

\[x^3 + y^2 - 2xy = 2 \label{ex1}\]

shown in Figure \(\PageIndex{3}\). Find the slope of the tangent line at \((-1, 1)\).

**Figure \(\PageIndex{3}\)**: The curve \(x^3 + y^2 - 2xy = 2\).

**Solution**

We begin by differentiating the curve’s equation implicitly. Taking the derivative of each side of Equation \ref{ex1} with respect to \(x\),

\[\dfrac{d}{dx} \left[ x^3 + y^2 - 2xy \right] = \dfrac{d}{dx} [2],\]

by the sum rule and the fact that the derivative of a constant is zero, we have

\[\dfrac{d}{dx} [x^3 ] + \dfrac{d}{dx} [y^2 ] - \dfrac{d}{dx} [2xy] = 0. \]

For the three derivatives we now must execute, the first uses the simple power rule, the second requires the chain rule (since \(y\) is an implicit function of \(x\)), and the third necessitates the product rule (again since \(y\) is a function of \(x\)). Applying these rules, we now find that

\[3x^2 + 2y \dfrac{dy}{ dx} - \left[2x \dfrac{dy}{dx} + 2y\right] = 0.\]

Remembering that our goal is to find an expression for \(\frac{dy}{dx}\) so that we can determine the slope of a particular tangent line, we want to solve the preceding equation for \(\frac{dy}{dx}\). To do so, we get all of the terms involving \(\frac{dy}{dx}\) on one side of the equation and then factor. Expanding and then subtracting \(3x^2 - 2y\) from both sides, it follows that

\[2y \dfrac{dy}{dx} - 2x \dfrac{dy}{dx} = 2y - 3x^2 .\]

Factoring the left side to isolate \(\frac{dy}{dx}\), we have

\[\dfrac{dy}{dx} (2y - 2x) = 2y - 3x^2.\]

Finally, we divide both sides by \((2y - 2x)\) and conclude that

\[\dfrac{dy}{dx} = \dfrac{2y - 3x^2}{ 2y - 2x}.\]

Here again, the expression for \(\frac{dy}{dx}\) depends on both \(x\) and \(y\). To find the slope of the tangent line at (-1, 1), we substitute this point in the formula for \(\frac{dy}{dx}\), using the notation

\[ \left.\dfrac{dy}{dx}\right|_{(-1,1)} =\dfrac{ 2(1) - 3(-1)^2 }{2(1) - 2(-1)} = - \dfrac{1 }{4}.\]

This value matches our visual estimate of the slope of the tangent line shown in Figure \(\PageIndex{3}\).

Example \(\PageIndex{1}\) shows that it is possible when differentiating implicitly to have multiple terms involving \(\frac{dy}{dx}\). Regardless of the particular curve involved, our approach will be 145 similar each time. After differentiating, we expand so that each side of the equation is a sum of terms, some of which involve \(\frac{dy}{dx}\). Next, addition and subtraction are used to get all terms involving dy dx on one side of the equation, with all remaining terms on the other. Finally, we factor to get a single instance of \(\frac{dy}{dx}\), and then divide to solve for \(\frac{dy}{dx}\).

Note, too, that since \(\frac{dy}{dx}\) is often a function of both \(x\) and \(y\), we use the notation

\[ \left.\dfrac{dy}{dx}\right|_{(a,b)} \]

to denote the evaluation of \(\frac{dy}{dx}\) at the point (a, b). This is analogous to writing \(f'(a)\) when \(f'\) depends on a single variable.

Finally, there is a big difference between writing \(\frac{d}{dx}\) and \(\frac{dy}{dx}\). For example,

\[\dfrac{d}{dx} [x^2 + y^2 ]\]

gives an instruction to take the derivative with respect to \(x\) of the quantity \(x^2 + y^2\), presumably where \(y\) is a function of \(x\). On the other hand,

\[\dfrac{dy}{dx} (x^2 + y^2 )\]

means the product of the derivative of \(y\) with respect to \(x\) with the quantity \(x^2 + y^2\). Understanding this notational subtlety is essential. The following activities present opportunities to explore several different problems involving implicit differentiation.

Activity \(\PageIndex{1}\)

Consider the curve defined by the equation \(x(y) = y^5 - 5y^3 + 4y\), whose graph is pictured in Figure \(\PageIndex{4}\).

- Explain why it is not possible to express \(y\) as an explicit function of \(x\).
- Use implicit differentiation to find a formula for \(\frac{dy}{dx}\).
- Use your result from part (b) to find an equation of the line tangent to the graph of \(x(y)\) at the point (0, 1).
- Use your result from part (b) to determine all of the points at which the graph of \(x(y)\) has a vertical tangent line.

**Figure \(\PageIndex{4}\):** The curve x = y 5 - 5y 3 + 4y.

Two natural questions to ask about any curve involve where the tangent line can be vertical or horizontal. To be horizontal, the slope of the tangent line must be zero, while to be vertical, the slope must be undefined. It is typically the case when differentiating implicitly that the formula for dy dx is expressed as a quotient of functions of x and y, say

\[\dfrac{dy}{dx} = \dfrac{p(x, y)}{q(x, y)}.\]

Thus, we observe that the tangent line will be horizontal precisely when the numerator is zero and the denominator is nonzero, making the slope of the tangent line zero. Similarly, the tangent line will be vertical whenever \(q(x, y) = 0\) and \(p(x, y) \neq 0\), making the slope undefined. If both \(x\) and \(y\) are involved in an equation such as \(p(x, y) = 0\), we try to solve for one of them in terms of the other, and then use the resulting condition in the original equation that defines the curve to find an equation in a single variable that we can solve to determine the point(s) that lie on the curve at which the condition holds. It is not always possible to execute the desired algebra due to the possibly complicated combinations of functions that often arise.

Exercise \(\PageIndex{2}\)

Consider the curve defined by the equation

\[y(y^2 - 1)(y - 2) = x(x - 1)(x - 2),\]

whose graph is pictured in Figure \(\PageIndex{5}\). Through implicit differentiation, it can be shown that

\[\dfrac{dy}{dx} =\dfrac{ (x - 1)(x - 2) + x(x - 2) + x(x - 1)}{ (y^2 - 1)(y - 2) + 2y^2(y - 2) + y(y^ 2 - 1)} . \]

Use this fact to answer each of the following questions.

- Determine all points \((x, y)\) at which the tangent line to the curve is horizontal. (Use technology appropriately to find the needed zeros of the relevant polynomial function.)
- Determine all points \((x, y)\) at which the tangent line is vertical. (Use technology appropriately to find the needed zeros of the relevant polynomial function.)
- Find the equation of the tangent line to the curve at one of the points where \(x = 1\).

**Figure \(\PageIndex{5}\):** The curve \(y(y^2 - 1)(y - 2) = x(x - 1)(x - 2)\).

The closing activity in this section offers more opportunities to practice implicit differentiation.

Activity \(\PageIndex{3}\)

For each of the following curves, use implicit differentiation to find dy/dx and determine the equation of the tangent line at the given point.

- \(x^3 - y^3 = 6xy\) at \((-3, 3)\)
- \(\sin(y) + y = x^3 + x\) at \((0, 0)\)
- \(3xe^{-xy} = y^2\) at \((0.619061, 1) \)

## Summary

In this section, we encountered the following important ideas:

- When we have an equation involving \(x\) and \(y\) where y cannot be solved for explicitly in terms of \(x\), but where portions of the curve can be thought of as being generated by explicit functions of \(x\), we say that \(y\) is an implicit function of \(x\). A good example of such a curve is the unit circle.
- In the process of implicit differentiation, we take the equation that generates an implicitly given curve and differentiate both sides with respect to \(x\) while treating \(y\) as a function of \(x\). In so doing, the chain rule leads \(\frac{dy}{dx}\) to arise, and then we may subsequently solve for \(\frac{dy}{dx}\) using algebra.
- While \(\frac{dy}{dx}\) may now involve both the variables \(x\) and \(y\), \(\frac{dy}{dx}\) still measures the slope of the tangent line to the curve, and thus this derivative may be used to decide when the tangent line is horizontal (\(\frac{dy}{dx} = 0\)) or vertical (\(\frac{dy}{dx}\) is undefined), or to find the equation of the tangent line at a particular point on the curve.

## Contributors

Matt Boelkins (Grand Valley State University), David Austin (Grand Valley State University), Steve Schlicker (Grand Valley State University)