One Expression, More Than One Useful Structure
A derivative rule is chosen by looking at how an expression is built. If the expression is a product, the product rule is relevant. If one function is applied to the output of another, the chain rule is relevant. Sometimes both structures occur, and both rules are needed.
The distinction is about structure, not merely appearance. In particular, an expression can be written as a product and also be rewritten as a composition. For example, \(x^2(x+1)^2\) is a product of two squared factors, but it is also equal to \([x(x+1)]^2\), the square of an inner expression. Either route can give the derivative, provided the chosen structure is read correctly.
Two Rules, Two Structures
Suppose \(u\) and \(v\) are differentiable functions of \(x\). Their product has derivative
This is the product rule. It applies when the expression being differentiated is a product of two functions. The two terms account for the change in each factor in turn.
For composition, suppose \(g\) is differentiable at \(x\), and \(f\) is differentiable at \(g(x)\). Then
This is the chain rule. It applies when the output of the inner function \(g\) is used as the input to the outer function \(f\). The derivative of the outer function is evaluated at the inner output, and then multiplied by the derivative of the inner function.
These rules answer different questions. The product rule describes how a product changes. The chain rule describes how a nested function changes. A product may contain composite factors, so recognizing a product does not mean the chain rule is irrelevant to differentiating its factors.
Why the Product Rule Has Two Terms
The product rule follows directly from the definition of the derivative. Let \(u\) and \(v\) be differentiable at \(a\). For nonzero \(h\), add and subtract \(u(a+h)v(a)\) in the numerator of the difference quotient:
As \(h\) tends to zero, differentiability of \(u\) implies continuity of \(u\), so \(u(a+h)\) tends to \(u(a)\). The difference quotients for \(u\) and \(v\) tend to \(u'(a)\) and \(v'(a)\), respectively. Therefore the limit is
This proves the product rule at \(a\). The two terms arise because the change in the product can be separated into a change in one factor and a change in the other. This is why differentiating a product by simply multiplying the two derivatives does not work.
Worked Example: Differentiate a Product of Squared Factors
Worked Example: \(x^2(x+1)^2\) as a Product
Let \(f(x)=x^2(x+1)^2\). Read the expression as the product of \(u(x)=x^2\) and \(v(x)=(x+1)^2\). Their derivatives are \(u'(x)=2x\) and \(v'(x)=2(x+1)\), using the power rule and chain rule for the second factor. The product rule gives
Factor out the common factor \(2x(x+1)\):
Check by expanding the original function first:
The derivative from the product rule agrees with the derivative of the expanded polynomial.
The Same Function as a Composition
The expression in that example also has a composition structure. Since \(x^2(x+1)^2=[x(x+1)]^2\), define the inner function \(g(x)=x(x+1)\) and the outer function \(F(t)=t^2\). Then \(F(g(x))=[x(x+1)]^2\), so the chain rule applies.
Worked Example: \([x(x+1)]^2\) as a Composition
The outer function is \(F(t)=t^2\), with derivative \(F'(t)=2t\). The inner function is \(g(x)=x(x+1)=x^2+x\), with derivative \(g'(x)=2x+1\). Applying the chain rule gives
To check, expand the composition:
The product-rule and chain-rule calculations agree because they differentiate the same function. The two expressions highlight different structures; neither changes the underlying function.
Choosing a Route When the Structures Differ
Not every product of factors is a square of a single inner expression. Compare \(x^2(x+1)\) with \([x^2(x+1)]^2\). In the first expression, multiplication combines two factors. In the second, the entire product is the input to an outer squaring function. The first naturally calls for the product rule; the second naturally calls for the chain rule applied to the whole inner expression.
Worked Example: A Product Inside a Composition
Let \(q(x)=[x^2(x+1)]^2\). Set \(g(x)=x^2(x+1)\), so \(q(x)=[g(x)]^2\). By the chain rule,
To find \(g'(x)\), use the product rule on \(g(x)=x^2(x+1)\):
Substitute this result into the chain-rule expression:
For a check, expand the function and differentiate:
The rule sequence follows the expression’s structure: first the outer square and then the inner product. The product rule is needed to differentiate the inner expression.
A Practical Structure Check
Before differentiating, read the expression from the outside inward. Ask what the final operation is and what expressions it combines. This avoids choosing a rule just because a familiar symbol appears somewhere in the formula.
If two functions are multiplied, identify a product. If an outer function takes an entire expression as its input, identify a composition.
For a product, write it as \(u(x)v(x)\). For a composition, write it as \(F(g(x))\). Clear names make the rule choice explicit.
Use \(u'v+uv'\) for a product, or \(F'(g(x))g'(x)\) for a composition. If a factor or inner expression has its own structure, continue with the appropriate rule there.
When useful, expand or factor the original expression and differentiate the equivalent form. The answers must agree wherever both calculations are defined.
For instance, \((x^2+1)(3x-2)^2\) is a product of two functions. The second factor is also a composition, because a square is applied to \(3x-2\). Thus the product rule combines the derivatives of the two factors, and the chain rule is used when differentiating the squared factor.
Common Mistake: Treating Different Expressions as the Same Structure
A common error is to decide that an expression is a composition simply because it contains a power, or to replace an inner expression with a different one without checking equality. For example, \(x^2(x+1)\) is not \([x(x+1)]^2\). At \(x=1\), the first expression equals \(1^2(2)=2\), while the second equals \((1\cdot2)^2=4\). They are different functions, so their derivatives need not agree.
The correct product-rule calculation for \(r(x)=x^2(x+1)\) is
By contrast, applying the chain rule to the different function \(s(x)=[x(x+1)]^2\) gives \(s'(x)=2x(x+1)(2x+1)\). At \(x=1\), these derivatives are \(5\) and \(12\), respectively. The discrepancy is not a failure of either rule: the expressions being differentiated were different. Check the grouping and the equality of the functions before transferring a derivative calculation from one form to another.
Why This Distinction Matters
Correct rule selection begins before any algebraic manipulation. A product and a composition describe different ways to build a function, and those structures determine how the derivative is assembled. Rewriting can expose a useful alternative structure, but a rewrite is valid only when it preserves the function.
The example \(x^2(x+1)^2=[x(x+1)]^2\) is especially instructive: it can be differentiated by either route, and agreement provides a strong check. In other cases, such as \(x^2(x+1)\) and \([x(x+1)]^2\), the expressions are not equal, so the routes do not describe the same derivative problem. The reliable habit is to name the factors or inner and outer functions, apply the rule that matches that structure, and verify the result when a convenient equivalent form is available.
Check Your Understanding
For each question, identify the structure before carrying out the differentiation.
- For \(x^3(x-2)\), what is the outermost operation, and which rule applies directly?
- Write \((2x+1)^4\) as \(F(g(x))\), and state the derivative using the chain rule.
- Explain why \(x^2(x+1)^2\) and \([x(x+1)]^2\) can be differentiated by different routes but must give the same derivative.
- Differentiate \((x^2+1)(x-3)^2\), indicating where the product rule and chain rule are used.
- At \(x=1\), compare \(x^2(x+1)\) with \([x(x+1)]^2\). Are they the same function? Give a numerical reason.