Implicit Differentiation
When y is tied to x by an equation instead of a formula, differentiate both sides of the equation with respect to x, treating y as a function of x, so every term containing y picks up a factor \dfrac{dy}{dx} by the chain rule. Then collect the \dfrac{dy}{dx} terms and solve for it.
When y can’t (or shouldn’t) be isolated
An equation in x and y describes a curve. Near most points the curve is the graph of a function y(x), and \dfrac{dy}{dx} is its slope there. You can often find that slope without solving for y first, and sometimes you cannot solve for y at all.
- Not worth isolating. The circle x^2+y^2=25 gives y=\pm\sqrt{25-x^2}, two branches with two formulas. Implicit differentiation gives one formula for both.
- No tidy solution. In x^3+y^3=6xy, the unknown y appears in a cubic with no neat solution.
- Impossible by algebra. In xy+\sin y=x^2, the variable y appears both inside and outside a sine, so there is no algebraic way to isolate it.
The method
Write \dfrac{dy}{dx} or the shorthand y' for the unknown slope.
- Differentiate both sides with respect to x, term by term.
- Apply the chain rule to every y term. Because y depends on x, a term such as y^2 is a composite function, and its derivative carries a factor \dfrac{dy}{dx}. Use the product rule where x and y are multiplied.
- Collect all terms containing \dfrac{dy}{dx} on one side, move everything else to the other side, and factor out \dfrac{dy}{dx}.
- Divide to solve for \dfrac{dy}{dx}.
The reason \dfrac{d}{dx}y^2=2y\dfrac{dy}{dx} is the chain rule: the outer function is the square and the inner function is y(x). For x^2 the inner function is x, whose derivative is 1, so nothing extra appears. A y term differs only by that factor.
| Term | Derivative with respect to x |
|---|---|
| x^2 | 2x |
| y^2 | 2y\,\dfrac{dy}{dx} |
| \sin y | \cos y\,\dfrac{dy}{dx} |
| xy | y+x\,\dfrac{dy}{dx} |
Example: the circle x^2+y^2=25
Differentiate both sides:
2x+2y\frac{dy}{dx}=0.
Move 2x to the right and divide by 2y, which requires y\ne 0:
\frac{dy}{dx}=-\frac{x}{y}.
The point (3,4) lies on the circle, because 9+16=25. There the slope is -\dfrac34. As a check, the radius to (3,4) has slope \dfrac43, and a tangent to a circle is perpendicular to the radius, so its slope is the negative reciprocal -\dfrac34. Turning this slope into the equation of the tangent line is covered in a separate article.
The formula also reads off special points. The slope is 0 where x=0, at (0,\pm5). The denominator is 0 where y=0, which on this circle means x=\pm5. At (\pm5,0) the numerator is not zero, so the slope is infinite and the tangent is vertical.
Example: x^3+y^3=6xy
Differentiate both sides. The right side is a product of x and y, so the product rule applies to it:
3x^2+3y^2\frac{dy}{dx}=6\left(y+x\frac{dy}{dx}\right).
Expand the bracket:
3x^2+3y^2\frac{dy}{dx}=6y+6x\frac{dy}{dx}.
Collect the \dfrac{dy}{dx} terms on the left and everything else on the right:
3y^2\frac{dy}{dx}-6x\frac{dy}{dx}=6y-3x^2.
Factor out \dfrac{dy}{dx}:
\left(3y^2-6x\right)\frac{dy}{dx}=6y-3x^2.
Divide by 3y^2-6x and cancel the common factor 3. This requires y^2\ne 2x:
\frac{dy}{dx}=\frac{6y-3x^2}{3y^2-6x}=\frac{2y-x^2}{y^2-2x}.
A calculator may print the same fraction with numerator and denominator both multiplied by -1, as \dfrac{x^2-2y}{2x-y^2}.
Example with a trig term: xy+\sin y=x^2
The term xy needs the product rule again, and \sin y needs the chain rule:
y+x\frac{dy}{dx}+\cos y\,\frac{dy}{dx}=2x.
Collect the \dfrac{dy}{dx} terms on the left and factor:
\left(x+\cos y\right)\frac{dy}{dx}=2x-y.
Divide, which requires x+\cos y\ne 0:
\frac{dy}{dx}=\frac{2x-y}{x+\cos y}.
Second derivative
Start from the first derivative of the circle, \dfrac{dy}{dx}=-\dfrac xy, and differentiate again with respect to x. This is a quotient, and y still depends on x, so the quotient rule produces another \dfrac{dy}{dx}:
\frac{d^2y}{dx^2}=-\frac{1\cdot y-x\,\dfrac{dy}{dx}}{y^2}.
Substitute \dfrac{dy}{dx}=-\dfrac xy into the numerator and combine:
y-x\left(-\frac xy\right)=y+\frac{x^2}{y}=\frac{y^2+x^2}{y}.
Putting this back,
\frac{d^2y}{dx^2}=-\frac{\dfrac{x^2+y^2}{y}}{y^2}=-\frac{x^2+y^2}{y^3}.
The original equation says x^2+y^2=25, so the answer simplifies to
\frac{d^2y}{dx^2}=-\frac{25}{y^3}.
On the upper half of the circle, where y>0, this is negative. On the lower half it is positive. That matches a curve that bends downward on top and upward on the bottom. The notation \dfrac{d^2y}{dx^2} and the idea behind it are explained in the article on second and higher derivatives.
The recipe is always the same: substitute the first derivative wherever \dfrac{dy}{dx} appears, then use the original equation to simplify. The calculator’s implicit mode returns the first derivative only, so this step is done by hand.
Implicit vs. logarithmic differentiation
Both methods differentiate an equation in which y depends on x. Implicit differentiation is for a relation that is given as an equation and may not be solvable for y. Taking logarithms first is a special case aimed at a function y=f(x) with a variable exponent or many factors: you create the equation \ln y=\ln f(x) and then differentiate it implicitly.
Mistakes to avoid
- Forgetting \dfrac{dy}{dx} after a y term. Writing \dfrac{d}{dx}y^2=2y drops the chain-rule factor. Every term with y in it needs one.
- Skipping the product rule on xy. The derivative of xy is y+x\dfrac{dy}{dx}, not y and not x\dfrac{dy}{dx}.
- Leaving \dfrac{dy}{dx} on both sides. You cannot divide until all the \dfrac{dy}{dx} terms are on one side and factored, as in the folium example.
- Substituting a point too early. If you put x=3 and y=4 into the equation before differentiating, both sides become plain numbers and their derivative is 0. Differentiate first, then substitute.
Try it: Open
x^2+y^2=25in implicit mode. The page switches to “Implicit: F(x, y) = 0”, takes “differentiate w.r.t.” as x, and labels the answer dy/dx. The result is -\dfrac xy. The steps use the same names as ordinary differentiation (“Sum rule”, “Power rule”, “Power rule + chain rule”) and end with “Solve for dy/dx”. An equation without an equals sign is read as “= 0”, sox^2+y^2-25gives the same answer.
Frequently asked questions
Is the answer in terms of both x and y OK?
Yes. On a curve such as a circle, one value of x belongs to more than one point, so the slope depends on which point you mean, and that takes both coordinates. To get a number, plug in the coordinates of a point on the curve, such as (3,4). You can rewrite y in terms of x on a chosen branch, but it is not required.
What if the denominator is zero?
The formula is undefined at that point. On the circle, y=0 gives vertical tangents at (\pm5,0), because the numerator x is not zero there. If the numerator and denominator are both zero, the formula gives \frac00 and says nothing about the slope. For the folium x^3+y^3=6xy this happens at the origin, where the curve crosses itself, so no single slope exists there.
Can I check an implicit derivative numerically?
Yes. Pick a point on the curve, evaluate the formula there, then move a small step along the curve and compute the slope of the secant. For the circle at (3,4) the formula says -\dfrac34. At x=3.01 the upper branch has y\approx 3.99248, and the secant slope from (3,4) is about -0.752, which is close to -0.75.
Where to go next
- Tangent and normal lines: use a slope such as -\frac34 to write the equation of the line.
- Higher-order derivatives: notation and patterns for second, third and n-th derivatives.
The implicit differentiation calculator shows the steps but has no answer checker in implicit mode, so confirm your own implicit derivatives with the numeric test above.