Tutorials › AP Calculus › Preserving Structure in Composite Derivatives

Chain Rule and Nested Functions · Tutorial 176 of 999

Preserving Structure in Composite Derivatives

Learn to use the chain rule while choosing a final algebraic form that keeps important structure visible and is easy to check.

Intermediate 9 min read

What You'll Learn

  • Identify the inner and outer functions in a composite expression.
  • Keep an inner expression intact when it makes the chain-rule factors easier to recognize.
  • Compare factored and expanded forms of the same derivative.
  • Check that algebraic rewrites preserve the expression and its domain.
  • Spot and correct an error caused by expanding a composite expression incorrectly.

Why the Form of a Derivative Matters

A correct derivative can be written in more than one algebraically equivalent way. Those forms may not be equally useful: one might show the chain-rule structure clearly, while another might be better for evaluating the derivative or comparing it with a given expression.

When differentiating a composite function, the inner expression is often worth keeping intact. It shows where the outer function is being evaluated and helps make the chain-rule factors visible. Expanding or simplifying can still be useful, but it should be a deliberate choice rather than an automatic final step.

Key takeaway: Apply the chain rule to the function's nested structure first. Then choose a factored or rewritten form that serves the task while preserving algebraic equivalence.

Read the Structure Before Rewriting

A composite function has the form \(F(g(x))\): the inner function \(g\) is evaluated first, and the outer function \(F\) acts on that result. The chain rule states that, wherever the functions are differentiable as required,

$$ \frac{d}{dx}F(g(x))=F'(g(x))g'(x). $$

This formula gives a natural factored form for the derivative. The factor \(F'(g(x))\) retains the inner expression inside the outer derivative, and the factor \(g'(x)\) records how quickly the inner function changes. Keeping those parts visible makes the source of each factor easier to check.

For example, if the inner expression is \(3x^2-2\), then writing \((3x^2-2)^4\) in the derivative makes it clear that the fourth power is applied to that entire expression. Replacing it with a more expanded form may be valid, but can make the original nesting harder to see.

Deriving the Useful Factored Form

The reason a factored derivative preserves useful information follows directly from the chain rule. Suppose \(y=F(u)\), where \(u=g(x)\). A small change in \(x\) changes \(u\) at rate \(g'(x)\); the outer function changes in response to \(u\) at rate \(F'(u)\). The chain rule combines these rates by multiplication.

$$ \frac{dy}{dx} = \frac{dy}{du}\frac{du}{dx} = F'(u)g'(x) = F'(g(x))g'(x). $$

This is a complete reason for the familiar factored pattern: the first factor is the outer derivative evaluated at the unchanged inner expression, and the second is the derivative of that inner expression. Rewriting the product algebraically does not change its value, but may hide this explanation.

For instance, if the outer derivative contributes a power of \(g(x)\), leaving \(g(x)\) written as a single grouped expression makes it easy to verify that the power is applied to the whole input. The factor \(g'(x)\) remains separately visible as well.

Worked Example: Keep a Polynomial Inner Expression Intact

Worked Example: Keep a Polynomial Inner Expression Intact

Differentiate \(y=(3x^2-2)^5\). Give a form that shows the composite structure, and check it at \(x=1\).

Set \(u=3x^2-2\). Then \(y=u^5\), so the outer function is \(F(u)=u^5\) and the inner function is \(u(x)=3x^2-2\).

The outer derivative is \(F'(u)=5u^4\), and the inner derivative is \(u'(x)=6x\). The chain rule gives

$$ \begin{aligned} \frac{dy}{dx} &=5u^4(6x)\\ &=30xu^4\\ &=30x(3x^2-2)^4. \end{aligned} $$

The last line keeps the original inner expression together. To check the calculation at \(x=1\), first find \(u(1)=3(1)^2-2=1\). The chain-rule factors at that input are \(5u^4=5(1)^4=5\) and \(u'(1)=6(1)=6\), so their product is \(5\cdot6=30\). The proposed derivative also gives \(30(1)(3(1)^2-2)^4=30(1)^4=30\). The check agrees.

When to Leave a Derivative Factored

A factored form is often the clearest choice when the original expression is visibly nested. It keeps the chain-rule components separate and makes the relationship between the original function and its derivative easy to inspect.

  • Keep the inner expression grouped when its role as the input to an outer function matters.
  • Keep factors separate when you want to check which factor came from which part of the composition.
  • Keep a denominator grouped when expanding it would make its structure harder to recognize.
  • Substitute a value into the factored form when the inner expression can be evaluated first, as in the previous example.

Factored does not mean unfinished. If the task asks for a derivative, a correct factored expression is a complete answer unless a particular form is requested. In many cases it is also the form least likely to conceal an algebra error.

Worked Example: Preserve a Composite Exponent

Worked Example: Preserve a Composite Exponent

Differentiate \(y=e^{(x-2)^3}\), and evaluate the derivative at \(x=3\).

Let \(u=(x-2)^3\). The outer function is \(F(u)=e^u\), with derivative \(F'(u)=e^u\). The inner derivative is

$$ \begin{aligned} u'(x) &=3(x-2)^2\frac{d}{dx}(x-2)\\ &=3(x-2)^2(1)\\ &=3(x-2)^2. \end{aligned} $$

Applying the chain rule and retaining the exponent as the original inner expression gives

$$ \frac{dy}{dx}=e^{(x-2)^3}\,3(x-2)^2. $$

At \(x=3\), the inner exponent is \((3-2)^3=1\), and the inner derivative factor is \(3(3-2)^2=3\). Thus the derivative is \(e^1\cdot3=3e\). Substituting \(x=3\) into the displayed derivative also gives \(e^{(3-2)^3}3(3-2)^2=e^1\cdot3=3e\), confirming the evaluation.

When Rewriting Is Useful

Sometimes an equivalent algebraic form is more convenient. For example, you may need to evaluate a derivative using a form that makes a particular input straightforward, compare it with another formula, or combine it with other algebra. The important point is that rewriting happens after the chain-rule structure has been identified.

For a polynomial inner expression, expansion may make a polynomial easier to compare term by term. For a nested denominator, however, expanding may make the original inner function harder to spot. Either choice can be appropriate if the rewrite is correct and its domain is respected.

Form choice: Prefer the factored form when it best displays the composition or supports a clear check. Rewrite it when the task benefits from another form, and verify that the rewritten expression is algebraically equal wherever it is used.

Worked Example: Compare Factored and Expanded Forms

Worked Example: Compare Factored and Expanded Forms

Differentiate \(y=\dfrac{1}{1+(2x-1)^2}\). Write a form that retains the inner expression, then an equivalent form with the denominator expanded. Check both at \(x=1\).

Set \(u=2x-1\). The outer function is \(F(u)=(1+u^2)^{-1}\). Differentiating with respect to \(u\) gives

$$ F'(u)=-(1+u^2)^{-2}(2u) =-\frac{2u}{(1+u^2)^2}. $$

The inner derivative is \(u'(x)=2\). Therefore the chain rule gives the factored form

$$ \frac{dy}{dx} = -\frac{2u}{(1+u^2)^2}\cdot2 = -\frac{4(2x-1)}{\left(1+(2x-1)^2\right)^2}. $$

To expand the denominator, calculate the square first:

$$ \begin{aligned} 1+(2x-1)^2 &=1+(4x^2-4x+1)\\ &=4x^2-4x+2. \end{aligned} $$

Thus an equivalent expanded-denominator form is

$$ \frac{dy}{dx} = -\frac{4(2x-1)}{(4x^2-4x+2)^2}. $$

At \(x=1\), the factored form has numerator \(-4(2(1)-1)=-4\) and denominator \((1+(2(1)-1)^2)^2=(1+1)^2=4\), so its value is \(-4/4=-1\). In the expanded form, the denominator is \((4(1)^2-4(1)+2)^2=(4-4+2)^2=2^2=4\), and the numerator is \(-4(2(1)-1)=-4\), again giving \(-1\). The two forms agree at the check value, and the expansion above shows why they are equivalent.

A Common Algebraic Pitfall

Keeping structure is helpful only if the structure is copied correctly. A frequent error is to expand a square by squaring each term and forgetting the cross term. In the previous example, an incorrect calculation would be

$$ 1+(2x-1)^2 \mathrel{\color{red}{\ne}} 1+4x^2+1 = 4x^2+2. $$

The square of a difference includes a middle term. The correct calculation is

$$ (2x-1)^2 = (2x-1)(2x-1) = 4x^2-2x-2x+1 = 4x^2-4x+1. $$

Consequently, the correct denominator before squaring is \(1+(2x-1)^2=4x^2-4x+2\), not \(4x^2+2\). The incorrect rewrite would produce a different function and therefore a different derivative. If the factored form is already clear, leaving the inner expression intact avoids this unnecessary expansion risk.

Check Equivalence and Domain

Two displayed forms are interchangeable only where both are defined and their algebraic equality holds. In particular, simplification should not silently add or remove input values from the original function's domain. For the rational function in the last example, \(1+(2x-1)^2\) is positive for every real \(x\), so the original denominator never vanishes. Its expanded version, \(4x^2-4x+2\), is the same positive quantity, so this rewrite introduces no domain change.

A practical check is to return to the original expression and ask three questions: Does the new form have the same value? Does it apply to the same inputs? Does it still show enough structure for the task? If a rewrite makes the answer harder to check and provides no benefit, keep the factored form.

1
Identify the composition.
Name the outer function and the entire inner expression before differentiating.
2
Apply the chain rule.
Write the outer derivative evaluated at the inner expression, multiplied by the inner derivative.
3
Choose the final form.
Retain the grouping if it makes the structure clearer; otherwise rewrite carefully for a specific purpose.
4
Check the result.
Compare the forms algebraically or evaluate both at a convenient input, and confirm that the domain is respected.

Check Your Understanding

For each question, focus on both the derivative and the usefulness of its written form.

  1. For \(y=(x^2+4)^3\), identify the inner expression and write the derivative with that expression intact.
  2. Why can a factored chain-rule form make it easier to check a derivative?
  3. Expand \(1+(3x+1)^2\) correctly. Which term is lost if the square is incorrectly expanded term by term?
  4. Give one situation in which an expanded form might be useful and one in which retaining the inner expression might be clearer.
  5. What should be checked before treating two algebraically rewritten derivative forms as interchangeable?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon
Clinical Biostats