Tutorials › Calculus III › Linearity of Partial Differentiation

Computing Partial Derivatives · Tutorial 304 of 999

Linearity of Partial Differentiation

Derive and apply the sum and constant-multiple rules for partial derivatives, including when a term depends only on the other coordinate.

Beginner 9 min read

What You'll Learn

  • Derive the sum rule for partial derivatives from the difference quotient.
  • Explain why fixed scalar multiples pass through partial differentiation.
  • Identify when a term is constant with respect to the chosen variable.
  • Compute partial derivatives of finite sums term by term.
  • Check results using the partial-derivative definition and catch common errors.

Why Linearity Matters

A multivariable expression can contain several terms, each responding differently when one coordinate changes. Partial differentiation makes that coordinate choice explicit: when differentiating with respect to \(x\), the other coordinates are held fixed. Linearity then lets us handle a sum one term at a time and carry fixed coefficients through the calculation.

This tutorial develops the sum and constant-multiple rules from the difference quotient. It also explains why a term that does not depend on the differentiation variable contributes zero. The rules apply where the relevant partial derivatives exist; they do not require the function to be differentiable in every possible sense.

Partial Derivatives and Fixed Coordinates

For a function \(f(x,y)\), the partial derivative with respect to \(x\) at \((a,b)\) is the limit of the difference quotient in which \(y=b\) stays fixed:

$$ f_x(a,b) = \lim_{h\to 0} \frac{f(a+h,b)-f(a,b)}{h}, $$

provided this limit exists. The partial derivative with respect to \(y\) is defined by changing \(y\) while holding \(x\) fixed:

$$ f_y(a,b) = \lim_{k\to 0} \frac{f(a,b+k)-f(a,b)}{k}. $$

In the calculations below, a term can depend on a coordinate that is being held fixed. For example, when taking \(f_x\), a term involving only \(y\) has the same value at \((a+h,b)\) and \((a,b)\). Its difference in the numerator is therefore zero.

Definition: A term is independent of \(x\) if changing \(x\) while holding the other coordinates fixed does not change that term. Its partial derivative with respect to \(x\) is zero wherever the partial derivative is defined. The corresponding statement holds for any chosen coordinate.

The Linearity Rules

Suppose \(f\) and \(g\) have partial derivatives with respect to \(x\) at a point, and let \(c\) be a fixed real number. The sum rule and constant-multiple rule state that

$$ \frac{\partial}{\partial x}(f+g) = \frac{\partial f}{\partial x} + \frac{\partial g}{\partial x}, \qquad \frac{\partial}{\partial x}(cf) = c\frac{\partial f}{\partial x}. $$

These equalities are understood at points where the partial derivatives on the right exist. The same rules apply to differentiation with respect to \(y\), or another coordinate. Repeated application gives the rule for any finite sum with fixed coefficients.

Theorem: If each \(f_i\), for \(i=1,\dots,n\), has a partial derivative with respect to \(x\) at a point, and \(c_1,\dots,c_n\) are fixed real numbers, then the partial derivative of their linear combination exists there and is $$ \frac{\partial}{\partial x}\left(\sum_{i=1}^{n} c_i f_i\right) = \sum_{i=1}^{n} c_i\frac{\partial f_i}{\partial x}. $$

Why the Rules Work

The sum rule follows because the difference quotient of a sum is the sum of the two difference quotients. If both individual limits exist, the limit of that sum is the sum of the limits. For a fixed multiple, the constant can be factored out of the quotient and then out of the limit.

1
Write the difference quotient.
Use the definition, changing \(x\) and holding the other coordinates fixed.
2
Separate the terms.
For a sum, split the numerator into the changes in its individual terms. For a fixed multiple, factor out the coefficient.
3
Take the limits.
Use the existence of the individual partial derivatives to take each limit.

Here is the complete argument for two functions. Let the point be \((a,b)\), and suppose both \(f_x(a,b)\) and \(g_x(a,b)\) exist. Then

$$ \begin{aligned} \frac{(f+g)(a+h,b)-(f+g)(a,b)}{h} &= \frac{f(a+h,b)-f(a,b)}{h} + \frac{g(a+h,b)-g(a,b)}{h}. \end{aligned} $$

As \(h\to 0\), the first quotient tends to \(f_x(a,b)\), and the second tends to \(g_x(a,b)\). The limit of a sum of two convergent quantities is the sum of their limits. Therefore \((f+g)_x(a,b)=f_x(a,b)+g_x(a,b)\). For a fixed real number \(c\), the corresponding quotient is

$$ \frac{(cf)(a+h,b)-(cf)(a,b)}{h} = c\frac{f(a+h,b)-f(a,b)}{h}. $$

Since \(c\) does not depend on \(h\), taking the limit gives \((cf)_x(a,b)=c f_x(a,b)\). These arguments work for any coordinate and extend to finite sums by applying the two-function rule repeatedly.

The zero contribution from an independent term follows from the same definition. If \(q\) depends only on \(y\), then \(q(a+h,b)=q(b)=q(a,b)\). Thus, for every nonzero \(h\),

$$ \frac{q(a+h,b)-q(a,b)}{h} = \frac{0}{h} = 0. $$

The limit is zero, so \(q_x(a,b)=0\). This is not a special exception to the definition: it is a direct consequence of the fact that the term does not change when \(x\) changes.

Worked Examples

Worked Example: Differentiate a Polynomial Sum with Respect to \(x\)

Find both first partial derivatives of \(f(x,y)=3x^3-2x^2y+5y^4-7x+9\).

For \(f_x\), treat \(y\) as fixed and differentiate each term with respect to \(x\). The term \(5y^4\) and the constant \(9\) are independent of \(x\):

$$ \begin{aligned} f_x(x,y) &=3(3x^2)-2(2xy)+0-7+0\\ &=9x^2-4xy-7. \end{aligned} $$

Check this result directly from the definition. For an increment \(h\), expand the change in the function:

$$ \begin{aligned} f(x+h,y)-f(x,y) &=3\big((x+h)^3-x^3\big)-2y\big((x+h)^2-x^2\big)-7h\\ &=3(3x^2h+3xh^2+h^3)-2y(2xh+h^2)-7h\\ &=h(9x^2-4xy-7)+h^2(9x-2y)+3h^3. \end{aligned} $$

For \(h\ne 0\), divide by \(h\) and let \(h\to0\):

$$ \lim_{h\to0}\frac{f(x+h,y)-f(x,y)}{h} = \lim_{h\to0}\big(9x^2-4xy-7+h(9x-2y)+3h^2\big) = 9x^2-4xy-7. $$

For \(f_y\), hold \(x\) fixed. The terms \(3x^3\) and \(-7x\) do not change with \(y\):

$$ \begin{aligned} f_y(x,y) &=0-2x^2+20y^3+0+0\\ &=-2x^2+20y^3. \end{aligned} $$

To check, the difference for an increment \(k\) is \(f(x,y+k)-f(x,y)=-2x^2k+20y^3k+30y^2k^2+20yk^3+5k^4\). After division by \(k\), the terms containing positive powers of \(k\) tend to zero, leaving \(-2x^2+20y^3\), as claimed.

Worked Example: Use Coefficients and an Independent Term

Find \(g_y\) for \(g(x,y)=4(2xy^2-3x+y^3)-5(x^2+2y^2)+6y\).

First apply the coefficients to the terms, keeping the sum visible:

$$ g(x,y)=8xy^2-12x+4y^3-5x^2-10y^2+6y. $$

Now differentiate each term with respect to \(y\). The terms \(-12x\) and \(-5x^2\) are independent of \(y\), so each contributes zero:

$$ \begin{aligned} g_y(x,y) &=16xy+0+12y^2+0-20y+6\\ &=16xy+12y^2-20y+6. \end{aligned} $$

For a check, replace \(y\) by \(y+k\) and subtract the original expression. The change is \(16xyk+8xk^2+12y^2k+12yk^2+4k^3-20yk-10k^2+6k\). Dividing by \(k\) gives \(16xy+8xk+12y^2+12yk+4k^2-20y-10k+6\). As \(k\to0\), this tends to \(16xy+12y^2-20y+6\), confirming the result.

Worked Example: Find and Evaluate Both Partial Derivatives

Let \(h(x,y)=2x^2y+4xy^2-3x^2+6y-8\). Find \(h_x\) and \(h_y\), then evaluate them at \((1,-1)\).

For \(h_x\), treat \(y\) as fixed. The terms \(6y\) and \(-8\) are independent of \(x\):

$$ h_x(x,y)=4xy+4y^2-6x. $$

For \(h_y\), treat \(x\) as fixed. The term \(-3x^2\) is independent of \(y\), as is the constant:

$$ h_y(x,y)=2x^2+8xy+6. $$

Substitute \(x=1\) and \(y=-1\) into each expression:

$$ \begin{aligned} h_x(1,-1)&=4(1)(-1)+4(-1)^2-6(1)=-4+4-6=-6,\\ h_y(1,-1)&=2(1)^2+8(1)(-1)+6=2-8+6=0. \end{aligned} $$

Check the formulas from the difference quotients. An \(x\)-increment \(t\) gives \(h(x+t,y)-h(x,y)=t(4xy+4y^2-6x)+t^2(2y-3)\). Dividing by \(t\) and taking \(t\to0\) gives \(4xy+4y^2-6x\). A \(y\)-increment \(s\) gives \(h(x,y+s)-h(x,y)=s(2x^2+8xy+6)+4xs^2\). Dividing by \(s\) and taking \(s\to0\) gives \(2x^2+8xy+6\). Both computed partial derivatives, and hence their values at \((1,-1)\), are verified.

A Common Mistake: Forgetting Which Variable Is Fixed

A frequent error is to differentiate a term that depends on the other coordinate as though that coordinate were changing too. For example, when finding the partial derivative with respect to \(x\) of \(x^2+y^2\), an incorrect calculation is

$$ \frac{\partial}{\partial x}(x^2+y^2)=2x+2y. $$

The \(2y\) term is wrong. In the \(x\)-difference quotient, \(y\) is fixed, so the \(y^2\) term has zero change. Correctly,

$$ \frac{\partial}{\partial x}(x^2+y^2)=2x+0=2x. $$

Likewise, \(\partial(x^2+y^2)/\partial y=0+2y=2y\). Before differentiating each term, identify the variable of differentiation and hold every other coordinate fixed. The coefficient rule also requires a fixed coefficient: a quantity that varies with the differentiation variable is not a constant multiple for this purpose.

Why Linearity Is Useful

Linearity turns a long expression into manageable pieces. It explains why polynomial partial derivatives can be computed term by term, why numerical coefficients remain as factors, and why coordinate-independent terms disappear. It also gives a reliable way to organize calculations: write each term's contribution, include zero for terms independent of the chosen variable, and then combine the results.

The rules concern sums and fixed scalar multiples. They do not say that every operation can be distributed through a partial derivative. In particular, a product of variable-dependent expressions requires a separate rule. Keeping the scope of linearity clear prevents a correct term-by-term method from being applied where its conditions do not hold.

Check Your Understanding

For each question, specify which coordinate is held fixed before applying a rule.

  1. Find \(f_x\) and \(f_y\) for \(f(x,y)=2x^3+5xy-4y^2+7\).
  2. Why does a term depending only on \(y\) have zero partial derivative with respect to \(x\)? Give the difference-quotient reason.
  3. If \(f_x(a,b)\) exists, what is the partial derivative with respect to \(x\) of \(6f\) at \((a,b)\)? State the condition on the coefficient.
  4. Find \(\partial(3x^2y+2y^3-5x)/\partial y\).
  5. Identify the error in the claim \(\partial(x^2+4y)/\partial x=2x+4\), and give the corrected derivative.