Behavior of implicit curves
An equation in \(x\) and \(y\) often describes a curve. Topic 3.2 differentiates the equation once, with \(y\) as a function of \(x\). After the terms are collected, the differentiated equation reads \(D\,\frac{dy}{dx}=N\), where \(N\) and \(D\) are expressions in \(x\) and \(y\). Where \(D\neq0\), the slope is \(\frac ND\).
This topic differentiates a second time to find how the slope changes. The two derivatives then describe the curve: where its tangent is horizontal or vertical, and which way it bends.
How the slope changes along the curve
The curve x squared minus x y plus y squared equals 3, an ellipse tilted along the line y = x, on axes with grid lines at the whole numbers. Short horizontal bars mark its highest point (1, 2) and its lowest point (−1, −2), and short vertical bars mark its rightmost point (2, 1) and its leftmost point (−2, −1). A faint dashed line, 2y = x, runs through the rightmost and leftmost points and divides the ellipse into an upper arc and a lower arc. An orange point starts at (1, 2) with its horizontal orange tangent line, and the thin region between the curve and the tangent is shaded red. On the upper arc the region is red, and on the lower arc it is green. A button moves the point to (2, 1), where the tangent is vertical and the shaded region disappears. Readouts under the figure give the point, dy/dx and the second derivative.
In Figure 1, the orange point moves along the curve
an ellipse tilted along the line \(y=x\). The orange line is the tangent, and the region between the curve and the tangent near the point is shaded. The point starts at the top, \((1,2)\), where the tangent is horizontal, the curve lies below it, and the region is red.
To find the slope, differentiate both sides with respect to \(x\), with the product rule for \(xy\) and the chain rule for \(y^2\). Then collect the terms with \(\frac{dy}{dx}\), which this page also writes as \(\cy{y'}\):
Here \(N=y-2x\) and \(D=2y-x\), which are continuous. Near a point of the curve where \(D\neq0\), the implicit function theorem of topic 3.2 then makes \(y\) a differentiable function of \(x\). Because \(N\) and \(D\) are built from \(x\) and \(y\), they are then differentiable functions of \(x\) as well, with derivatives \(N'\) and \(D'\). The quotient rule gives the second derivative, \(y''\) or \(\frac{d^2y}{dx^2}\) (topic 3.6), as \(y''=\frac{D\,N'-N\,D'}{D^2}\).
Each time a rule differentiates \(y\) inside \(N\) or \(D\), the chain rule adds the factor \(y'\) again. For the ellipse, \(N'=y'-2\) and \(D'=2y'-1\), so the numerator of \(y''\) is
because the terms \(2yy'\) and \(2x\) cancel. It still contains \(y'\), so replace \(y'\) by \(\frac{y-2x}{2y-x}\):
On the curve, \(x^2-xy+y^2=3\), so the numerator is \(-\frac{18}{2y-x}\). Dividing it by \(D^2=(2y-x)^2\) gives
The last step uses the equation of the curve, so this form of \(y''\) holds only at points of the curve. At \((1,2)\), \(2y-x=3\), so \(y''=-\frac{18}{27}=-\frac23\), shown as −0.67 under Figure 1.
At a single point, a second route is often shorter. Near the point, both sides of \(D\,y'=N\) are the same function of \(x\). Their derivatives are therefore equal, and with the product rule on the left, \(D'\,y'+D\,y''=N'\). Substitute numbers for \(x\), \(y\) and \(y'\) before you solve for \(y''\). At \((1,2)\), \(y'=0\) and \(D=3\), so \(D'\,y'=0\) and \(3y''=N'=-2\). The value \(y''=-\frac23\) is the same.
The sign of \(y''\) gives the bend. Because \(y\) is continuous, \(-\frac{18}{(2y-x)^3}\) is continuous wherever \(D\neq0\). If \(y''>0\) at a point, it therefore stays positive on an interval around the point, as in topic 5.7. The curve is then concave up near the point, by the Concavity Test of topic 5.6, and lies above its tangent. If \(y''<0\), it is concave down and lies below its tangent.
For the ellipse, \(y''\) has the sign opposite to that of \(2y-x\). The faint dashed line in Figure 1 is the line \(2y=x\), where \(D=0\). Substituting \(x=2y\) into the equation of the curve gives \(3y^2=3\), so the line meets the curve at \((2,1)\) and \((-2,-1)\). It divides the curve into an upper arc, where \(2y-x>0\), and a lower arc. Drag the point around the curve. The region is red on the upper arc, which is concave down, and green on the lower arc, which is concave up.
The argument needs \(D\neq0\). Use the button under Figure 1 to move the point to \((2,1)\), where \(D=0\). The tangent is vertical, the shaded region disappears, and the values of \(y'\) and \(y''\) under the figure read “does not exist”. Near this point the curve is not the graph of a function of \(x\), because vertical lines close to its left meet both arcs. Drag the point away from \((2,1)\) in each direction, until the shaded region returns. The region is red on one side and green on the other, because the denominator of \(y''\) changes sign at \((2,1)\).
On the ellipse, \(y''\) is never 0. On a curve where \(y''=0\) at a point, the value 0 gives no conclusion. As in topic 5.6, compare the signs of \(y''\) on the two sides of the point.
Horizontal and vertical tangents
The tangent is horizontal where the slope \(\frac ND\) is 0, which needs \(N=0\) and \(D\neq0\). Where \(D=0\) and \(N\neq0\), no number \(y'\) satisfies \(D\,y'=N\), and the tangent is vertical (topic 3.2). Each condition contains one equation in \(x\) and \(y\), so solve it together with the equation of the curve.
For the ellipse, \(N=0\) means \(y=2x\). Substitution gives \(3x^2=3\), so the tangent is horizontal at \((1,2)\) and \((-1,-2)\), where \(D\) is 3 and \(-3\). It is vertical at the two points where \(D=0\), \((2,1)\) and \((-2,-1)\), because \(N\) is \(-3\) and 3 there. Short bars in Figure 1 mark the four points.
At a horizontal tangent, the second derivative distinguishes a peak from a valley. Near the point, the curve is the graph of a function with derivative 0 there, so the Second Derivative Test of topic 5.7 applies. At \((1,2)\), \(y''=-\frac23\), so the curve has a local maximum. At \((-1,-2)\), \(2y-x=-3\), so \(y''=-\frac{18}{-27}=\frac23\), and the curve has a local minimum.
Where \(N=0\) and \(D=0\), the fraction \(\frac ND\) is \(\frac00\), so neither condition applies. The curve can cross itself there, as the folium of topic 3.2 does at the origin, or come to a sharp point, a cusp. To decide, examine the curve near the point by another route, such as solving its equation for \(y\).
Example 1
Find an implicit first derivative
Find \(\dfrac{dy}{dx}\) in terms of \(x\) and \(y\) for the curve \(y=\cos(x+y)\). Then find the slope of the curve at the point \(\left(\frac{\pi}{2},0\right)\).
Solution
Differentiate both sides with respect to \(x\), with \(y\) as a differentiable function of \(x\). The right side is the cosine of the inner function \(x+y\), whose derivative is \(1+\frac{dy}{dx}\), so by the chain rule
The derivative \(\frac{dy}{dx}\) appears on both sides. Collect its terms on the left. Then factor it out:
Here \(D=1+\sin(x+y)\). Where \(\sin(x+y)\neq-1\), divide by it:
The point \(\left(\frac{\pi}{2},0\right)\) lies on the curve, because \(\cos\frac{\pi}{2}=0\). There \(\sin(x+y)=1\), so \(D=2\) and the slope is \(-\frac12\).
Example 2
Find an implicit second derivative
Find \(\dfrac{d^2y}{dx^2}\) in terms of \(x\) and \(y\) for the curve \(\sqrt{x}+\sqrt{y}=3\), where \(0<x<9\).
Solution
On this part of the curve, \(\sqrt y=3-\sqrt x>0\), so \(y>0\) and both square roots are differentiable. Differentiate both sides, with the chain rule for \(\sqrt y\):
Differentiate \(y'\) with the quotient rule. The numerator \(\sqrt y\) changes with \(x\) through \(y\), so its derivative is \(\frac{y'}{2\sqrt y}\):
Replace \(y'\) by \(-\frac{\sqrt y}{\sqrt x}\). The first product in the numerator becomes \(-\frac12\), so
On the curve, \(\sqrt x+\sqrt y=3\), so \(y''=\frac{3}{2x\sqrt x}\). It is positive for \(0<x<9\), so the curve is concave up. As a check, solving for \(y\) gives \(y=9-6\sqrt x+x\), whose derivatives are \(1-\frac{3}{\sqrt x}\) and \(\frac{3}{2x\sqrt x}\).
Example 3
Determine concavity at a point
Is the curve \(xy+e^y=e\) concave up or concave down at the point where it crosses the \(y\)-axis? Justify your answer.
Solution
On the \(y\)-axis, \(x=0\), so \(e^y=e\) and \(y=1\). The point is \((0,1)\). Differentiate both sides, with the product rule for \(xy\) and the chain rule for \(e^y\):
At \((0,1)\), the coefficient of \(y'\) is \(D=x+e^y=e\), which is not 0, and the equation gives \(1+e\,y'=0\), so \(y'=-\frac1e\). The equation \(y+xy'+e^y\,y'=0\), not \(1+e\,y'=0\), holds for every \(x\) near 0, so differentiate it again, with \(y'\) as a function of \(x\). The term \(y\) gives \(y'\), the product \(xy'\) gives \(y'+xy''\), and the product \(e^y\,y'\) gives \(e^y\,(y')^2+e^y\,y''\), by the chain rule for \(e^y\):
Substitute \(x=0\), \(y=1\) and \(y'=-\frac1e\):
The second derivative is positive, so the curve is concave up at \((0,1)\).
Example 4
Identify horizontal or vertical tangents
Find all points on the curve \(y^2=x^3+3x^2\) 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\):
Here \(N=3x(x+2)\) and \(D=2y\). For a horizontal tangent, \(N=0\), so \(x=0\) or \(x=-2\). At \(x=-2\), the curve gives \(y^2=4\), so \(y=\pm2\), and there \(D=\pm4\neq0\).
For a vertical tangent, \(D=0\), so \(y=0\). The curve then gives \(x^2(x+3)=0\), so \(x=0\) or \(x=-3\). At \((-3,0)\), \(N=27-18=9\neq0\).
Both conditions lead to the origin, where \(N\) and \(D\) are both 0, so neither applies there. Near the origin, solving for \(y\) gives \(y=x\sqrt{x+3}\) and \(y=-x\sqrt{x+3}\). By the product rule, their slopes at 0 are \(\sqrt3\) and \(-\sqrt3\). The curve crosses itself, and neither of its tangent lines there is horizontal or vertical.
The tangent is horizontal at \((-2,2)\) and \((-2,-2)\), and vertical at \((-3,0)\).
Each example is one of the four skills of topic 5.12 in Which & Why: AP Calculus.