Tutorials › Calculus III › Deriving the Partial Product Rule

Computing Partial Derivatives · Tutorial 305 of 999

Deriving the Partial Product Rule

Learn why the partial product rule follows from the difference quotient and how to use it reliably for products of multivariable functions.

Beginner 10 min read

What You'll Learn

  • Interpret a partial derivative as a difference quotient along one coordinate direction
  • Derive the partial product rule by adding and subtracting an intermediate product
  • State the conditions that guarantee the rule applies at a point
  • Differentiate products with respect to different variables while holding the others fixed
  • Check product-rule calculations by expanding the product
  • Recognize and correct common errors when differentiating a product

Why a Product Rule Is Needed

A partial derivative measures how a function changes when one input changes and the other inputs are held fixed. When the function is a product, both factors can change as that input changes. The rate of change of the product must account for both changes.

The rule resembles the ordinary product rule, but it is useful to see precisely why it follows from the definition of a partial derivative. That derivation also makes clear what assumptions are needed and why simply multiplying the derivatives of the factors does not work.

Partial Derivatives Along One Coordinate

Let \(f\) be a function of \(n\) variables, and let \(\mathbf{a}=(a_1,\ldots,a_n)\) be an interior point of its domain. Write \(\mathbf{e}_i\) for the coordinate vector whose \(i\)-th entry is \(1\) and whose other entries are \(0\). The partial derivative with respect to the \(i\)-th variable is defined by the limit, when it exists,

$$ \frac{\partial f}{\partial x_i}(\mathbf{a}) = \lim_{h\to 0} \frac{f(\mathbf{a}+h\mathbf{e}_i)-f(\mathbf{a})}{h}. $$

In this quotient, only the \(i\)-th coordinate changes: it is replaced by \(a_i+h\). All other coordinates remain fixed. For example, for a function \(f(x,y)\), the \(x\)-partial derivative uses \(f(x+h,y)\), whereas the \(y\)-partial derivative uses \(f(x,y+h)\).

Key observation: If the partial derivative of \(f\) with respect to \(x_i\) exists at \(\mathbf{a}\), then \(f(\mathbf{a}+h\mathbf{e}_i)\) tends to \(f(\mathbf{a})\) as \(h\) tends to \(0\). Indeed, the difference is \(h\) times a quotient that has a finite limit.

The Partial Product Rule

Suppose \(f\) and \(g\) are defined near an interior point \(\mathbf{a}\), and both have partial derivatives with respect to \(x_i\) at \(\mathbf{a}\). Their product is the function \(p=fg\), defined by \(p(\mathbf{x})=f(\mathbf{x})g(\mathbf{x})\).

Theorem: Under these conditions, the partial derivative of the product exists at \(\mathbf{a}\) and is $$ \frac{\partial}{\partial x_i}(fg)(\mathbf{a}) = \frac{\partial f}{\partial x_i}(\mathbf{a})g(\mathbf{a}) + f(\mathbf{a})\frac{\partial g}{\partial x_i}(\mathbf{a}). $$ The same rule applies to each coordinate. In two variables, for example, $$ \frac{\partial}{\partial x}(fg)=\frac{\partial f}{\partial x}g+f\frac{\partial g}{\partial x}, \qquad \frac{\partial}{\partial y}(fg)=\frac{\partial f}{\partial y}g+f\frac{\partial g}{\partial y}, $$ where all functions and partial derivatives are evaluated at the same input.

Derivation from the Difference Quotient

To derive the rule, write the difference quotient for \(p=fg\), changing only coordinate \(x_i\). Add and subtract the intermediate product \(f(\mathbf{a})g(\mathbf{a}+h\mathbf{e}_i)\). This separates the change in the product into a change in \(f\) and a change in \(g\).

1
Start with the product difference quotient.
Use the definition of the \(i\)-th partial derivative of \(p=fg\).
2
Insert an intermediate product.
Add and subtract \(f(\mathbf{a})g(\mathbf{a}+h\mathbf{e}_i)\) in the numerator.
3
Separate the two changes.
Factor each difference so that one factor is a difference quotient.
4
Take the limit.
Use the existence of the two partial derivatives and the resulting continuity along this coordinate line.

In equations, the difference quotient is

$$ \begin{aligned} &\frac{f(\mathbf{a}+h\mathbf{e}_i)g(\mathbf{a}+h\mathbf{e}_i)-f(\mathbf{a})g(\mathbf{a})}{h}\\ &= f(\mathbf{a}+h\mathbf{e}_i) \frac{g(\mathbf{a}+h\mathbf{e}_i)-g(\mathbf{a})}{h} + g(\mathbf{a}) \frac{f(\mathbf{a}+h\mathbf{e}_i)-f(\mathbf{a})}{h}. \end{aligned} $$

For the first term, the difference quotient involving \(g\) tends to \(\frac{\partial g}{\partial x_i}(\mathbf{a})\). The other factor tends to \(f(\mathbf{a})\), because the partial derivative of \(f\) exists and therefore \(f(\mathbf{a}+h\mathbf{e}_i)\) tends to \(f(\mathbf{a})\). In the second term, \(g(\mathbf{a})\) is constant with respect to \(h\), and the difference quotient involving \(f\) tends to \(\frac{\partial f}{\partial x_i}(\mathbf{a})\). Therefore the limit of the entire expression is

$$ f(\mathbf{a})\frac{\partial g}{\partial x_i}(\mathbf{a}) + g(\mathbf{a})\frac{\partial f}{\partial x_i}(\mathbf{a}), $$

which is the stated rule. The proof uses only partial derivatives along the chosen coordinate direction; it does not require the full multivariable functions to be differentiable.

Worked Examples

Worked Example: Find Both Partials of a Product

Let \(p(x,y)=(x^2+2y)(3x-y)\). Set \(f(x,y)=x^2+2y\) and \(g(x,y)=3x-y\). Their partial derivatives are \(f_x=2x\), \(g_x=3\), \(f_y=2\), and \(g_y=-1\).

For the \(x\)-partial, apply the product rule to the \(x\)-dependent factors:

$$ \begin{aligned} p_x &=f_xg+fg_x\\ &=2x(3x-y)+(x^2+2y)(3)\\ &=6x^2-2xy+3x^2+6y\\ &=9x^2-2xy+6y. \end{aligned} $$

For the \(y\)-partial, use the \(y\)-derivatives of the same factors:

$$ \begin{aligned} p_y &=f_yg+fg_y\\ &=2(3x-y)+(x^2+2y)(-1)\\ &=6x-2y-x^2-2y\\ &=6x-x^2-4y. \end{aligned} $$

To check both results, expand first: \(p(x,y)=3x^3-x^2y+6xy-2y^2\). Differentiating this polynomial directly gives \(p_x=9x^2-2xy+6y\) and \(p_y=-x^2+6x-4y\), agreeing with the product-rule calculations.

Worked Example: Differentiate a Product with Respect to \(y\)

Let \(q(x,y)=(xy+y^2)(x^2-2y)\). To find \(q_y\), hold \(x\) fixed. For the first factor, \(\frac{\partial}{\partial y}(xy+y^2)=x+2y\); for the second, \(\frac{\partial}{\partial y}(x^2-2y)=-2\). Thus

$$ \begin{aligned} q_y &=(x+2y)(x^2-2y)+(xy+y^2)(-2)\\ &=(x^3+2x^2y-2xy-4y^2)-2xy-2y^2\\ &=x^3+2x^2y-4xy-6y^2. \end{aligned} $$

For a check, expand the product before differentiating:

$$ q(x,y)=x^3y+x^2y^2-2xy^2-2y^3. $$

Taking the \(y\)-partial gives \(x^3+2x^2y-4xy-6y^2\), exactly the result above. Throughout this calculation, \(x\) stays fixed; in particular, the derivative of \(x^2\) with respect to \(y\) is zero.

Worked Example: Differentiate a Product with Respect to \(z\)

Let \(r(x,y,z)=(x+yz)(xz+y^2)\). For a \(z\)-partial, treat \(x\) and \(y\) as fixed. The first factor has \(z\)-partial \(y\), and the second has \(z\)-partial \(x\). Therefore

$$ \begin{aligned} r_z &=y(xz+y^2)+(x+yz)x\\ &=xyz+y^3+x^2+xyz\\ &=x^2+2xyz+y^3. \end{aligned} $$

Check by expanding: \(r=x^2z+xy^2+xyz^2+y^3z\). Differentiation with respect to \(z\) gives \(x^2+0+2xyz+y^3\). This matches the product-rule result.

A Common Mistake: Differentiating Both Factors Together

A frequent error is to multiply the derivatives of the factors, as if the derivative of a product were \(f_xg_x\). The rule instead has two terms: one for the change in the first factor and one for the change in the second. For a concrete check, take \(p(x,y)=(x^2+2y)(3x-y)\) at \((1,2)\). The factor values are \(f(1,2)=5\) and \(g(1,2)=1\), while \(f_x(1,2)=2\) and \(g_x(1,2)=3\).

$$ \text{Incorrect: } f_xg_x=2\cdot 3=6. \qquad \text{Correct: } f_xg+fg_x=2\cdot1+5\cdot3=17. $$

The incorrect calculation omits the factor values and does not represent the change of the product. The correct answer can be checked from \(p_x=9x^2-2xy+6y\): at \((1,2)\), it is \(9-4+12=17\).

How to Apply the Rule Reliably

For a product of two functions, first identify the variable of differentiation. Then find the partial derivative of each factor with respect to that variable, keeping all other variables fixed. Combine them in the pattern “derivative of the first times the second, plus the first times derivative of the second.”

Takeaway: The product rule applies when both factors have the relevant partial derivative at the point. Its two terms account separately for the change in each factor; only the chosen coordinate varies in each partial derivative.

Checking by expanding can be helpful when the factors are polynomials, as in the examples. It is a check, not a requirement for applying the rule. The difference-quotient derivation explains the general method: the intermediate product splits the total change into two parts, and the limits of those parts produce the two terms of the rule.

Check Your Understanding

Try each question by identifying which variable changes and applying the product rule carefully.

  1. State the condition on the two factors needed to apply the partial product rule with respect to \(x_i\) at a point.
  2. In the difference-quotient proof, which intermediate product is added and subtracted?
  3. If \(u(x,y)=x+y\) and \(v(x,y)=xy\), write the product-rule expression for \(\frac{\partial}{\partial x}(uv)\).
  4. For \(w(x,y)=(x^2+y)(x-y)\), find \(w_y\) using the product rule.
  5. Explain why the product rule has two terms rather than the product of the two factor derivatives.