Tutorials › Real Analysis › Implicit Differentiation

Differentiation · Tutorial 411 of 1000

Implicit Differentiation

Derive the slope of a differentiable branch of a polynomial relation, and learn why the derivative with respect to the dependent variable must be nonzero for the usual formula.

Advanced 9 min read

What You'll Learn

  • Define a differentiable branch of a polynomial relation
  • Compute the formal partial derivatives used in implicit differentiation
  • Prove the implicit differentiation formula from the chain rule
  • Find slopes on conics and other polynomial curves
  • Identify a condition that rules out a differentiable graph branch
  • Distinguish finding a branch’s derivative from proving that a branch exists

When an Equation Defines a Function Indirectly

A function is often specified by a formula giving its output directly, such as \(y=g(x)\). But a relation between \(x\) and \(y\) can also describe a function without isolating \(y\). For example, the circle \(x^2+y^2=25\) has an upper and a lower branch, each of which can be viewed as a function of \(x\) near suitable points. Implicit differentiation finds the slope of such a branch directly from the equation.

The key is to treat the dependent variable as a function of the independent variable. If \(y=g(x)\) and a polynomial relation \(F(x,y)=0\) holds along the graph of \(g\), then the one-variable function \(x\mapsto F(x,g(x))\) is constantly zero. The Chain Rule and the product rule can be used to differentiate that identity. The result determines \(g'(x)\) when the coefficient multiplying it is nonzero.

Definition (Differentiable Branch of a Polynomial Relation): Let \(F\) be a polynomial in two real variables, and let \(I\) be an interval. A differentiable function \(g:I\to\mathbb{R}\) is a differentiable branch of the relation \(F(x,y)=0\) if \(F(x,g(x))=0\) for every \(x\in I\). The graph of \(g\) is then part of the set of points satisfying the relation.

The word “branch” matters. A relation may describe several possible values of \(y\) for the same \(x\), or may fail to describe a real value for some \(x\). Implicit differentiation calculates the derivative of a differentiable branch once that branch is in hand. By itself, it does not establish that a branch exists.

Formal Partial Derivatives and the Main Formula

For a polynomial \(F(x,y)\), its formal partial derivative \(F_x\) is obtained by differentiating with respect to \(x\) while treating \(y\) as a constant. Its formal partial derivative \(F_y\) is obtained by differentiating with respect to \(y\) while treating \(x\) as a constant. For example, if \(F(x,y)=x^2y+3y^2-4x\), then \(F_x(x,y)=2xy-4\) and \(F_y(x,y)=x^2+6y\).

Definition (Formal Partial Derivatives of a Polynomial): If \(F(x,y)=\sum_{m,n} c_{mn}x^my^n\) is a polynomial, define $$ F_x(x,y)=\sum_{m,n} m c_{mn}x^{m-1}y^n,\qquad F_y(x,y)=\sum_{m,n} n c_{mn}x^my^{n-1}. $$ A term with coefficient \(m=0\) in the first sum, or \(n=0\) in the second, contributes zero.

These definitions involve ordinary polynomial differentiation, with the other variable held fixed. When \(y=g(x)\), however, both the explicit \(x\)-dependence and the dependence through \(g(x)\) contribute to the derivative. The next theorem states exactly how.

Theorem (Implicit Differentiation for Polynomials): Let \(F\) be a polynomial in two real variables, let \(I\) be an interval, and let \(g:I\to\mathbb{R}\) be differentiable at an interior point \(a\in I\). Suppose \(F(x,g(x))=0\) for every \(x\in I\). Then $$ F_x(a,g(a))+F_y(a,g(a))g'(a)=0. $$ If \(F_y(a,g(a))\ne0\), then $$ g'(a)=-\frac{F_x(a,g(a))}{F_y(a,g(a))}. $$

Proof. Write \(F\) as a finite sum of monomials \(c_{mn}x^my^n\). After substituting \(y=g(x)\), a monomial becomes \(c_{mn}x^m g(x)^n\). By the product rule and the Chain Rule, its derivative at \(a\) is

$$ c_{mn}\left(m a^{m-1}g(a)^n+n a^m g(a)^{n-1}g'(a)\right), $$

where a contribution with exponent zero is interpreted as zero. Since \(F\) has only finitely many terms, the sum rule gives

$$ \left.\frac{d}{dx}F(x,g(x))\right|_{x=a} =F_x(a,g(a))+F_y(a,g(a))g'(a). $$

The function \(x\mapsto F(x,g(x))\) is zero on \(I\), so its derivative at \(a\) is zero. This proves the identity. If \(F_y(a,g(a))\ne0\), division by that number gives the stated formula. \(\square\)

The identity is the fundamental step: differentiating the relation produces an equation for the unknown slope. The quotient formula is available only when its denominator is nonzero. If the denominator is zero, the identity still holds, but it does not determine \(g'(a)\).

Worked Examples

Worked Example: Finding a Slope on an Ellipse

Consider the relation \(x^2+xy+y^2=7\), and suppose a differentiable branch passes through \((1,2)\). First check that the point lies on the relation:

$$ 1^2+(1)(2)+2^2=1+2+4=7. $$

Set \(F(x,y)=x^2+xy+y^2-7\). Its formal partial derivatives are

$$ F_x(x,y)=2x+y,\qquad F_y(x,y)=x+2y. $$

At \((1,2)\), these values are \(F_x(1,2)=2+2=4\) and \(F_y(1,2)=1+4=5\). Since \(5\ne0\), the theorem applies and gives the slope of the branch there:

$$ g'(1)=-\frac{F_x(1,2)}{F_y(1,2)} =-\frac{4}{5}. $$

This calculation finds the slope without first solving the quadratic equation for \(y\). It applies to whichever differentiable branch passes through the specified point.

Worked Example: A Relation with a Cubic Term

Suppose a differentiable branch satisfies \(xy+y^3=2\) and passes through \((1,1)\). The point satisfies the relation because \(1\cdot1+1^3=2\). Define \(F(x,y)=xy+y^3-2\). Then

$$ F_x(x,y)=y,\qquad F_y(x,y)=x+3y^2. $$

At \((1,1)\), the values are \(F_x(1,1)=1\) and \(F_y(1,1)=1+3=4\), so the denominator is nonzero. The derivative of the branch at \(x=1\) is therefore

$$ g'(1)=-\frac{1}{4}. $$

The same result can be seen by differentiating the identity \(xg(x)+g(x)^3=2\): the product rule gives \(g(x)+xg'(x)\), and the Chain Rule gives \(3g(x)^2g'(x)\). At \(x=1\), \(g(1)=1\), so \(1+g'(1)+3g'(1)=0\), hence \(g'(1)=-1/4\).

Worked Example: The Two Slopes of a Circle

Consider \(x^2+y^2=25\) at the point \((3,4)\). The point is on the circle since \(3^2+4^2=9+16=25\). With \(F(x,y)=x^2+y^2-25\), we have \(F_x=2x\) and \(F_y=2y\). Since \(F_y(3,4)=8\ne0\), the branch through \((3,4)\) has slope

$$ g'(3)=-\frac{2(3)}{2(4)}=-\frac{3}{4}. $$

At the point \((3,-4)\), the same relation gives \(F_x(3,-4)=6\) and \(F_y(3,-4)=-8\), so a differentiable branch through that point has slope

$$ g'(3)=-\frac{6}{-8}=\frac{3}{4}. $$

The signs differ because the points lie on different branches of the circle. This also illustrates why the point, not just the equation, must be specified when finding an implicit slope.

When the Usual Formula Cannot Apply

The nonzero condition on \(F_y\) is not merely a precaution against division by zero. The identity in the theorem also tells us when a differentiable graph branch is impossible. If \(F_y\) vanishes at a point on the relation but \(F_x\) does not, the identity cannot hold for any finite value of \(g'\).

Theorem (Obstruction to a Differentiable Graph Branch): Let \(F\) be a polynomial, and suppose a differentiable function \(g\) satisfies \(F(x,g(x))=0\) near an interior point \(a\). If \(F_y(a,g(a))=0\), then \(F_x(a,g(a))=0\). In particular, if \(F_x(a,g(a))\ne0\) and \(F_y(a,g(a))=0\), no such differentiable branch through \((a,g(a))\) exists.

Proof. The Implicit Differentiation Theorem gives

$$ F_x(a,g(a))+F_y(a,g(a))g'(a)=0. $$

If \(F_y(a,g(a))=0\), the second term is zero because \(g'(a)\) is a finite real number. Thus the equation reduces to \(F_x(a,g(a))=0\). If \(F_x(a,g(a))\ne0\), this necessary identity fails, so there cannot be a differentiable branch satisfying the hypotheses through that point. \(\square\)

Worked Example: A Relation That Has No Differentiable Graph Branch at the Origin

Consider \(x-y^2=0\) at \((0,0)\). The point lies on the relation. Let \(F(x,y)=x-y^2\). Then \(F_x(x,y)=1\) and \(F_y(x,y)=-2y\), so \(F_x(0,0)=1\) while \(F_y(0,0)=0\). The obstruction theorem shows that no differentiable function \(g\) on an interval about \(0\) can satisfy \(x-g(x)^2=0\) throughout that interval with \(g(0)=0\).

Indeed, the relation requires \(g(x)^2=x\). For negative \(x\), no real number has square \(x\), so a real-valued branch cannot even be defined on a two-sided interval about zero. The theorem detects the failure directly from the partial derivatives, without needing to solve for \(g\).

What Implicit Differentiation Establishes

For a polynomial relation, the reliable procedure is to identify the relation \(F(x,y)=0\), compute \(F_x\) and \(F_y\), and evaluate both at the point of interest. If \(F_y\ne0\), the slope of any differentiable branch through that point is fixed by

$$ g'(a)=-\frac{F_x(a,g(a))}{F_y(a,g(a))}. $$

A common error is to differentiate \(F(x,y)=0\) while treating \(y\) as constant throughout. That would omit the change in \(y\) as \(x\) changes. The factor \(g'(x)\) appears because \(y\) stands for the function \(g(x)\); for instance, differentiating \(y^2\) along a branch gives \(2y\,g'(x)\), not merely \(2y\).

Another important distinction is between computing a derivative and proving that a branch exists. The theorem assumes a differentiable branch and then determines its slope. When \(F_y\ne0\), the formula is meaningful, but the theorem proved here does not itself establish local existence of such a branch. When \(F_y=0\), the identity may still be informative: if \(F_x\ne0\), it rules out a differentiable graph branch; if both partial derivatives vanish, it gives no slope by itself.

Check Your Understanding

Use the definitions and results in this tutorial to answer the following.

  1. For \(F(x,y)=x^2y+y^3\), calculate \(F_x(x,y)\) and \(F_y(x,y)\).
  2. If \(F(x,y)=0\) along a differentiable branch \(y=g(x)\), what identity relates \(F_x\), \(F_y\), and \(g'(x)\)?
  3. For the relation \(x^2+4y^2=20\), find the slope of a differentiable branch through \((2,2)\).
  4. Why does \(F_y(a,g(a))\ne0\) matter when using the quotient formula for \(g'(a)\)?
  5. If \(F_x(a,g(a))\ne0\) but \(F_y(a,g(a))=0\), what can be concluded about a differentiable branch through that point?