Skip to content

When do you use the chain rule vs the product rule

Use the product rule when you are differentiating a product of two functions, and use the chain rule when you are differentiating a composition (a function inside another function). The product rule handles (u(x)v(x)); the chain rule handles (g(f(x))).

Calculus · Derivatives


Both rules arise from the limit definition of the derivative, but they apply to different structures. A product of functions looks like (u(x)v(x)); each factor varies with (x) independently. A composition looks like (g(f(x))); the inner function (f) feeds its output into the outer function (g). Recognizing the structure before you start prevents wasted algebra and sign errors.

Product Rule

The product rule states ((uv)' = u'v + uv'). For example, let (u(x)=x^2) and (v(x)=sin\sin x). Then (u'(x)=2x) and (v'(x)=cos\cos x). Applying the rule gives (x2sinx)=2xsinx+x2cosx. (x^2\sin x)' = 2x\sin x + x^2\cos x. This result shows how each factor contributes a term, and the rule works no matter how complicated each factor is, as long as they are multiplied together.

Use the product rule whenever:

  • You have an explicit multiplication of two differentiable functions, e.g., (x3x^3\cdot exe^x).
  • One factor is a constant multiple of another function, e.g., (5\cdot\ln x).
  • The expression can be rewritten as a product after algebraic manipulation, e.g., x1+x=x(1+x)1\frac{x}{1+x}=x\cdot(1+x)^{-1}.

Chain Rule

The chain rule handles compositions: ((g\circ f)'(x)=g'(f(x))\cdot f'(x)). Take (h(x)=(3x+2)^4). Here the outer function is (g(u)=u^4) and the inner function is (f(x)=3x+2). Compute (g'(u)=4u^3) and (f'(x)=3). Substituting gives h(x)=4(3x+2)33=12(3x+2)3.\begin{aligned}h'(x) &= 4(3x+2)^3\cdot3 \\ &= 12(3x+2)^3.\end{aligned} The derivative follows the “outside times the derivative of the inside” pattern.

Applying the chain rule step‑by‑step:

  1. 1Identify the outer function (g) and the inner function (f).
  2. 2Differentiate the outer function, keeping the inner function unchanged.
  3. 3Differentiate the inner function.
  4. 4Multiply the results from the previous two steps.

Check yourself

Which rule should you apply to differentiate f(x)=x2sinxf(x)=x^2\sin x?

Get this as a lesson built for you

Describe what you are studying and Lernex writes the lesson and the questions around it. Free, and it takes about a minute.

Try it

No account needed to try it.

What people ask next