Introduction
A multivariable function can be built by adding terms that depend on different coordinates. For instance, one term might depend only on \(x\), another only on \(y\), and a third only on \(z\). Other sums combine coordinates in products such as \(xy\) or \(yz\).
To find a first partial derivative, vary one coordinate and hold the others fixed. A summand that does not depend on the coordinate being varied contributes zero; a summand that does depend on it is differentiated with the other coordinates treated as constants. This makes many sums straightforward to differentiate, provided the relevant derivatives of the summands exist.
The Term-by-Term Rule
In particular, if a summand is independent of \(x_i\), its partial derivative with respect to \(x_i\) is zero. If a summand depends on \(x_i\), apply the relevant one-variable differentiation rules, treating its other coordinates as constants. The earlier material on zero partial derivatives and linearity gives these component rules; here we apply them to organized sums.
For a sum of separate one-coordinate functions, $$ f(x,y,z)=g(x)+h(y)+k(z), $$ the partial derivatives, whenever the indicated one-variable derivatives exist, are $$ \frac{\partial f}{\partial x}=g'(x),\qquad \frac{\partial f}{\partial y}=h'(y),\qquad \frac{\partial f}{\partial z}=k'(z). $$ For example, changing \(x\) changes \(g(x)\), but it leaves \(h(y)\) and \(k(z)\) unchanged.
The same principle applies when the summands involve products of coordinates. In \(xy+xz+yz\), for example, changing \(x\) changes \(xy\) and \(xz\), while \(yz\) remains fixed. The factors \(y\) and \(z\) are constants during that partial differentiation.
Why the Rule Works
The reason term-by-term differentiation works is already visible in the difference quotient: when one coordinate changes, the change in a finite sum is the sum of the changes in its terms. If the quotient for each relevant term has a limit, the finite sum of those quotients has the sum of their limits.
For a partial derivative with respect to \(x_i\), replace \(x_i\) by \(x_i+t\), leaving every other coordinate fixed.
Write the quotient for the total function as the sum of the quotients for its finitely many summands.
If each relevant summand quotient has a limit as \(t\) approaches zero, the limit of their finite sum is the sum of those limits. A summand independent of \(x_i\) has quotient zero.
More explicitly, at a point \(\mathbf{a}\), suppose \(f=\sum_{j=1}^{m}u_j\), and write \(\mathbf{a}+t\mathbf{e}_i\) for the point obtained by changing only coordinate \(x_i\) by \(t\). Then $$ \frac{f(\mathbf{a}+t\mathbf{e}_i)-f(\mathbf{a})}{t} = \sum_{j=1}^{m} \frac{u_j(\mathbf{a}+t\mathbf{e}_i)-u_j(\mathbf{a})}{t}. $$ If each quotient on the right has a limit as \(t\) approaches zero, then the limit of the left side is the sum of those limits. This proves the term-by-term rule under its stated condition. The argument uses that the sum has finitely many terms.
Worked Examples
Worked Example: Separate Functions of Three Coordinates
Find all first partial derivatives of $$ f(x,y,z)=x^3-2x+\sin y+e^z. $$
For the \(x\)-partial, hold \(y\) and \(z\) fixed. The terms \(\sin y\) and \(e^z\) are constant with respect to \(x\), so $$ \frac{\partial f}{\partial x} = \frac{\partial}{\partial x}(x^3) -\frac{\partial}{\partial x}(2x) +\frac{\partial}{\partial x}(\sin y) +\frac{\partial}{\partial x}(e^z) = 3x^2-2+0+0 = 3x^2-2. $$
For the \(y\)-partial, \(x^3-2x\) and \(e^z\) are constant with respect to \(y\): $$ \frac{\partial f}{\partial y} = 0+0+\cos y+0 = \cos y. $$
For the \(z\)-partial, the first three terms are constant with respect to \(z\): $$ \frac{\partial f}{\partial z} = 0+0+0+e^z = e^z. $$
As a check, the \(x\)-difference quotient is $$ \frac{f(x+t,y,z)-f(x,y,z)}{t} = \frac{(x+t)^3-x^3-2t}{t} = 3x^2+3xt+t^2-2. $$ Its limit as \(t\) approaches zero is \(3x^2-2\), as calculated. The \(y\)- and \(z\)-quotients reduce to the one-variable difference quotients for \(\sin y\) and \(e^z\), respectively; their limits are \(\cos y\) and \(e^z\).
Worked Example: A Sum of Coordinate Products
Find the first partial derivatives of $$ F(x,y,z)=xy+2xz-3yz+4x. $$
For \(x\), hold \(y,z\) fixed. Thus \(xy\) differentiates to \(y\), \(2xz\) to \(2z\), \(-3yz\) is independent of \(x\), and \(4x\) differentiates to \(4\): $$ \frac{\partial F}{\partial x} = y+2z+0+4 = y+2z+4. $$
For \(y\), hold \(x,z\) fixed. The terms \(xy\) and \(-3yz\) depend on \(y\), while \(2xz\) and \(4x\) do not: $$ \frac{\partial F}{\partial y} = x+0-3z+0 = x-3z. $$
For \(z\), hold \(x,y\) fixed. The terms \(2xz\) and \(-3yz\) depend on \(z\): $$ \frac{\partial F}{\partial z} = 0+2x-3y+0 = 2x-3y. $$
Check the first result directly with the difference quotient: $$ \frac{F(x+t,y,z)-F(x,y,z)}{t} = \frac{(x+t)y+2(x+t)z-3yz+4(x+t)-(xy+2xz-3yz+4x)}{t}. $$ Expanding the numerator gives \(ty+2tz+4t\), so the quotient is \(y+2z+4\). It agrees with \(\frac{\partial F}{\partial x}\). The other two results also follow by expanding their corresponding increments: changing \(y\) by \(t\) changes \(F\) by \(t(x-3z)\), and changing \(z\) by \(t\) changes \(F\) by \(t(2x-3y)\).
Worked Example: Products with Powers and a Shared Coordinate
Find the first partial derivatives of $$ G(x,y,z)=x^2y+3yz^2+2xz. $$
For \(x\), hold \(y,z\) fixed. Only the first and third terms depend on \(x\): $$ \frac{\partial G}{\partial x} = 2xy+0+2z = 2xy+2z. $$
For \(y\), hold \(x,z\) fixed. The first two terms depend on \(y\), and the last term does not: $$ \frac{\partial G}{\partial y} = x^2+3z^2+0 = x^2+3z^2. $$
For \(z\), hold \(x,y\) fixed. The second term uses the power rule, and the third term is linear in \(z\): $$ \frac{\partial G}{\partial z} = 0+3y(2z)+2x = 6yz+2x. $$
Check the \(z\)-partial by changing \(z\) to \(z+t\): $$ \frac{G(x,y,z+t)-G(x,y,z)}{t} = \frac{3y\big((z+t)^2-z^2\big)+2xt}{t}. $$ Since \((z+t)^2-z^2=2zt+t^2\), this becomes $$ \frac{6yzt+3yt^2+2xt}{t} = 6yz+3yt+2x. $$ As \(t\) approaches zero, the quotient tends to \(6yz+2x\), confirming the result.
Conditions and a Cancellation Pitfall
The term-by-term rule has a specific hypothesis: each summand to which the rule is applied must have the relevant partial derivative. When that condition holds, the derivative of the sum is the sum of the derivatives. It is not correct to reverse this statement and conclude that a partial derivative of the total sum can exist only if every summand has that partial derivative.
For a concrete example, let $$ q(x,y)=|x|-|x|+y. $$ At \(x=0\), the two summands \(|x|\) and \(-|x|\), considered separately, do not have \(x\)-derivatives. Therefore, the term-by-term rule cannot be applied to those two terms at that point. But they cancel exactly, so \(q(x,y)=y\). Consequently, $$ \frac{\partial q}{\partial x}(0,y) = \lim_{t\to 0}\frac{q(t,y)-q(0,y)}{t} = \lim_{t\to 0}\frac{y-y}{t} = 0. $$ The total function has an \(x\)-partial even though its written summands do not individually have \(x\)-partials there.
For routine computations, a useful order is to identify which terms depend on the chosen coordinate, differentiate only those terms, and leave the others as zero. If a relevant summand derivative fails to exist, do not use the term-by-term rule at that point; check whether simplifying or combining the total expression reveals cancellation.
Why This Organization Is Useful
Separable sums make the role of each coordinate visible. In \(g(x)+h(y)+k(z)\), each coordinate affects just one term. In a sum of coordinate products, a coordinate affects precisely the products in which it appears. This lets you organize a calculation before applying any derivative rules and helps detect terms that should contribute zero.
It also provides a reliable check on a result: if a term is independent of the variable being differentiated, it must not appear in that partial derivative. Conversely, every variable-dependent term must be accounted for, with its other coordinates held fixed. These checks do not replace the differentiability condition, but they help prevent omissions and misplaced factors.
Check Your Understanding
For each question, identify which summands depend on the indicated coordinate before differentiating.
- Find \(\frac{\partial}{\partial x}\bigl(g(x)+h(y)+k(z)\bigr)\), assuming \(g\) is differentiable.
- For \(f(x,y,z)=xy+xz+yz\), which terms contribute to \(\frac{\partial f}{\partial y}\), and what is that partial derivative?
- Find all first partial derivatives of \(r(x,y)=x^2y+5y\).
- What condition on the summands justifies differentiating a finite sum term by term with respect to one coordinate?
- Why is term-by-term differentiation not a valid argument for \(\frac{\partial}{\partial x}(|x|-|x|)\) at \(x=0\), and what is the derivative of the total function there?