maths.freeCalculus › 2. Computing Derivatives › Derivatives of functions given implicitly

Derivatives of functions given implicitly

In all of our studies with derivatives so far, we have worked with functions whose formula is given explicitly in terms of x.

Introduction

In all of our studies with derivatives so far, we have worked with functions whose formula is given explicitly in terms of \(x\). But there are many interesting curves whose equations involving \(x\) and \(y\) are 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. For instance, in Figure, 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)\). But 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. 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 \(\frac{dy}{dx}\) at any point on the circle, even though we cannot write \(y\) explicitly as a function of \(x\).

We say that the equation \(x^2 + y^2 = 16\) defines \(y\) implicitly as a function of \(x\). The graph of the equation can be broken into pieces where each piece can be defined by an explicit function of \(x\). For the circle, we could choose to take the top half as one explicit function of \(x\), namely \(y = \sqrt{16 - x^2}\) and the bottom half as the explicit function \(y = -\sqrt{16 - x^2}\). The equation for the circle defines an implicit function of \(x\).

The righthand curve in Figure is called the folium of Descartes and is just one of many fascinating possibilities for implicitly given curves.

How can we find an equation for \(\frac{dy}{dx}\) without an explicit formula for \(y\) in terms of \(x\)? To begin answering this question, 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.

Exploration
Exploration

Implicit Differentiation

We begin our exploration of implicit differentiation with the example of the circle given by \(x^2 + y^2 = 16\). How can we find a formula for \(\frac{dy}{dx}\)?

By viewing \(y\) as an implicit function of \(x\), we 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.

So we view \(y\) as an unknown differentiable function of \(x\) and differentiate both sides of the equation with respect to \(x\). \[\begin{aligned}\end{aligned}\].

On the right, the derivative of the constant \(16\) is \(0\), and on the left we can apply the sum rule, so it follows that \[\begin{aligned}\end{aligned}\].

Note carefully the different roles being played by \(x\) and \(y\). Because \(x\) is the independent variable, \(\frac{d}{dx} \left[x^2\right] = 2x\). But \(y\) is the dependent variable and \(y\) is an implicit function of \(x\). Recall Preview Activity, where we computed \(\frac{d}{dx}[f(x)^2]\). Computing \(\frac{d}{dx}[y^2]\) is the same, and requires the chain rule, by which we find that \(\frac{d}{dx}[y^2] = 2y^1 \frac{dy}{dx}\). We now have that \[\begin{aligned}\end{aligned}\].

We solve this equation for \(\frac{dy}{dx}\) by subtracting \(2x\) from both sides and dividing by \(2y\). \[\begin{aligned}\end{aligned}\].

Let's think further about the result that \(\frac{dy}{dx} = -\frac{x}{y}\). First, notice that this expression for the derivative involves both \(x\) and \(y\). This makes sense because there are two corresponding points on the circle for each value of \(x\) between \(-4\) and \(4\), 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. The slope of the radius from the origin to the point \((a,b)\) is \(m_r = \frac{b}{a}\). The tangent line to the circle at \((a,b)\) is perpendicular to the radius, and thus has slope \(m_t = -\frac{a}{b}\), as shown in Figure. In particular, 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 observations about the circle are consistent with the formula \(\frac{dy}{dx} = -\frac{x}{y}\).

Condensed — the full section is in Boelkins, Active Calculus.

Summary

  • In an equation involving \(x\) and \(y\) where portions of the graph can be defined 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.

  • We use implicit differentiation to differentiate an implicitly defined function. We differentiate both sides of the equation with respect to \(x\), treating \(y\) as a function of \(x\) by applying the chain rule. If possible, we 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 gives the slope of the tangent line to the curve. It may be used to decide where 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.

Practice (7)

Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.

  1. In the Desmos window below, there is a plot of the circle \(x^2 + y^2 = 16\) along with a tangent line to the circle at a moveable point. You can drag the point around the circle and observe the corresponding slope of the tangent line.

    1. Estimate the coordinates of a point at which the slope of the tangent line is \(m=0\).

    2. Estimate the coordinates of a point at which the slope of the tangent line is \(m=1\).

    3. Estimate the coordinates of a point at which the slope of the tangent line is \(m=-1\).

    4. Is there any numerical slope that is not achieved at some point on the circle? If yes, state that slope; if not, explain why not.

  2. Consider the curve given by the equation \(2y^3+y^2-y^5 = x^4 - 2x^3 + x^2\). Find all points at which the tangent line to the curve is horizontal or vertical. Be sure to use a graphing utility to plot this implicit curve and to visually check the results of algebraic reasoning that you use to determine where the tangent lines are horizontal and vertical.

    Paljasta vastaus

    First, we compute \(\frac{dy}{dx}\) by implicit differentiation. Differentiating both sides of the given equation with respect to \(x\) while treating \(y\) as a function of \(x\), we see that \[\begin{aligned}\end{aligned}\]. Removing a factor of \(\frac{dy}{dx}\) from the lefthand side and dividing to solve for \(\frac{dy}{dx}\), we have \[\begin{aligned}\end{aligned}\]. The tangent line is potentially horizontal where the numerator of \(\frac{dy}{dx}\) is zero and potentially vertical where \(\frac{dy}{dx}\) is zero. Solving \(2x(2x^2 - 3x + 1) = 0\), we see that \[\begin{aligned}\end{aligned}\] so the numerator is zero at \(x = 0, 0.5, 1\). The denominator is zero where \(y(-5y^3 + 6y + 2) = 0\). Using technology to estimate where \(-5y^3 + 6y + 2 = 0\), we see the denominator is zero at \(y = 0\) and \(y \approx -0.856, -0.379, 1.235\).

    Next, we need to find the coordinates of these points where potential horizontal or vertical tangent lines occur. First, we consider the potential horizontal tangent line locations. When \(x = 0\), \(2y^3+y^2-y^5 = x^4 - 2x^3 + x^2 = 0\), and thus we know \(y^2(2y + 1 - y^3) = 0\), from which it follows that \(y = 0\), \(y=-1\) or \(y \approx -0.618, 1.618\). This leads to four points to consider: \((0,0)\), \((0,-1)\), \((0,-0.618)\), and \((0,1.618)\). It is apparent from the graph shown below that the tangent line at \((0,0)\) is not horizontal (here both the numerator and denominator of \(\frac{dy}{dx}\) are zero), but at each of the other three points, the tangent line is horizontal.

    We now reason similarly for the other \(x\)-values where the numerator is zero. At \(x = 1\), \(2y^3+y^2-y^5 = 1^4 - 2\cdot 1^3 + 1^2 = 0\), and here again \(y = 0\), \(y=-1\) or \(y \approx -0.618, 1.618\). This leads to four potential points where the tangent line is horizontal: \((1,0)\), \((1,-1)\), \((1,-0.618)\), and \((1,1.618)\). At \((1,0)\), there's not a horizontal tangent line, but at each of the others there is, as seen in the figure. Similar reasoning when \(x = 0.5\) shows that \(2y^3+y^2-y^5 = 0.5^4 - 2\cdot 0.5^3 + 0.5^2 = 0.625\), from which we find that \(y \approx -1.0493, 0.2104, 1.6139\), and thus the three points \((0.5,-1.0493)\), \((0.5,0.2104)\), \((0.5, 1.6139)\).

    Returning to where the denominator is zero (\(y = 0\) and \(y \approx -0.856, -0.379, 1.235\)), we now determine points where the tangent line is vertical. Is is apparent from the figure below that there are no vertical tangent lines when \(y = 0\) or \(y \approx -0.856\), so there are two values to pursue: \(y \approx -0.379, 1.235\).

    When \(y \approx -0.379\), it follows that \(2(-0.379)^3+(-0.379)^2-(-0.379)^5 = x^4 - 2x^3 + x^2\), so \[\begin{aligned}\end{aligned}\] from which we find that \(x \approx -0.1756, 0.2912, 0.7088, 1.1756\). The figure confirms that there are vertical tangent lines at \((-0.1756,-0.379)\), \((0.2912,-0.379)\), \((0.7088,-0.379)\), and \((1.1756,-0.379)\)

    Lastly, when \(y \approx 1.235\), it follows \(2(1.235)^3+(1.235)^2-(1.235)^5 = x^4 - 2x^3 + x^2\), so \[\begin{aligned}\end{aligned}\] and thus via technology, \(x \approx -0.8437, 1.8437\). This leads to two additional points at which the tangent line is vertical: \((-0.8437, 1.235)\) and \((1.8437, 1.235)\).

    All of our above work is summarized in the following figure.

  3. For the curve given by the equation \(\sin(x+y) + \cos(x-y) = 1\), find the equation of the tangent line to the curve at the point \((\frac{\pi}{2}, \frac{\pi}{2})\).

    Paljasta vastaus

    First we need to find the slope of the line tangent to the curve, or \(\frac{dy}{dx}\). To do so, we differentiate both sides of the equation with respect to \(x\), treating \(y\) as a function of \(x\) to obtain \[\begin{aligned}\frac{d}{dx} \left( \sin(x+y) + \cos(x-y) \right) &= \frac{d}{dx}(1) \\ \cos(x+y) \left(1+\frac{dy}{dx}\right) - \sin(x-y)\left(1-\frac{dy}{dx}\right) &= 0\end{aligned}\]. Distributing on the left side of the equation, \[\begin{aligned}\end{aligned}\]. Removing a factor of \(\frac{dy}{dx}\) from two terms on the right and moving the other two terms to the righthand side, \[\begin{aligned}\end{aligned}\]. Therefore, \[\begin{aligned}\end{aligned}\]. At the point \(\left(\frac{\pi}{2}, \frac{\pi}{2}\right)\) we have that \[\begin{aligned}\end{aligned}\]. Therefore, the equation of the line tangent to the curve at the point \(\left(\frac{\pi}{2}, \frac{\pi}{2}\right)\) is \(y = \frac{\pi}{2} - \left(x-\frac{\pi}{2}\right)\). A portion of the graph of the curve defined by \(\sin(x+y) + \cos(x-y) = 1\) and the tangent line to the curve at the point \(\left(\frac{\pi}{2}, \frac{\pi}{2}\right)\) are shown in the following figure.

  4. Implicit differentiation enables us a different perspective from which to see why the rule \(\frac{d}{dx} [a^x] = a^x \ln(a)\) holds, if we assume that \(\frac{d}{dx}[\ln(x)] = \frac{1}{x}\). This exercise leads you through the key steps to do so.

    1. Let \(y = a^x\). Rewrite this equation using the natural logarithm function to write \(x\) in terms of \(y\) (and the constant \(a\)).

    2. Differentiate both sides of the equation you found in (a) with respect to \(x\), keeping in mind that \(y\) is implicitly a function of \(x\).

    3. Solve the equation you found in (b) for \(\frac{dy}{dx}\), and then use the definition of \(y\) to write \(\frac{dy}{dx}\) solely in terms of \(x\). What have you found?

    Paljasta vastaus

    1. Taking the natural log of both sides, \(\ln(y) = \ln(a^x) = x \ln(a)\). Thus, it follows that \[\begin{aligned}\end{aligned}\].

    2. Remembering that \(\ln(a)\) is constant with respect to \(x\), we can also write \(x = \frac{1}{\ln(a)} \cdot \ln(y)\). Differentiating both sides with respect to \(x\) while treating \(y\) as a function of \(x\) (and again remembering that \(\ln(a)\) is constant), we have \[\begin{aligned}\end{aligned}\].

    3. Solving for \(\frac{dy}{dx}\), we see that \(\frac{dy}{dx} = y \ln(a)\). But recall from the outset that \(y = a^x\), and thus \[\begin{aligned}\end{aligned}\] which shows that \(\frac{d}{dx}[a^x] = a^x \ln(a)\).

  5. Consider the curve given by the equation \(2y^3+y^2-y^5 = x^4 - 2x^3 + x^2\). Find all points at which the tangent line to the curve is horizontal or vertical. Be sure to use a graphing utility to plot this implicit curve and to visually check the results of algebraic reasoning that you use to determine where the tangent lines are horizontal and vertical.

    Paljasta vastaus

    First, we compute \(\frac{dy}{dx}\) by implicit differentiation. Differentiating both sides of the given equation with respect to \(x\) while treating \(y\) as a function of \(x\), we see that \[\begin{aligned}\end{aligned}\]. Removing a factor of \(\frac{dy}{dx}\) from the lefthand side and dividing to solve for \(\frac{dy}{dx}\), we have \[\begin{aligned}\end{aligned}\]. The tangent line is potentially horizontal where the numerator of \(\frac{dy}{dx}\) is zero and potentially vertical where \(\frac{dy}{dx}\) is zero. Solving \(2x(2x^2 - 3x + 1) = 0\), we see that \[\begin{aligned}\end{aligned}\] so the numerator is zero at \(x = 0, 0.5, 1\). The denominator is zero where \(y(-5y^3 + 6y + 2) = 0\). Using technology to estimate where \(-5y^3 + 6y + 2 = 0\), we see the denominator is zero at \(y = 0\) and \(y \approx -0.856, -0.379, 1.235\).

    Next, we need to find the coordinates of these points where potential horizontal or vertical tangent lines occur. First, we consider the potential horizontal tangent line locations. When \(x = 0\), \(2y^3+y^2-y^5 = x^4 - 2x^3 + x^2 = 0\), and thus we know \(y^2(2y + 1 - y^3) = 0\), from which it follows that \(y = 0\), \(y=-1\) or \(y \approx -0.618, 1.618\). This leads to four points to consider: \((0,0)\), \((0,-1)\), \((0,-0.618)\), and \((0,1.618)\). It is apparent from the graph shown below that the tangent line at \((0,0)\) is not horizontal (here both the numerator and denominator of \(\frac{dy}{dx}\) are zero), but at each of the other three points, the tangent line is horizontal.

    We now reason similarly for the other \(x\)-values where the numerator is zero. At \(x = 1\), \(2y^3+y^2-y^5 = 1^4 - 2\cdot 1^3 + 1^2 = 0\), and here again \(y = 0\), \(y=-1\) or \(y \approx -0.618, 1.618\). This leads to four potential points where the tangent line is horizontal: \((1,0)\), \((1,-1)\), \((1,-0.618)\), and \((1,1.618)\). At \((1,0)\), there's not a horizontal tangent line, but at each of the others there is, as seen in the figure. Similar reasoning when \(x = 0.5\) shows that \(2y^3+y^2-y^5 = 0.5^4 - 2\cdot 0.5^3 + 0.5^2 = 0.625\), from which we find that \(y \approx -1.0493, 0.2104, 1.6139\), and thus the three points \((0.5,-1.0493)\), \((0.5,0.2104)\), \((0.5, 1.6139)\).

    Returning to where the denominator is zero (\(y = 0\) and \(y \approx -0.856, -0.379, 1.235\)), we now determine points where the tangent line is vertical. Is is apparent from the figure below that there are no vertical tangent lines when \(y = 0\) or \(y \approx -0.856\), so there are two values to pursue: \(y \approx -0.379, 1.235\).

    When \(y \approx -0.379\), it follows that \(2(-0.379)^3+(-0.379)^2-(-0.379)^5 = x^4 - 2x^3 + x^2\), so \[\begin{aligned}\end{aligned}\] from which we find that \(x \approx -0.1756, 0.2912, 0.7088, 1.1756\). The figure confirms that there are vertical tangent lines at \((-0.1756,-0.379)\), \((0.2912,-0.379)\), \((0.7088,-0.379)\), and \((1.1756,-0.379)\)

    Lastly, when \(y \approx 1.235\), it follows \(2(1.235)^3+(1.235)^2-(1.235)^5 = x^4 - 2x^3 + x^2\), so \[\begin{aligned}\end{aligned}\] and thus via technology, \(x \approx -0.8437, 1.8437\). This leads to two additional points at which the tangent line is vertical: \((-0.8437, 1.235)\) and \((1.8437, 1.235)\).

    All of our above work is summarized in the following figure.

  6. For the curve given by the equation \(\sin(x+y) + \cos(x-y) = 1\), find the equation of the tangent line to the curve at the point \((\frac{\pi}{2}, \frac{\pi}{2})\).

    Paljasta vastaus

    First we need to find the slope of the line tangent to the curve, or \(\frac{dy}{dx}\). To do so, we differentiate both sides of the equation with respect to \(x\), treating \(y\) as a function of \(x\) to obtain \[\begin{aligned}\frac{d}{dx} \left( \sin(x+y) + \cos(x-y) \right) &= \frac{d}{dx}(1) \\ \cos(x+y) \left(1+\frac{dy}{dx}\right) - \sin(x-y)\left(1-\frac{dy}{dx}\right) &= 0\end{aligned}\]. Distributing on the left side of the equation, \[\begin{aligned}\end{aligned}\]. Removing a factor of \(\frac{dy}{dx}\) from two terms on the right and moving the other two terms to the righthand side, \[\begin{aligned}\end{aligned}\]. Therefore, \[\begin{aligned}\end{aligned}\]. At the point \(\left(\frac{\pi}{2}, \frac{\pi}{2}\right)\) we have that \[\begin{aligned}\end{aligned}\]. Therefore, the equation of the line tangent to the curve at the point \(\left(\frac{\pi}{2}, \frac{\pi}{2}\right)\) is \(y = \frac{\pi}{2} - \left(x-\frac{\pi}{2}\right)\). A portion of the graph of the curve defined by \(\sin(x+y) + \cos(x-y) = 1\) and the tangent line to the curve at the point \(\left(\frac{\pi}{2}, \frac{\pi}{2}\right)\) are shown in the following figure.

  7. Implicit differentiation enables us a different perspective from which to see why the rule \(\frac{d}{dx} [a^x] = a^x \ln(a)\) holds, if we assume that \(\frac{d}{dx}[\ln(x)] = \frac{1}{x}\). This exercise leads you through the key steps to do so.

    1. Let \(y = a^x\). Rewrite this equation using the natural logarithm function to write \(x\) in terms of \(y\) (and the constant \(a\)).

    2. Differentiate both sides of the equation you found in (a) with respect to \(x\), keeping in mind that \(y\) is implicitly a function of \(x\).

    3. Solve the equation you found in (b) for \(\frac{dy}{dx}\), and then use the definition of \(y\) to write \(\frac{dy}{dx}\) solely in terms of \(x\). What have you found?

    Paljasta vastaus

    1. Taking the natural log of both sides, \(\ln(y) = \ln(a^x) = x \ln(a)\). Thus, it follows that \[\begin{aligned}\end{aligned}\].

    2. Remembering that \(\ln(a)\) is constant with respect to \(x\), we can also write \(x = \frac{1}{\ln(a)} \cdot \ln(y)\). Differentiating both sides with respect to \(x\) while treating \(y\) as a function of \(x\) (and again remembering that \(\ln(a)\) is constant), we have \[\begin{aligned}\end{aligned}\].

    3. Solving for \(\frac{dy}{dx}\), we see that \(\frac{dy}{dx} = y \ln(a)\). But recall from the outset that \(y = a^x\), and thus \[\begin{aligned}\end{aligned}\] which shows that \(\frac{d}{dx}[a^x] = a^x \ln(a)\).

Symbols used here

\sqrt{x},\ \sqrt[n]{x}
square root, n-th root
The non-negative number whose square (n-th power) is x.
\pi
pi
Ratio of a circle's circumference to its diameter, 3.14159…
\log_b x,\ \ln x
logarithm, natural log
The exponent b must be raised to for x; ln uses base e.
\sin,\ \cos,\ \tan
sine, cosine, tangent
Ratios of sides in a right triangle; coordinates on the unit circle.
f'(x),\ \frac{dy}{dx}
derivative
Instantaneous rate of change; slope of the graph.
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
e
Euler's number
2.71828…, the base whose exponential is its own derivative.
\infty
infinity
Not a number: "grows without bound" in limits and intervals.
\sum_{k=1}^{n} a_k
summation
Add a_k for k = 1 up to n.
\lim_{x \to a} f(x)
limit
The value f(x) approaches as x approaches a.
\int f(x)\,dx,\ \int_a^b
integral
Antiderivative (indefinite) or signed area from a to b (definite).
y',\ y''
first and second derivative of y
Prime notation for derivatives with respect to x (or t).
C,\ C_1,\ C_2
arbitrary constants
Constants of integration fixed by initial conditions.

How to: Derivatives of functions given implicitly

  1. What does it mean to say that a curve is an implicit function of x, rather than an explicit function of x?
  2. How does implicit differentiation enable us to find a formula for \frac{dy}{dx} when y is an implicit function of x?
  3. 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?

Questions people ask

What is a derivative in one sentence?

The slope of the graph at a point — the rate at which the output is changing there. Speed is the derivative of position.

What is an integral in one sentence?

The accumulated total of a rate — the area under the curve. Distance travelled is the integral of speed.

Why are derivatives and integrals opposites?

That is the fundamental theorem of calculus: accumulating a rate and then measuring how fast the accumulation grows gets you back the rate. Integration undoes differentiation up to a constant.

When do I use substitution and when integration by parts?

Substitution when part of the integrand is the derivative of another part (u and du both present). Parts when the integrand is a product of two unrelated kinds of function — a polynomial times an exponential, log or trig function.

Kokeile omaasi

Parts of this page are adapted from Boelkins, Active Calculus (CC BY-SA 4.0). Condensed and re-explained here; errors are ours.

Lisää Calculus