Tutorials › Calculus III › Implicit Differentiation for Systems of Equations

Chain Rule and Implicit Differentiation · Tutorial 364 of 999

Implicit Differentiation for Systems of Equations

Differentiate both constraints with respect to each independent variable, solve for the dependent variables’ partial derivatives, and check when the calculation is valid.

Intermediate 10 min read

What You'll Learn

  • Identify which variables depend on the independent variables in a system of equations.
  • Apply the multivariable chain rule to both constraints.
  • Solve the resulting equations for partial derivatives with respect to x and y.
  • Check derivative values by substituting them into both differentiated constraints.
  • Recognize why a singular coefficient system may prevent unique derivative values.

When Two Constraints Define Two Dependent Variables

A single equation can implicitly define one variable in terms of other variables. A system of equations can instead constrain two dependent variables at once. For example, two equations involving \(x\), \(y\), \(u\), and \(v\) may define \(u\) and \(v\) locally as functions of \(x\) and \(y\).

Even when those functions are not written explicitly, their partial derivatives can often be found. The method is to differentiate both equations with respect to one independent variable at a time. Each differentiation produces an equation involving the partial derivatives of both \(u\) and \(v\). Solve the resulting pair of equations to find the derivatives requested.

Key idea: If \(u=u(x,y)\) and \(v=v(x,y)\), then differentiating a constraint involving \(x,y,u,v\) requires the chain rule terms for both dependent variables. For each independent variable, the two differentiated constraints usually form two equations for the two unknown partial derivatives.

The Setup and the Chain Rule

Write the constraints as

$$ F(x,y,u,v)=0, \qquad G(x,y,u,v)=0, $$

where \(u\) and \(v\) are differentiable functions of \(x\) and \(y\) on the local branch being considered. The notation \(F_x\), for example, means the partial derivative of \(F\) with respect to \(x\), holding its other arguments \(y,u,v\) fixed. By contrast, \(\frac{\partial u}{\partial x}\) describes how the dependent variable \(u(x,y)\) changes as \(x\) changes while \(y\) is held fixed.

For differentiation with respect to \(x\), apply the chain rule to each constraint. The total change in \(F\) must remain zero along the functions satisfying the constraint:

$$ F_x+F_u\frac{\partial u}{\partial x} +F_v\frac{\partial v}{\partial x}=0, \qquad G_x+G_u\frac{\partial u}{\partial x} +G_v\frac{\partial v}{\partial x}=0. $$

The partial derivatives of \(F\) and \(G\) in these expressions are evaluated at \((x,y,u(x,y),v(x,y))\). For differentiation with respect to \(y\), the corresponding equations are

$$ F_y+F_u\frac{\partial u}{\partial y} +F_v\frac{\partial v}{\partial y}=0, \qquad G_y+G_u\frac{\partial u}{\partial y} +G_v\frac{\partial v}{\partial y}=0. $$

Each pair has two equations and two derivative quantities to determine: either \(\frac{\partial u}{\partial x}\) and \(\frac{\partial v}{\partial x}\), or \(\frac{\partial u}{\partial y}\) and \(\frac{\partial v}{\partial y}\). These are ordinary linear equations in the unknown derivatives, even when the original constraints are nonlinear.

Condition for solving: The differentiated equations determine a unique pair of derivative values when their coefficients for the two unknown derivatives form a nonsingular system at the point. This calculation presumes a differentiable local branch satisfying the original constraints; a nonsingular system lets us solve uniquely for its derivative values there.

Why Differentiating the Constraints Works

The reason is that each constraint remains true as \(x\) or \(y\) varies along the local functions \(u(x,y)\) and \(v(x,y)\). In particular, \(F(x,y,u(x,y),v(x,y))\) is identically zero. Its partial derivative with respect to \(x\), by the multivariable chain rule, is therefore zero:

$$ \frac{\partial}{\partial x}F(x,y,u(x,y),v(x,y)) = F_x+F_u\frac{\partial u}{\partial x} +F_v\frac{\partial v}{\partial x} =0. $$

The same reasoning applies to \(G\) and to differentiation with respect to \(y\). Thus the equations are not extra assumptions: they follow because the constraints hold throughout the local branch. Solving them finds derivative values consistent with both constraints at once.

Worked Example: Differentiate a Linear System of Constraints

Worked Example: Differentiate a Linear System of Constraints

Suppose

$$ u+v=x^2+y, \qquad u-v=xy-1, $$

and find all four partial derivatives at \((x,y,u,v)=(1,2,2,1)\). First check that the point satisfies the constraints:

$$ u+v=2+1=3=1^2+2, \qquad u-v=2-1=1=(1)(2)-1. $$

Differentiate both equations with respect to \(x\), holding \(y\) fixed:

$$ \frac{\partial u}{\partial x}+\frac{\partial v}{\partial x}=2x, \qquad \frac{\partial u}{\partial x}-\frac{\partial v}{\partial x}=y. $$

At the specified point, \(2x=2\) and \(y=2\). Adding the equations gives \(2\frac{\partial u}{\partial x}=4\), so \(\frac{\partial u}{\partial x}=2\). Substituting into the first equation gives \(\frac{\partial v}{\partial x}=0\).

Now differentiate with respect to \(y\), holding \(x\) fixed:

$$ \frac{\partial u}{\partial y}+\frac{\partial v}{\partial y}=1, \qquad \frac{\partial u}{\partial y}-\frac{\partial v}{\partial y}=x. $$

At the point, \(x=1\). Adding gives \(2\frac{\partial u}{\partial y}=2\), hence \(\frac{\partial u}{\partial y}=1\). The first equation then gives \(\frac{\partial v}{\partial y}=0\).

Check each result in the differentiated equations. For \(x\), the left sides are \(2+0=2=2x\) and \(2-0=2=y\). For \(y\), they are \(1+0=1\) and \(1-0=1=x\). All four values satisfy both differentiated constraints.

Worked Example: Solve Nonlinear Constraints at a Point

Worked Example: Solve Nonlinear Constraints at a Point

Consider

$$ u^2+v=x+y-1, \qquad u+v^2=xy. $$

At \((x,y,u,v)=(1,2,1,1)\), the first equation gives \(1^2+1=1+2-1=2\), and the second gives \(1+1^2=(1)(2)=2\). Find the four partial derivatives at this point.

Differentiating the first constraint with respect to \(x\) gives \(2u\frac{\partial u}{\partial x}+\frac{\partial v}{\partial x}=1\). Differentiating the second gives \(\frac{\partial u}{\partial x}+2v\frac{\partial v}{\partial x}=y\). Substitute \(u=v=1\) and \(y=2\):

$$ 2\frac{\partial u}{\partial x}+\frac{\partial v}{\partial x}=1, \qquad \frac{\partial u}{\partial x}+2\frac{\partial v}{\partial x}=2. $$

Twice the second equation is \(2\frac{\partial u}{\partial x}+4\frac{\partial v}{\partial x}=4\). Subtract the first equation to obtain \(3\frac{\partial v}{\partial x}=3\), so \(\frac{\partial v}{\partial x}=1\). The first equation then gives \(2\frac{\partial u}{\partial x}+1=1\), hence \(\frac{\partial u}{\partial x}=0\).

For \(y\), the first constraint differentiates to \(2u\frac{\partial u}{\partial y}+\frac{\partial v}{\partial y}=1\). The second differentiates to \(\frac{\partial u}{\partial y}+2v\frac{\partial v}{\partial y}=x\). At the point, \(u=v=x=1\), so

$$ 2\frac{\partial u}{\partial y}+\frac{\partial v}{\partial y}=1, \qquad \frac{\partial u}{\partial y}+2\frac{\partial v}{\partial y}=1. $$

Subtracting the second equation from the first gives \(\frac{\partial u}{\partial y}-\frac{\partial v}{\partial y}=0\). Thus the two derivatives are equal. Substitution into the first equation gives three times either derivative equal to \(1\), so

$$ \frac{\partial u}{\partial y}=\frac{1}{3}, \qquad \frac{\partial v}{\partial y}=\frac{1}{3}. $$

Check the \(x\)-derivative equations: \(2(0)+1=1\), and \(0+2(1)=2=y\). Check the \(y\)-derivative equations: \(2(\frac{1}{3})+\frac{1}{3}=1\), and \(\frac{1}{3}+2(\frac{1}{3})=1=x\). Each pair satisfies both differentiated constraints.

Worked Example: Differentiate and Check Both Variables

Worked Example: Differentiate and Check Both Variables

Let

$$ u^2+v^2=x^2+y^2, \qquad u-v=x-y. $$

Find the partial derivatives at \((x,y,u,v)=(1,0,1,0)\). The point satisfies the first constraint because \(1^2+0^2=1^2+0^2\), and the second because \(1-0=1-0\).

Differentiating with respect to \(x\) gives

$$ 2u\frac{\partial u}{\partial x} +2v\frac{\partial v}{\partial x}=2x, \qquad \frac{\partial u}{\partial x}-\frac{\partial v}{\partial x}=1. $$

At the point, these become \(2\frac{\partial u}{\partial x}=2\) and \(\frac{\partial u}{\partial x}-\frac{\partial v}{\partial x}=1\). Therefore \(\frac{\partial u}{\partial x}=1\), and then \(1-\frac{\partial v}{\partial x}=1\), so \(\frac{\partial v}{\partial x}=0\).

Differentiating with respect to \(y\) gives

$$ 2u\frac{\partial u}{\partial y} +2v\frac{\partial v}{\partial y}=2y, \qquad \frac{\partial u}{\partial y}-\frac{\partial v}{\partial y}=-1. $$

At the point, these become \(2\frac{\partial u}{\partial y}=0\) and \(\frac{\partial u}{\partial y}-\frac{\partial v}{\partial y}=-1\). Thus \(\frac{\partial u}{\partial y}=0\), and the second equation gives \(\frac{\partial v}{\partial y}=1\).

Check the \(x\) results: \(2(1)+2(0)(0)=2=2x\), and \(1-0=1\). Check the \(y\) results: \(2(1)(0)+2(0)(1)=0=2y\), and \(0-1=-1\). Both pairs satisfy the equations obtained from the constraints.

A Common Mistake: Treating Dependent Variables as Constants

When differentiating with respect to \(x\), it is correct to hold the independent variable \(y\) fixed. It is not correct to hold \(u\) and \(v\) fixed: they are functions of \(x\) and \(y\). For example, in the first constraint of the nonlinear example,

$$ u^2+v=x+y-1, $$

an incorrect differentiation that treats \(u\) and \(v\) as constants would claim \(0=1\). The correct chain rule calculation is

$$ 2u\frac{\partial u}{\partial x} +\frac{\partial v}{\partial x}=1. $$

Both derivative terms are necessary because both \(u\) and \(v\) can change as \(x\) changes. A related error is to differentiate only one constraint. That leaves just one equation for the two unknown partial derivatives; the second constraint generally supplies the additional equation needed to solve for both.

When the Derivative Equations Do Not Give a Unique Answer

A pair of differentiated constraints does not always determine a unique pair of partial derivatives. For example, consider

$$ u+v=x, \qquad 2u+2v=2x. $$

The second constraint is just twice the first. Differentiating both with respect to \(x\) gives \(\frac{\partial u}{\partial x}+\frac{\partial v}{\partial x}=1\) and \(2\frac{\partial u}{\partial x}+2\frac{\partial v}{\partial x}=2\). The second equation repeats the information in the first, so it does not determine the two partial derivatives separately. This is a reason to check that the derivative equations can be solved uniquely rather than assuming that two written constraints automatically provide two independent equations.

A Reliable Calculation Sequence

1
Check the point.
Substitute the given values into both original constraints before differentiating.
2
Choose the independent variable.
Differentiate both constraints with respect to \(x\) or both with respect to \(y\), holding the other independent variable fixed.
3
Include both chain rule terms.
For each constraint, include the partial derivative terms involving both dependent variables.
4
Evaluate and solve.
Substitute the point into the differentiated equations, then solve for the two requested derivative values.
5
Check the result.
Substitute the derivative values into each differentiated constraint and verify both equations.

Why the Method Matters

Many systems of constraints are easier to differentiate than to solve explicitly. Implicit differentiation lets us find local rates of change without first expressing \(u\) and \(v\) as formulas in \(x\) and \(y\). The two constraints must work together: each derivative pair must preserve both equations as the independent variable changes.

The essential habits are to track every dependency, differentiate each constraint, and check that the resulting equations determine the requested derivatives. If a pair of equations is singular or redundant, the calculation may fail to give unique derivative values, even though the original constraints can still be written down.

Check Your Understanding

For each question, keep track of which variables are held fixed and which quantities are being solved for.

  1. If \(u\) and \(v\) depend on \(x\) and \(y\), what derivative terms appear when differentiating \(F(x,y,u,v)=0\) with respect to \(x\)?
  2. Why must both constraints be differentiated to find \(\frac{\partial u}{\partial x}\) and \(\frac{\partial v}{\partial x}\)?
  3. For \(u+v=x+y\) and \(u-v=x-y\), write the two equations obtained by differentiating with respect to \(x\).
  4. What does it mean if the two differentiated equations do not determine a unique pair of partial derivatives?
  5. After solving for two partial derivatives, what should you substitute them into to check your calculation?