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.
The Setup and the Chain Rule
Write the constraints as
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:
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
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.
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:
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
and find all four partial derivatives at \((x,y,u,v)=(1,2,2,1)\). First check that the point satisfies the constraints:
Differentiate both equations with respect to \(x\), holding \(y\) fixed:
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:
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
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\):
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
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
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
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
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
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,
an incorrect differentiation that treats \(u\) and \(v\) as constants would claim \(0=1\). The correct chain rule calculation is
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
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
Substitute the given values into both original constraints before differentiating.
Differentiate both constraints with respect to \(x\) or both with respect to \(y\), holding the other independent variable fixed.
For each constraint, include the partial derivative terms involving both dependent variables.
Substitute the point into the differentiated equations, then solve for the two requested derivative values.
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.
- 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\)?
- Why must both constraints be differentiated to find \(\frac{\partial u}{\partial x}\) and \(\frac{\partial v}{\partial x}\)?
- For \(u+v=x+y\) and \(u-v=x-y\), write the two equations obtained by differentiating with respect to \(x\).
- What does it mean if the two differentiated equations do not determine a unique pair of partial derivatives?
- After solving for two partial derivatives, what should you substitute them into to check your calculation?