Tutorials › Calculus I › A Worked Workshop on Nested Rational Derivatives

Product, Quotient, and Chain Rules · Tutorial 486 of 1495

A Worked Workshop on Nested Rational Derivatives

Learn to organize and differentiate nested rational expressions one operation at a time, while keeping domain restrictions and derivative checks explicit.

Intermediate 11 min read

What You'll Learn

  • Identify the order of operations in a nested rational function before differentiating.
  • Apply quotient, product, and chain rules to the correct layers of an expression.
  • Carry derivatives of inner quotients into outer quotient calculations.
  • Keep denominators and domain restrictions visible throughout a calculation.
  • Simplify an assembled derivative and check it against an equivalent expression.

Why Nested Rational Expressions Need a Plan

A rational expression can contain several layers: a quotient whose numerator is a product, a quotient inside another quotient, or a product of two separate quotients. Differentiating such an expression is not a matter of choosing one rule and applying it everywhere. The reliable approach is to identify the operations from the outside inward, find the derivative of each inner part, and then assemble the result in the order dictated by the expression.

This workshop focuses on that sequence. The quotient rule handles each quotient, the product rule handles each product, and the Chain Rule carries an inner derivative through an outer operation. A derivative should be assembled before algebraic simplification obscures which rule produced each term.

Working principle: Identify the outermost operation, name its component functions, differentiate those components as needed, and only then apply the rule for the outer operation. Keep the original denominators visible until the derivative has been assembled.

Rules and Conditions for the Workshop

If \(u\) and \(v\) are differentiable near \(x\), their product has derivative \((uv)'=u'v+uv'\). If \(v(x)\ne 0\), their quotient has derivative \((u/v)'=(u'v-uv')/v^2\). If \(F\) is differentiable at \(g(x)\) and \(g\) is differentiable at \(x\), the Chain Rule gives \((F(g(x)))'=F'(g(x))g'(x)\). These rules can be applied repeatedly, provided every function involved is defined and differentiable at the point in question.

For rational functions, the main domain restriction is that no denominator may equal zero. It is useful to record those restrictions before differentiating: algebraic cancellation might simplify a formula, but it does not automatically restore points where the original expression was undefined.

1
Read the outer operation.
Decide whether the whole expression is a quotient, product, or composition.
2
Name the components.
Use temporary symbols such as \(u\) and \(v\) so each part can be differentiated separately.
3
Work inward as required.
Differentiate each component using its own product, quotient, or chain structure.
4
Assemble, then simplify.
Substitute the component derivatives into the outer rule before combining algebraic terms.

Why the Order of Rules Works

Here is a direct derivation for a quotient nested inside another quotient. Suppose \(A\), \(B\), and \(C\) are differentiable near \(x\), with \(B(x)\ne0\) and \(C(x)\ne0\). Set \(F=A/B\), so the full expression is \(H=F/C\). Applying the quotient rule first to \(F\), and then to \(H\), gives the derivative of the nested expression:

$$ F'=\frac{A'B-AB'}{B^2}, \qquad H'=\frac{F'C-FC'}{C^2}. $$

Now substitute \(F=A/B\) and its derivative into the formula for \(H'\). Putting the two terms in the numerator over the common denominator \(B^2\) yields:

$$ H' = \frac{\left(\frac{A'B-AB'}{B^2}\right)C-\left(\frac{A}{B}\right)C'}{C^2} = \frac{C(A'B-AB')-AB\,C'}{B^2C^2}. $$

Each step follows from the quotient rule applied to the current outer layer. The expression does not require a new special rule for nested quotients: it requires the usual rule, applied in the right order, with the derivative of the inner quotient carried into the outer calculation.

Worked Example: A Quotient Containing a Quotient

Worked Example: A Quotient Containing a Quotient

Differentiate \(f(x)=\dfrac{\dfrac{x^2+1}{x-1}}{x+2}\). The original expression requires \(x\ne1\) and \(x\ne-2\). Let \(u(x)=\dfrac{x^2+1}{x-1}\), so \(f=u/(x+2)\).

First differentiate the inner quotient. Its numerator is \(x^2+1\), with derivative \(2x\), and its denominator is \(x-1\), with derivative \(1\):

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

Next apply the quotient rule to \(f=u/(x+2)\). The denominator has derivative \(1\), so:

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

Only after assembling the outer quotient derivative, combine the two terms over \((x-1)^2\):

$$ \begin{aligned} f'(x) &= \frac{(x^2-2x-1)(x+2)-(x^2+1)(x-1)} {(x-1)^2(x+2)^2}\\ &= \frac{(x^3-5x-2)-(x^3-x^2+x-1)} {(x-1)^2(x+2)^2}\\ &= \frac{x^2-6x-1}{(x-1)^2(x+2)^2}. \end{aligned} $$

Check by rewriting the original function as \(f(x)=\dfrac{x^2+1}{(x-1)(x+2)}\). The combined denominator is \(x^2+x-2\), with derivative \(2x+1\). A single quotient-rule calculation gives numerator \(2x(x^2+x-2)-(x^2+1)(2x+1)=x^2-6x-1\), agreeing with the assembled result. This verifies the derivative wherever the original function is defined.

Worked Example: A Product of Two Rational Functions

Worked Example: A Product of Two Rational Functions

Differentiate \(g(x)=\dfrac{x^2+1}{x-2}\dfrac{x+1}{x+3}\). The domain excludes \(x=2\) and \(x=-3\). Set \(u(x)=\dfrac{x^2+1}{x-2}\) and \(v(x)=\dfrac{x+1}{x+3}\), so \(g=uv\).

Differentiate each quotient separately. For \(u\), the numerator derivative is \(2x\) and the denominator derivative is \(1\). For \(v\), both numerator and denominator derivatives are \(1\):

$$ \begin{aligned} u'(x) &= \frac{2x(x-2)-(x^2+1)}{(x-2)^2} = \frac{x^2-4x-1}{(x-2)^2},\\ v'(x) &= \frac{(x+3)-(x+1)}{(x+3)^2} = \frac{2}{(x+3)^2}. \end{aligned} $$

Apply the product rule \(g'=u'v+uv'\), retaining both terms:

$$ g'(x) = \frac{x^2-4x-1}{(x-2)^2}\frac{x+1}{x+3} + \frac{x^2+1}{x-2}\frac{2}{(x+3)^2}. $$

Use the common denominator \((x-2)^2(x+3)^2\). The first numerator gains a factor of \(x+3\); the second gains a factor of \(x-2\):

$$ \begin{aligned} g'(x) &= \frac{(x^2-4x-1)(x+1)(x+3)+2(x^2+1)(x-2)} {(x-2)^2(x+3)^2}\\ &= \frac{(x^4-14x^2-16x-3)+(2x^3-4x^2+2x-4)} {(x-2)^2(x+3)^2}\\ &= \frac{x^4+2x^3-18x^2-14x-7}{(x-2)^2(x+3)^2}. \end{aligned} $$

To check, combine the original product into one quotient. Its numerator is \((x^2+1)(x+1)=x^3+x^2+x+1\), and its denominator is \((x-2)(x+3)=x^2+x-6\). Applying the quotient rule to these polynomials gives numerator \((3x^2+2x+1)(x^2+x-6)-(x^3+x^2+x+1)(2x+1)\), which expands to \(x^4+2x^3-18x^2-14x-7\), as required.

Worked Example: A Quotient of Two Quotients

Worked Example: A Quotient of Two Quotients

Differentiate \(h(x)=\dfrac{\dfrac{x^2+1}{x+1}}{\dfrac{2x+1}{x+2}}\). The original expression requires \(x\ne-1\), \(x\ne-2\), and \(x\ne-\tfrac12\), since both its inner denominators and its outer denominator must be nonzero. Write \(h=u/v\), where \(u=\dfrac{x^2+1}{x+1}\) and \(v=\dfrac{2x+1}{x+2}\).

Differentiate the upper and lower quotients first:

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

Now use the outer quotient rule, \(h'=(u'v-uv')/v^2\). Substitution gives:

$$ h'(x) = \frac{ \left(\frac{x^2+2x-1}{(x+1)^2}\right) \left(\frac{2x+1}{x+2}\right) - \left(\frac{x^2+1}{x+1}\right) \left(\frac{3}{(x+2)^2}\right)} {\left(\frac{2x+1}{x+2}\right)^2}. $$

Combining the two terms in the outer numerator over \((x+1)^2(x+2)^2\), then dividing by \(v^2\), cancels the factor \((x+2)^2\). Thus:

$$ \begin{aligned} h'(x) &= \frac{(x^2+2x-1)(2x+1)(x+2)-3(x^2+1)(x+1)} {(x+1)^2(2x+1)^2}\\ &= \frac{(2x^4+9x^3+10x^2-x-2)-(3x^3+3x^2+3x+3)} {(x+1)^2(2x+1)^2}\\ &= \frac{2x^4+6x^3+7x^2-4x-5} {(x+1)^2(2x+1)^2}. \end{aligned} $$

For a check, rewrite \(h\) as \(\dfrac{(x^2+1)(x+2)}{(x+1)(2x+1)}\). The numerator is \(x^3+2x^2+x+2\), and the denominator is \(2x^2+3x+1\). Their derivatives are \(3x^2+4x+1\) and \(4x+3\). The quotient-rule numerator is \((3x^2+4x+1)(2x^2+3x+1)-(x^3+2x^2+x+2)(4x+3)=2x^4+6x^3+7x^2-4x-5\), matching the result.

A Common Mistake: Losing an Inner Derivative

In the last example, the lower component is \(v=(2x+1)/(x+2)\). A common error is to differentiate only its numerator and write \(v'=2/(x+2)\). That is not the quotient rule: the denominator also varies with \(x\), so its derivative contributes to the numerator of \(v'\).

$$ \text{Incorrect:}\qquad v'(x)=\frac{2}{x+2}. \qquad \text{Correct:}\qquad v'(x)= \frac{2(x+2)-(2x+1)(1)}{(x+2)^2} = \frac{3}{(x+2)^2}. $$

Using the incorrect value would also corrupt the outer derivative \(h'=(u'v-uv')/v^2\). The correction is to finish differentiating each inner component, including its denominator, before substituting it into the outer rule. Parentheses and signs matter: the full product \((2x+1)(1)\) is subtracted.

When This Method Is Useful

The operation-by-operation method is useful whenever a rational expression has enough layers that a single expanded formula would be difficult to track. It separates two jobs: choosing the correct calculus rule and performing the algebra. Naming components makes the calculus step visible; delaying simplification makes errors easier to locate.

Before accepting a result, check these points:

  • Did every quotient denominator remain nonzero on the stated domain?
  • Was the product rule used for every product at the layer where it occurs?
  • Was each inner quotient differentiated before its derivative was used outside?
  • Were all terms in a product or quotient derivative retained with the correct signs?
  • Does an equivalent single-quotient calculation agree with the assembled derivative?

Equivalent algebraic forms may look different while representing the same derivative. A useful check is to combine the original rational expression into one quotient, differentiate that form, and compare the resulting numerator and denominator with the rule-by-rule calculation. The original domain restrictions still apply, even if a simplified expression appears defined at an excluded point.

Check Your Understanding

For each question, identify the operation structure before carrying out any algebraic simplification.

  1. For \(p(x)=\dfrac{\dfrac{x^2+2}{x-3}}{x+1}\), what values of \(x\) must be excluded from the domain?
  2. In \(q(x)=\dfrac{x+1}{x-2}\dfrac{x^2+1}{x+3}\), which rule applies to the outermost operation, and which rule applies inside each factor?
  3. For \(r(x)=\dfrac{\dfrac{x+2}{x-1}}{\dfrac{3x+1}{x+4}}\), name the two functions to differentiate before applying the outer quotient rule.
  4. Why is it unsafe to cancel or simplify a rational expression before recording the domain of the original expression?
  5. When differentiating \(a(x)/b(x)\), which term in the quotient-rule numerator has a minus sign?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): 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