Unit 3 · Topic 3.2

Differentiate an implicit relation

Builds on the chain rule and the product rule. 13 minutes.

  1. Example 1Differentiate an implicit relation
  2. Example 2Solve for the derivative
  3. Example 3Find the tangent at a point
  4. Example 4Find horizontal and vertical tangents

An equation in \(x\) and \(y\) often describes a curve, the set of points whose coordinates satisfy it. When the equation is not solved for \(y\), it is called an implicit relation between \(x\) and \(y\). An example is the folium of Descartes,

\[x^3+y^3=9xy\]

Some vertical lines meet this curve at more than one point, so it is not the graph of a function of \(x\). This topic finds the slope of such a curve at a point without solving its equation for \(y\).

Both sides change at the same rate

The folium of Descartes, x cubed plus y cubed equals 9xy, on axes from −2 to 5.5. The curve crosses itself at the origin. From there a loop rises through the first quadrant to its tip at (4.5, 4.5), and two short tails leave the origin, one to the left, close above the x-axis, and one downward, close to the right of the y-axis. An orange point at (2, 4), on the upper part of the loop, carries its orange tangent line with the slope 0.8 beside it. A thick part of the loop surrounds the point. A faint dashed vertical line through the point meets the loop again below it, near (2, 0.45). A button moves the point to the right end of the loop, where the tangent is vertical and the thick part shrinks to nothing.

Figure 1The orange point moves along the curve \(x^3+y^3=9xy\), with its tangent line and its slope. The thick part of the curve around it is the graph of a function of \(x\), and the faint dashed line through it is vertical.

In Figure 1, the curve crosses itself at the origin and forms a loop. The orange point at \((2,4)\) lies on the loop, and the orange line is its tangent, with the slope beside it. The faint dashed line is the vertical line through the point, and it meets the curve again at the dot below. The thick part of the curve around the point meets each vertical line at most once. It is therefore the graph of a function of \(x\).

Assume that near the point, the curve is the graph of a differentiable function \(y\) of \(x\). Then for every \(x\) near the point's \(x\)-coordinate, \((x,y)\) lies on the curve, so the equation holds. Its two sides are the same function of \(x\) there, so they have the same derivative. Differentiate each term with respect to \(x\). The power rule gives \(3x^2\) for \(x^3\). The term \(y^3\) is a composition with \(y\) as the inner function, so the chain rule gives \(3y^2\,\cy{\frac{dy}{dx}}\). The term \(9xy\) is the product of \(9x\) and \(y\), so the product rule gives \(9y+9x\,\cy{\frac{dy}{dx}}\):

\[3x^2+3y^2\,\cy{\frac{dy}{dx}}=9y+9x\,\cy{\frac{dy}{dx}}\]

This method is called implicit differentiation. A term in \(x\) alone is differentiated as before. Each time a rule differentiates \(y\), the chain rule adds the factor \(\frac{dy}{dx}\): for a differentiable function \(g\), the derivative of \(g(y)\) is \(g'(y)\,\frac{dy}{dx}\). A product \(f(x)\,g(y)\) needs the product rule as well, so its derivative is \(f'(x)\,g(y)+f(x)\,g'(y)\,\frac{dy}{dx}\).

The argument needs \(y\) to be a differentiable function of \(x\) near the point. Use the button under Figure 1 to move the point to the right end of the loop. There the curve turns back, and the thick part shrinks to nothing. Near the point, each vertical line to its left meets the curve twice, and each line to its right misses it. No part of the curve around the point is the graph of a function of \(x\). The tangent is vertical, and the figure shows “vertical” in place of a slope.

Solving for the slope

The chain rule gives \(\frac{dy}{dx}\) as a single factor, and the product rule differentiates only one factor in each of its terms. Each term of the differentiated equation therefore contains \(\frac{dy}{dx}\) at most once, as a factor. Collect the terms with \(\frac{dy}{dx}\) on one side and the other terms on the other side. Then factor out \(\frac{dy}{dx}\):

\[\big(3y^2-9x\big)\,\cy{\frac{dy}{dx}}=9y-3x^2\]

Where \(3y^2-9x\neq 0\), divide both sides by it. The common factor 3 cancels:

\[\cy{\frac{dy}{dx}}=\frac{3y-x^2}{y^2-3x}\]

The slope depends on both coordinates, because points of the curve with the same \(x\) can have different slopes. At \((2,4)\), it is \(\frac{3(4)-2^2}{4^2-3(2)}=\frac{8}{10}=\frac45\), the 0.8 that Figure 1 shows when the point is there.

After the terms are collected, every differentiated equation reads \(D\,\frac{dy}{dx}=N\), where \(N\) and \(D\) are expressions in \(x\) and \(y\). Where \(D\neq 0\), the slope is \(\frac ND\). For the folium, \(D=3y^2-9x\) and \(N=9y-3x^2\). If \(N\) and \(D\) are continuous near a point of the curve where \(D\neq 0\), the assumption of the argument holds near that point. This result is part of the implicit function theorem, which later courses prove.

Tangent lines

The fraction \(\frac ND\) gives a number at any point where \(D\neq 0\), even a point that is not on the curve. Before you use it at a point \((a,b)\), check that \(a\) and \(b\) satisfy the equation of the curve. The tangent there is the line through \((a,b)\) whose slope \(\cy{m}\) is the value of the fraction. In point-slope form, it is \(y-b=m(x-a)\).

The tangent is horizontal where the slope is 0, which needs \(N=0\) and \(D\neq 0\), as at the top of the loop in Figure 1. Where \(D=0\) and \(N\neq 0\), no value of \(\frac{dy}{dx}\) satisfies \(D\,\frac{dy}{dx}=N\), because its left side is 0 and its right side is not. The curve has no slope there. If \(N\) and \(D\) are continuous, then near such a point, \(D\) is close to 0 and \(N\) is not. The nearby tangents are therefore steep, and they approach the vertical line through the point. That line is the tangent there, as at the right end of the loop.

Each condition contains one equation in \(x\) and \(y\). Solve it together with the equation of the curve, so that only points of the curve remain. Where \(N\) and \(D\) are both 0, the fraction is \(\frac00\), and neither condition applies. For the folium, both are 0 at the origin, and the curve passes through the origin twice, once tangent to each axis.

Example 1

Differentiate an implicit relation

Assume that \(y\) is a differentiable function of \(x\) that satisfies \(x^2y^3+\sin y=4x\). Differentiate both sides of the equation with respect to \(x\).

Solution

Both sides are functions of \(x\) that are equal wherever \(y\) is defined, so their derivatives are equal. The term \(x^2y^3\) is a product, so the product rule gives \(2x\cdot y^3+x^2\cdot\frac{d}{dx}\big(y^3\big)\). By the chain rule, with \(y\) as the inner function, \(\frac{d}{dx}\big(y^3\big)=3y^2\,\frac{dy}{dx}\).

The term \(\sin y\) is the sine of the inner function \(y\), so its derivative is \(\cos y\,\frac{dy}{dx}\). The right side, \(4x\), has the derivative 4:

\[2xy^3+3x^2y^2\,\frac{dy}{dx}+\cos y\,\frac{dy}{dx}=4\]

The term \(2xy^3\) has no factor \(\frac{dy}{dx}\), because in that term the product rule differentiates \(x^2\) and leaves \(y^3\) as it is.

Example 2

Solve for the derivative

Find \(\dfrac{dy}{dx}\) in terms of \(x\) and \(y\) if \(xy^2+2y=x^2y+5\).

Solution

Treat \(y\) as a differentiable function of \(x\). Differentiate both sides, with the product rule for \(xy^2\) and \(x^2y\) and the chain rule for \(y^2\):

\[y^2+2xy\,\frac{dy}{dx}+2\,\frac{dy}{dx}=2xy+x^2\,\frac{dy}{dx}\]

The derivative \(\frac{dy}{dx}\) appears on both sides. Subtract \(x^2\,\frac{dy}{dx}\) and \(y^2\) from both sides, so that every term with \(\frac{dy}{dx}\) is on the left. Then factor out \(\frac{dy}{dx}\):

\[\big(2xy+2-x^2\big)\,\frac{dy}{dx}=2xy-y^2\]

Where \(2xy+2-x^2\neq 0\), divide by it:

\[\frac{dy}{dx}=\frac{2xy-y^2}{2xy+2-x^2}\]

Example 3

Find the tangent at a point

Show that the point \((3,2)\) lies on the curve \(3y^3+2xy-3x^2=9\). Then write an equation for the line tangent to the curve at that point.

Solution

At \((3,2)\), the left side is \(24+12-27=9\), so the point lies on the curve. Differentiate both sides, with the chain rule for \(3y^3\) and the product rule for \(2xy\):

\[9y^2\,\frac{dy}{dx}+2y+2x\,\frac{dy}{dx}-6x=0\]

Substitute \(x=3\) and \(y=2\) before you solve, so that the only unknown is the slope:

\[\begin{aligned}36\,\frac{dy}{dx}+4+6\,\frac{dy}{dx}-18&=0\\42\,\frac{dy}{dx}&=14\end{aligned}\]

The coefficient 42 is not 0, so the slope exists, and it is \(\frac{14}{42}=\frac13\). The tangent is the line through \((3,2)\) with this slope:

\[\begin{aligned}y-2&=\tfrac13(x-3)\\y&=\tfrac13x+1\end{aligned}\]

Example 4

Find horizontal and vertical tangents

Find all points on the curve \(y^2=x^3-3x\) at which the line tangent to the curve is horizontal, and all points at which it is vertical.

Solution

Differentiate both sides, with \(y\) as a differentiable function of \(x\):

\[2y\,\frac{dy}{dx}=3x^2-3\]

Here \(D=2y\) and \(N=3x^2-3\). For a horizontal tangent, \(N=0\), so \(x=1\) or \(x=-1\). Each value must also give a point of the curve. At \(x=1\), the equation of the curve gives \(y^2=-2\), which no real \(y\) satisfies. At \(x=-1\), it gives \(y^2=2\), so \(y=\pm\sqrt2\), and there \(D=\pm2\sqrt2\neq 0\).

For a vertical tangent, \(D=0\), so \(y=0\). The curve then gives \(x^3-3x=x\big(x^2-3\big)=0\), so \(x=0\) or \(x=\pm\sqrt3\). At these points, \(N\) is \(-3\) or 6, not 0.

The tangent is horizontal at \(\big(-1,\sqrt2\big)\) and \(\big(-1,-\sqrt2\big)\). It is vertical at \(\big(-\sqrt3,0\big)\), \((0,0)\) and \(\big(\sqrt3,0\big)\).

Each example is one of the four skills of topic 3.2 in Which & Why: AP Calculus.