calculus25 min

Implicit Differentiation

Differentiating equations where y is not explicitly isolated, using the chain rule on both sides

0/9Not Started

Why This Matters

Not every relationship between variables can be written as y = f(x). The equation of a circle, x^2 + y^2 = 25, defines y as a function of x, but solving for y gives two branches (positive and negative square root). Many important curves -- ellipses, hyperbolas, and more exotic shapes -- are naturally described by implicit equations that mix x and y together.

Implicit differentiation lets you find dy/dx directly from the implicit equation without solving for y first. The key insight is that y is still a function of x, even if you have not isolated it. Every time you differentiate a term involving y, you apply the chain rule: the derivative of y^2 with respect to x is 2y * (dy/dx), because y depends on x.

This technique is essential whenever you work with related variables -- quantities that are connected by an equation but neither is explicitly defined in terms of the other. It leads directly to related rates problems and is the foundation for multivariable calculus concepts like partial derivatives.

Define Terms

Visual Model

Implicit EquationF(x, y) = 0
Differentiate Both Sidesd/dx of left = d/dx of right
Chain Rule on yd/dx[y^n] = ny^(n-1) * dy/dx
Collect dy/dx TermsGroup all dy/dx on one side
Solve for dy/dxFactor and divide
dy/dx = ...May contain both x and y

The full process at a glance. Click Start tour to walk through each step.

Implicit differentiation: differentiate both sides, apply the chain rule to y terms, then solve for dy/dx.

Code Example

Code
// Implicit differentiation verified numerically
// Circle: x^2 + y^2 = 25
// Implicit derivative: dy/dx = -x/y

// For a circle, y = sqrt(25 - x^2) on the upper half
function circleUpperY(x) {
  return Math.sqrt(25 - x * x);
}

// Numerical derivative of the explicit function
function numericalDeriv(f, x, h = 0.00001) {
  return (f(x + h) - f(x - h)) / (2 * h);
}

// Compare: implicit formula vs numerical
console.log("Circle: x^2 + y^2 = 25");
console.log("Implicit derivative: dy/dx = -x/y\n");

const testPoints = [0, 1, 2, 3, 4];
for (const x of testPoints) {
  const y = circleUpperY(x);
  const implicitDeriv = -x / y;  // From implicit differentiation
  const numericalResult = numericalDeriv(circleUpperY, x);
  console.log(`x=${x}: y=${y.toFixed(4)}, implicit dy/dx=${implicitDeriv.toFixed(4)}, numerical=${numericalResult.toFixed(4)}`);
}

// Another example: x^3 + y^3 = 6xy (folium of Descartes)
// Differentiating: 3x^2 + 3y^2(dy/dx) = 6y + 6x(dy/dx)
// dy/dx = (6y - 3x^2) / (3y^2 - 6x) = (2y - x^2) / (y^2 - 2x)
console.log("\nFolium: x^3 + y^3 = 6xy");
console.log("At point (3, 3): dy/dx = (2*3 - 9)/(9 - 6) =", (6 - 9)/(9 - 6));

// Tangent line at (3, 4) on the circle
const x0 = 3, y0 = 4;
const slope = -x0 / y0;
console.log(`\nTangent to circle at (${x0}, ${y0}):`);
console.log(`y = ${y0} + ${slope.toFixed(4)} * (x - ${x0})`);
console.log(`y = ${slope.toFixed(4)}x + ${(y0 - slope * x0).toFixed(4)}`);

Interactive Experiment

Try these exercises:

  • For the ellipse x^2/9 + y^2/4 = 1, find dy/dx by implicit differentiation. Verify at the point (0, 2).
  • Compute the implicit derivative of x*y = 1 (a hyperbola). What is dy/dx at (2, 0.5)?
  • For x^2 + xy + y^2 = 7, find dy/dx. Note how the product rule applies to the xy term.
  • Check that the tangent line at (3, 4) on the circle x^2 + y^2 = 25 is perpendicular to the radius from the origin to (3, 4).
  • Find where the tangent to the circle is horizontal (dy/dx = 0) and where it is vertical (dy/dx undefined).

Quick Quiz

Coding Challenge

Verify Implicit Derivative Numerically

Write a function called `verifyImplicit` that takes an explicit function yOfX (y as a function of x), an implicit derivative formula dydxFormula (a function of x and y that returns dy/dx), and an x-value. It should compute: (1) the numerical derivative of yOfX at x, and (2) the implicit formula evaluated at (x, yOfX(x)). Return true if they agree within a tolerance of 0.001, false otherwise.

Loading editor...

Real-World Usage

Implicit differentiation appears in many fields:

  • Computer graphics: Implicit surfaces (like metaballs and signed distance fields) are defined by F(x,y,z) = 0. Normals are computed via implicit differentiation (gradient of F).
  • Economics: Indifference curves and isoquants are defined implicitly. Implicit differentiation gives the marginal rate of substitution.
  • Thermodynamics: Equations of state (like the van der Waals equation) relate pressure, volume, and temperature implicitly. Derivatives give compressibility and other properties.
  • Multivariable calculus: The implicit function theorem generalizes implicit differentiation to higher dimensions, a key result in advanced mathematics.
  • Constraint optimization: Lagrange multipliers use implicit differentiation along constraint surfaces to find extrema.

Connections