Why Product-Rule Errors Are Easy to Make
A product can conceal several terms that become visible only after differentiation. When taking a partial derivative, it is tempting to differentiate the factor that appears to depend most strongly on the chosen variable and leave the other factor untouched. That usually omits a term. Repeating the product rule for a second partial creates still more terms, so omitted terms and sign errors become more likely.
The remedy is systematic: identify both factors, differentiate each factor with respect to the chosen variable, and write both product-rule terms before simplifying. For a second partial, apply that procedure again to every term. Holding other variables fixed still matters, but it does not remove the product rule.
The First Partial of a Product
Let \(u\) and \(v\) be functions of \(x\) and \(y\), and suppose their relevant partial derivatives exist. When taking a partial derivative with respect to \(x\), treat \(y\) as fixed and apply the ordinary product rule to the resulting one-variable dependence on \(x\).
For instance, if \(v\) depends only on \(y\), then \(v_x=0\), so \(f_x=u_xv\). This is not a special product rule: it is the usual rule with one term equal to zero. In general, do not assume a factor is constant merely because it is not the factor you intend to differentiate first.
Worked Example: A First Partial with Two Nonzero Terms
Find \(f_x\) for \(f(x,y)=(x^2+1)(3y-x)\). Set \(u=x^2+1\) and \(v=3y-x\). With \(y\) held fixed, \(u_x=2x\) and \(v_x=-1\). Therefore,
To check, expand the original product first: \(f=3x^2y-x^3+3y-x\). Differentiating this expression with respect to \(x\), holding \(y\) fixed, gives \(6xy-3x^2-1\), as above. In particular, the \(-1\) comes from differentiating the second factor; omitting that factor's derivative would give an incorrect result.
Pure Second Partials: Apply the Rule Again
A pure second partial differentiates twice with respect to the same variable. To compute \(f_{xx}\), differentiate the first-partial formula \(f_x=u_xv+uv_x\) once more with respect to \(x\). Each of its two terms is itself a product, so each must be differentiated by the product rule.
The middle term appears twice: once from differentiating \(v\) in \(u_xv\), and once from differentiating \(u\) in \(uv_x\). Combining these two identical terms gives the coefficient \(2\). The corresponding formula for the other variable is \(f_{yy}=u_{yy}v+2u_yv_y+uv_{yy}\), provided the indicated derivatives exist.
Worked Example: A Pure Second Partial
Let \(g(x,y)=(x^2+y)(xy+1)\). Find \(g_{xx}\). Set \(u=x^2+y\), \(v=xy+1\). Their relevant derivatives are \(u_x=2x\), \(u_{xx}=2\), \(v_x=y\), and \(v_{xx}=0\). Substitution into the pure second-partial formula gives
Check by expanding before differentiating: \(g=x^3y+x^2+xy^2+y\). Then \(g_x=3x^2y+2x+y^2\), and differentiating again with respect to \(x\) gives \(g_{xx}=6xy+2\). At \((1,2)\), the result is \(6(1)(2)+2=14\). Directly, the formula's terms there are \(2(3)+2(2)(1)(2)+0=6+8=14\).
Mixed Second Partials: Keep Every Contribution
A mixed second partial differentiates with respect to two different variables. Starting with \(f_x=u_xv+uv_x\) and differentiating with respect to \(y\) gives
There are four contributions because each of the two terms in \(f_x\) produces two terms when differentiated with respect to \(y\). This formula requires the displayed derivatives to exist. It is a direct repeated product-rule calculation; it does not assume that the order of differentiation can be reversed.
Worked Example: Checking All Terms in a Mixed Partial
Let \(h(x,y)=(x-y)(x^2+y^2)\). Find \(h_{xy}\). Write \(u=x-y\) and \(v=x^2+y^2\). The derivatives needed for the formula are \(u_x=1\), \(u_y=-1\), \(u_{xy}=0\), \(v_x=2x\), \(v_y=2y\), and \(v_{xy}=0\). Thus
Check by expansion: \(h=x^3-x^2y+xy^2-y^3\). First \(h_x=3x^2-2xy+y^2\); then differentiating with respect to \(y\) gives \(h_{xy}=-2x+2y\), matching the product calculation. At \((2,1)\), both forms give \(-4+2=-2\).
A Common Mistake: Differentiating Only One Factor
Consider \(q(x,y)=(x^2+1)(y+2x)\). A common incorrect calculation is
This differentiates the first factor but silently treats the second as constant with respect to \(x\). Yet \(y+2x\) depends on \(x\), and its partial derivative is \(2\). The missing contribution is \((x^2+1)(2)\). The correct calculation is
Expansion confirms the correction: \(q=x^2y+2x^3+y+2x\), so \(q_x=2xy+6x^2+2\). The wrong result is missing \(2x^2+2\). A reliable habit is to write both product-rule terms before deciding whether either one vanishes.
How to Audit a Product Derivative
When a result seems unexpectedly short, inspect it before moving on. The following sequence helps locate the most common errors:
Write \(f=uv\), so it is clear which two expressions the product rule applies to.
Compute \(u_x\) and \(v_x\), or the corresponding derivatives for the variable being used. Holding another variable fixed does not mean holding the chosen variable fixed.
For a first partial, start with \(u_xv+uv_x\). For a second partial, differentiate each term in the first-partial formula.
In particular, preserve negative derivatives such as \((3y-x)_x=-1\).
Expanding the product and differentiating the expanded expression provides an independent check for polynomial examples.
Why the Systematic Method Matters
Product-rule errors are not merely bookkeeping problems. A missing term in a first partial changes the input to every later calculation that uses that derivative. In a second partial, forgetting one of the two middle contributions can lose the factor of \(2\); in a mixed partial, dropping either cross term can alter the result even when the pure second partials are correct.
The formulas do not say that every displayed contribution must be nonzero. They say that each contribution must be considered. If a factor is independent of the variable of differentiation, its derivative is zero, and the corresponding term disappears for a reason that can be stated and checked. Writing the full formula first makes that distinction visible and helps prevent accidental omissions.
Check Your Understanding
For each question, show the product-rule terms before simplifying.
- If \(p(x,y)=(x+y)(x^2-y)\), what is \(p_x\)?
- For \(f=uv\), which three contributions appear in \(f_{yy}\)?
- Why does the term \(2u_xv_x\) appear in \(f_{xx}\)?
- For \(r(x,y)=(x+1)(y^2+x)\), calculate \(r_x\), and identify the term that would be missing if only the first factor were differentiated.
- What independent check can be used for a polynomial product derivative?