# 2.6: Implicit Differentiation

- Page ID
- 10290

In the last chapter we learned to find the derivative, \( \frac{dy}{dx}\), or \(y^\prime \), when \(y\) is given *explicitly* as a function of \(x\). That is, if we know \(y=f(x)\) for some function \(f\), we can find \(y^\prime \). For example, given \(y=3x^2-7\), we can easily find \(y^\prime =6x\). (Here we explicitly state how \(x\) and \(y\) are related. Knowing \(x\), we can directly find \(y\).)

Sometimes the relationship between \(y\) and \(x\) is not explicit; rather, it is *implicit*. For instance, we might know that \(x^2-y=4\). This equality defines a relationship between \(x\) and \(y\); if we know \(x\), we could figure out \(y\). Can we still find \(y^\prime \)? In this case, sure; we solve for \(y\) to get \(y=x^2-4\) (hence we now know \(y\) explicitly) and then differentiate to get \(y^\prime =2x\).

Sometimes the *implicit* relationship between \(x\) and \(y\) is complicated. Suppose we are given \(\sin(y)+y^3=6-x^3\). A graph of this implicit function is given in Figure 2.19. In this case there is absolutely no way to solve for \(y\) in terms of elementary functions. The surprising thing is, however, that we can still find \(y^\prime \) via a process known as **implicit differentiation**.

Figure 2.19:*A graph of the implicit function *\(\sin (y)+y^3=6-x^2\).

Implicit differentiation is a technique based on the Chain Rule that is used to find a derivative when the relationship between the variables is given implicitly rather than explicitly (solved for one variable in terms of the other).

We begin by reviewing the Chain Rule. Let \(f\) and \(g\) be functions of \(x\). Then \[\frac{d}{dx}\Big(f(g(x))\Big) = f^\prime(g(x))\cdot g'(x).\] Suppose now that \(y=g(x)\). We can rewrite the above as \[\frac{d}{dx}\Big(f(y))\Big) = f^\prime(y))\cdot y^\prime , \quad \text{or}\quad \frac{d}{dx}\Big(f(y))\Big)= f^\prime(y)\cdot \frac{dy}{dx}.\label{2.1}\tag{2.1}\] These equations look strange; the key concept to learn here is that we can find \(y^\prime \) even if we don't exactly know how \(y\) and \(x\) relate.

We demonstrate this process in the following example.

Example \(\PageIndex{1}\):: Using Implicit Differentiation

Find \(y^\prime \) given that \(\sin(y) + y^3=6-x^3\).

**Solution:**

We start by taking the derivative of both sides (thus maintaining the equality.) We have :

\[ \frac{d}{dx}\Big(\sin(y) + y^3\Big)=\frac{d}{dx}\Big(6-x^3\Big).\]

The right hand side is easy; it returns \(-3x^2\).

The left hand side requires more consideration. We take the derivative term--by--term. Using the technique derived from Equation 2.1 above, we can see that \[\frac{d}{dx}\Big(\sin y\Big) = \cos y \cdot y^\prime .\]

We apply the same process to the \(y^3\) term.

\[\frac{d}{dx}\Big(y^3\Big) = \frac{d}{dx}\Big((y)^3\Big) = 3(y)^2\cdot y^\prime .\]

Putting this together with the right hand side, we have

\[\cos(y)y^\prime +3y^2y^\prime = -3x^2.\]

Now solve for \(y^\prime \).

\[\begin{align*} \cos(y)y^\prime +3y^2y^\prime &= -3x^2.\\ \big(\cos y+3y^2\big)y^\prime &= -3x^2\\ y^\prime &= \frac{-3x^2}{\cos y+3y^2} \end{align*}\]

This equation for \(y^\prime \) probably seems unusual for it contains both \(x\) and \(y\) terms. How is it to be used? We'll address that next.

Exercise \(\PageIndex{1}\)

Find \(y^\prime \) given that \(\cos(y) + y^3=6-x^3\).

**Answer**-
Add answer text here and it will automatically be hidden if you have a "AutoNum" template active on the page.

Implicit functions are generally harder to deal with than explicit functions. With an explicit function, given an \(x\) value, we have an explicit formula for computing the corresponding \(y\) value. With an implicit function, one often has to find \(x\) and \(y\) values *at the same time* that satisfy the equation. It is much easier to demonstrate that a given point satisfies the equation than to actually find such a point.

For instance, we can affirm easily that the point \((\sqrt[3]{6},0)\) lies on the graph of the implicit function \(\sin y + y^3=6-x^3\). Plugging in \(0\) for \(y\), we see the left hand side is \(0\). Setting \(x=\sqrt[3]6\), we see the right hand side is also \(0\); the equation is satisfied. The following example finds the equation of the tangent line to this function at this point.

Example 68: Using Implicit Differentiation to find a tangent line

Find the equation of the line tangent to the curve of the implicitly defined function \(\sin y + y^3=6-x^3\) at the point \((\sqrt[3]6,0)\).

**Solution:**

In Example 67 we found that \[y^\prime = \frac{-3x^2}{\cos y +3y^2}.\]We find the slope of the tangent line at the point \((\sqrt[3]6,0)\) by substituting \(\sqrt[3]6\) for \(x\) and \(0\) for \(y\). Thus at the point \((\sqrt[3]6,0)\), we have the slope as \[y^\prime = \frac{-3(\sqrt[3]{6})^2}{\cos 0 + 3\cdot0^2} = \frac{-3\sqrt[3]{36}}{1} \approx -9.91.\]

Therefore the equation of the tangent line to the implicitly defined function \(\sin y + y^3=6-x^3\) at the point \((\sqrt[3]{6},0)\) is \[y = -3\sqrt[3]{36}(x-\sqrt[3]{6})+0 \approx -9.91x+18.\]The curve and this tangent line are shown in Figure 2.20.

Figure 2.20:*The function* \(\sin y +y^3=6-x^2\)* and its tangent line at the point *\((\sqrt[3]{6},0)\).

Exercise \(\PageIndex{2}\)

Find the equation of the line tangent to the curve of the implicitly defined function \(\cos y + y^3=6-x^3\) at the point \((\sqrt[3]7,0)\).

**Hint:**-
First check whether the point is on the curve.

**Answer**-
Add answer text here and it will automatically be hidden if you have a "AutoNum" template active on the page.

This suggests a general method for implicit differentiation. For the steps below assume \(y\) is a function of \(x\).

- Take the derivative of each term in the equation. Treat the \(x\) terms like normal. When taking the derivatives of \(y\) terms, the usual rules apply except that, because of the Chain Rule, we need to multiply each term by \(y^\prime \).
- Get all the \(y^\prime \) terms on one side of the equal sign and put the remaining terms on the other side.
- Factor out \(y^\prime \); solve for \(y^\prime \) by dividing.

**Practical Note**: When working by hand, it may be beneficial to use the symbol \(\frac{dy}{dx}\) instead of \(y^\prime \), as the latter can be easily confused for \(y\) or \(y^1\).

Example \(\PageIndex{2}\):: Using Implicit Differentiation

Given the implicitly defined function \(y^3+x^2y^4=1+2x\), find \(y^\prime \).

**Solution:**

We will take the implicit derivatives term by term. The derivative of \(y^3\) is \(3y^2y^\prime \).

The second term, \(x^2y^4\), is a little tricky. It requires the Product Rule as it is the product of two functions of \(x\): \(x^2\) and \(y^4\). Its derivative is \(x^2(4y^3y^\prime ) + 2xy^4\). The first part of this expression requires a \(y^\prime \) because we are taking the derivative of a \(y\) term. The second part does not require it because we are taking the derivative of \(x^2\).

The derivative of the right hand side is easily found to be \(2\). In all, we get:

\[3y^2y^\prime + 4x^2y^3y^\prime + 2xy^4 = 2.\]

Move terms around so that the left side consists only of the \(y^\prime \) terms and the right side consists of all the other terms:

\[3y^2y^\prime + 4x^2y^3y^\prime = 2-2xy^4.\]

Factor out \(y^\prime \) from the left side and solve to get

\[y^\prime = \frac{2-2xy^4}{3y^2+4x^2y^3}.\]

To confirm the validity of our work, let's find the equation of a tangent line to this function at a point. It is easy to confirm that the point \((0,1)\) lies on the graph of this function. At this point, \(y^\prime = 2/3\). So the equation of the tangent line is \(y = 2/3(x-0)+1\). The function and its tangent line are graphed in Figure 2.21.

Figure 2.21:*A graph of the implicitly defined function *\(y^3+x^2y^4 = 1+2x\)* along with its tangent line at the point *\((0,1)\).

Notice how our function looks much different than other functions we have seen. For one, it fails the vertical line test. Such functions are important in many areas of mathematics, so developing tools to deal with them is also important.

Example \(\PageIndex{3}\): Using Implicit Differentiation

Given the implicitly defined function \(\sin(x^2y^2)+y^3=x+y\), find \(y^\prime \).

**Solution:**

Differentiating term by term, we find the most difficulty in the first term. It requires both the Chain and Product Rules.

\[\begin{align*} \frac{d}{dx}\Big(\sin(x^2y^2)\Big) &= \cos(x^2y^2)\cdot\frac{d}{dx}\Big(x^2y^2\Big) \\ &= \cos(x^2y^2)\cdot\big(x^2(2yy^\prime )+2xy^2\big)\\ &= 2(x^2yy^\prime +xy^2)\cos(x^2y^2). \end{align*} \]

We leave the derivatives of the other terms to the reader. After taking the derivatives of both sides, we have

\[2(x^2yy^\prime +xy^2)\cos(x^2y^2) + 3y^2y^\prime = 1 + y^\prime .\]

We now have to be careful to properly solve for \(y^\prime \), particularly because of the product on the left. It is best to multiply out the product. Doing this, we get

\[2x^2y\cos(x^2y^2)y^\prime + 2xy^2\cos(x^2y^2) + 3y^2y^\prime = 1 + y^\prime .\]

From here we can safely move around terms to get the following:

\[2x^2y\cos(x^2y^2)y^\prime + 3y^2y^\prime - y^\prime = 1 - 2xy^2\cos(x^2y^2).\]

Then we can solve for \(y^\prime \) to get

\[y^\prime = \frac{1 - 2xy^2\cos(x^2y^2)}{2x^2y\cos(x^2y^2)+3y^2-1}.\]

A graph of this implicit function is given in Figure 2.22. It is easy to verify that the points \((0,0)\), \((0,1)\) and \((0,-1)\) all lie on the graph. We can find the slopes of the tangent lines at each of these points using our formula for \(y^\prime \).

Figure 2.22:*A graph of the implicitly defined function *\(\sin (x^2y^2)+y^3=x+y\)*.*

At \((0,0)\), the slope is \(-1\).

At \((0,1)\), the slope is \(1/2\).

At \((0,-1)\), the slope is also \(1/2\).

The tangent lines have been added to the graph of the function in Figure 2.23.

Figure 2.23:*A graph of the implicitly defined function *\(\sin (x^2y^2)+y^3=x+y\)* and certain tangent lines.*

Quite a few "famous'' curves have equations that are given implicitly. We can use implicit differentiation to find the slope at various points on those curves. We investigate two such curves in the next examples.

Example \(\PageIndex{3}\): Finding slopes of tangent lines to a circle

Find the slope of the tangent line to the circle \(x^2+y^2=1\) at the point \((1/2, \sqrt{3}/2)\).

**Solution:**

Taking derivatives, we get \(2x+2yy^\prime =0\). Solving for \(y^\prime \) gives: \[ y^\prime = \frac{-x}{y}.\]

This is a clever formula. Recall that the slope of the line through the origin and the point \((x,y)\) on the circle will be \(y/x\). We have found that the slope of the tangent line to the circle at that point is the opposite reciprocal of \(y/x\), namely, \(-x/y\). Hence these two lines are always perpendicular.

At the point \((1/2, \sqrt{3}/2)\), we have the tangent line's slope as

\[y^\prime = \frac{-1/2}{\sqrt{3}/2} = \frac{-1}{\sqrt{3}} \approx -0.577.\]

A graph of the circle and its tangent line at \((1/2,\sqrt{3}/2)\) is given in Figure 2.24, along with a thin dashed line from the origin that is perpendicular to the tangent line. (It turns out that all normal lines to a circle pass through the center of the circle.)

Figure 2.24:*The unit circle with its tangent line at *\((1/2,\sqrt{3}/2)\).

This section has shown how to find the derivatives of implicitly defined functions, whose graphs include a wide variety of interesting and unusual shapes. Implicit differentiation can also be used to further our understanding of "regular'' differentiation.

One hole in our current understanding of derivatives is this: what is the derivative of the square root function? That is, \[\frac{d}{dx}\big(\sqrt{x}\big) = \frac{d}{dx}\big(x^{1/2}\big) = \text{?}\]

We allude to a possible solution, as we can write the square root function as a power function with a rational (or, fractional) power. We are then tempted to apply the Power Rule and obtain \[\frac{d}{dx}\big(x^{1/2}\big) = \frac12x^{-1/2} = \frac{1}{2\sqrt{x}}.\]

The trouble with this is that the Power Rule was initially defined only for positive integer powers, \(n>0\). While we did not justify this at the time, generally the Power Rule is proved using something called the Binomial Theorem, which deals only with positive integers. The Quotient Rule allowed us to extend the Power Rule to negative integer powers. Implicit Differentiation allows us to extend the Power Rule to rational powers, as shown below.

Let \(y = x^{m/n}\), where \(m\) and \(n\) are integers with no common factors (so \(m=2\) and \(n=5\) is fine, but \(m=2\) and \(n=4\) is not). We can rewrite this explicit function implicitly as \(y^n = x^m\). Now apply implicit differentiation.

\[\begin{align*}y &= x^{m/n} \\ y^n &= x^m \\ \frac{d}{dx}\big(y^n\big) &= \frac{d}{dx}\big(x^m\big) \\ n\cdot y^{n-1}\cdot y^\prime &= m\cdot x^{m-1} \\ y^\prime &= \frac{m}{n} \frac{x^{m-1}}{y^{n-1}} \quad \text{(now substitute \(x^{m/n}\) for \(y\))} \\ &= \frac{m}{n} \frac{x^{m-1}}{(x^{m/n})^{n-1}} \quad \text{(apply lots of algebra)}\\ &= \frac{m}n x^{(m-n)/n}\\ &= \frac{m}n x^{m/n -1}.\end{align*}\]

The above derivation is the key to the proof extending the Power Rule to rational powers. Using limits, we can extend this once more to include *all* powers, including irrational (even transcendental!) powers, giving the following theorem.

Theorem \(\PageIndex{1}\):: Power Rule for Differentiation

Let \(f(x) = x^n\), where \(n\neq 0\) is a real number. Then \(f\) is a differentiable function, and \(f^\prime(x) = n\cdot x^{n-1}\).

This theorem allows us to say the derivative of \(x^\pi\) is \(\pi x^{\pi -1}\).

We now apply this final version of the Power Rule in the next example, the second investigation of a "famous'' curve.

Example \(\PageIndex{4}\):: Using the Power Rule

Find the slope of \(x^{2/3}+y^{2/3}=8\) at the point \((8,8)\).

**Solution:**

This is a particularly interesting curve called an *astroid*. It is the shape traced out by a point on the edge of a circle that is rolling around inside of a larger circle, as shown in Figure 2.25.

Figure 2.25:*An astroid, traced out by a point on the smaller circle as it rolls inside the larger circle.*

To find the slope of the astroid at the point \((8,8)\), we take the derivative implicitly.

\[\begin{align*} \frac23x^{-1/3}+\frac23y^{-1/3}y^\prime &=0\\ \frac23y^{-1/3}y^\prime &= -\frac23x^{-1/3}\\ y^\prime &= -\frac{x^{-1/3}}{y^{-1/3}}\\ y^\prime &= -\frac{y^{1/3}}{x^{1/3}} = -\sqrt[3]{\frac{y}x}. \end{align*}\]

Plugging in \(x=8\) and \(y=8\), we get a slope of \(-1\). The astroid, with its tangent line at \((8,8)\), is shown in Figure 2.26.

Figure 2.26:*An astroid with a tangent line.*

## Implicit Differentiation and the Second Derivative

We can use implicit differentiation to find higher order derivatives. In theory, this is simple: first find \(\frac{dy}{dx}\), then take its derivative with respect to \(x\). In practice, it is not hard, but it often requires a bit of algebra. We demonstrate this in an example.

Example \(\PageIndex{5}\):: Finding the second derivative

Given \(x^2+y^2=1\), find \(\frac{d^2y}{dx^2} = y^{\prime\prime}\).

**Solution:**

We found that \(y^\prime = \frac{dy}{dx} = -x/y\) in Example\PageIndex{3} . To find \(y^{\prime\prime}\), we apply implicit differentiation to \(y^\prime \).

\[\begin{align*} y^{\prime\prime} &= \frac{d}{dx}\big(y^\prime \big) \\ &= \frac{d}{dx}\left(-\frac xy\right)\qquad \text{(Now use the Quotient Rule.)} \\ &= -\frac{y(1) - x(y^\prime )}{y^2} \end{align*}\]

replace \(y^\prime \) with \(-x/y\):

\[ y^{\prime\prime} = -\frac{y-x\big(\frac{-x}{y}\big)}{y^2} \]

\[ y^{\prime\prime} = -\frac{y+\big(\frac{x^2}{y}\big)}{y^2}.\]

\[ y^{\prime\prime} = -\frac{y^2+x^2}{y^3} \]

Now use the fact that \(y^2+x^2=1. \)

\[ y^{\prime\prime}= -\frac{1}{y^3}.\]

This is a particularly simple expression, and it is usable. We can see that \(y^{\prime\prime}>0\) when \(y<0\) and \(y^{\prime\prime}<0\) when \(y>0\). In Section 3.4, we will see how this relates to the shape of the graph.

## Contributors and Attributions

Gregory Hartman (Virginia Military Institute). Contributions were made by Troy Siemers and Dimplekumar Chalishajar of VMI and Brian Heinold of Mount Saint Mary's University. This content is copyrighted by a Creative Commons Attribution - Noncommercial (BY-NC) License. http://www.apexcalculus.com/

Pamini Thangarajah (Mount Royal University, Calgary, Alberta, Canada)