Why the Structure of an Expression Matters
When differentiating, the first question is not simply which formula looks familiar. It is: how is the expression built? An expression may be a product, a composition, or a product whose factors are themselves compositions. Those structures call for different rules.
For example, \(x\sin(x^2)\) has an outer product: the factor \(x\) is multiplied by the factor \(\sin(x^2)\). But the second factor is also a composition: the sine function is applied to the inner expression \(x^2\). Differentiating it correctly requires both the product rule and the chain rule.
Recognizing Products and Compositions
A product has the form \(u(x)v(x)\): two functions of \(x\) are multiplied. A composition has the form \(f(g(x))\): the output of an inner function \(g\) is used as the input to an outer function \(f\). In the composition \(\sin(x^2)\), for instance, \(x^2\) is the input to the sine function.
A useful first step is to look for the operation performed last when the expression is assembled. In \(x\sin(x^2)\), the last operation is multiplication, so start with the product rule. Within the second factor, the last operation is applying sine to \(x^2\), so differentiating that factor calls for the chain rule.
The way an expression is written helps reveal its useful structure. Some expressions can be rewritten in more than one way, so there may be more than one valid route to a derivative. The goal is to recognize a clear structure and apply the rules it requires.
Why the Product Rule Has Two Terms
Both factors in a product can change as \(x\) changes. The derivative must account for the change in each one. This idea is made precise by the difference quotient.
For differentiable functions \(u\) and \(v\), subtract the product at \(x\) from the product at \(x+h\), then divide by \(h\).
Insert \(u(x+h)v(x)\), which lets us separate the changes in the two factors.
As \(h\) approaches zero, differentiability gives the derivatives of the factors, and continuity gives \(u(x+h)\to u(x)\).
Because differentiability implies continuity, \(u(x+h)\) approaches \(u(x)\). The difference quotients for \(u\) and \(v\) approach \(u'(x)\) and \(v'(x)\), respectively. Therefore the limit of the expression is \(u(x)v'(x)+v(x)u'(x)\), which is the product rule. Each term represents the contribution from the changing of one factor while the other factor is held at its corresponding value.
Worked Examples
Worked Example: A Product Containing a Composite Factor
Differentiate \(y=x\sin(x^2)\).
The outermost operation is multiplication. Set \(u(x)=x\) and \(v(x)=\sin(x^2)\). Then \(u'(x)=1\). To differentiate \(v\), use the chain rule: the outer function is sine, and the inner function is \(x^2\).
Now apply the product rule, keeping both terms:
Check: At \(x=0\), the derivative formula gives \(\sin(0)+0=0\). From the difference quotient, since \(y(0)=0\), $$ \lim_{h\to 0}\frac{h\sin(h^2)-0}{h} =\lim_{h\to 0}\sin(h^2)=0. $$ The two values agree.
Worked Example: A Composition That Is Not a Product
Differentiate \(y=(x^2+1)^3\).
The expression is a composition: the inner function is \(g(x)=x^2+1\), and the outer function is \(f(u)=u^3\). The outer derivative is \(3u^2\), and the inner derivative is \(2x\). Applying the chain rule gives:
No product rule is needed in this form: the outer operation is raising the entire inner expression to the third power. To check, expand the original function and differentiate term by term:
Expanding the chain-rule answer gives \(6x(x^4+2x^2+1)=6x^5+12x^3+6x\), as required.
Worked Example: A Product of Two Composite Factors
Differentiate \(y=(x^2+1)e^{3x}\).
The outermost operation is multiplication. Let \(u(x)=x^2+1\) and \(v(x)=e^{3x}\). Their derivatives are \(u'(x)=2x\) and, by the chain rule, \(v'(x)=e^{3x}\cdot 3\). Apply the product rule:
Check: At \(x=0\), the derivative formula gives \(e^0(0+0+3)=3\). Using the difference quotient directly at zero gives the same result:
Here \(\lim_{h\to0}(e^{3h}-1)/h=3\), from the derivative of the exponential at zero and the chain rule.
A Reliable Decision Process
Use the following process before differentiating a mixed expression. It helps prevent choosing one rule just because a familiar symbol appears.
If the expression is a product of two variable-dependent factors, plan to use the product rule.
If a factor applies a function to an inner expression, such as \(\sin(x^2)\) or \(e^{3x}\), use the chain rule to differentiate that factor.
Write \(u'v+uv'\) before simplifying so neither contribution is lost.
Combine like terms or factor only after applying the required rules. Check by expanding, using an equivalent form, or evaluating the derivative at a convenient point.
Common Mistake: Using Only the Chain Rule
A common error is to notice the composite factor in \(x\sin(x^2)\) and differentiate only that factor, forgetting that it is multiplied by \(x\). For example, the incorrect calculation
uses the chain rule on \(\sin(x^2)\) but omits the derivative contribution from \(x\). Correct the calculation by naming both product factors and applying the product rule:
The omitted term is not optional: it accounts for the change in the first factor. At \(x=0\), the incorrect expression gives zero, but the correct derivative there is also zero, so that point alone does not expose the error. At \(x=1\), however, the missing contribution is \(\sin(1)\), which is nonzero.
Why the Distinction Matters
The product rule and the chain rule describe different ways an expression can change. A product changes because either factor can change; a composition changes because its input changes and the outer function responds to that change. When both structures are present, the derivative must include both effects.
On an AP Calculus problem, identifying the structure before computing is especially useful when expressions contain trigonometric, exponential, or polynomial functions together. Writing the product-rule setup explicitly, then applying the chain rule inside each factor where needed, makes the calculation easier to follow and less likely to omit a term.
Check Your Understanding
For each question, identify the structure before differentiating. Show enough work to make clear which rule is being used.
- Is \(\cos(3x)\) a product, a composition, or both? Differentiate it.
- Differentiate \(x^2\sin x\). Which rule handles the outermost operation?
- Differentiate \(e^{x^2+1}\). Identify the outer and inner functions.
- Differentiate \((x+1)\cos(x^2)\). State where each rule is used.
- A student differentiates \(x e^{2x}\) as \(2xe^{2x}\). Identify the omitted contribution and give the correct derivative.