Tutorials › Calculus I › Cubic Derivatives with Difference Quotients

The Derivative from First Principles · Tutorial 344 of 1495

Cubic Derivatives with Difference Quotients

Learn to expand cubic difference quotients, cancel the increment safely, and evaluate the resulting derivative at general and specific inputs.

Intermediate 8 min read

What You'll Learn

  • Set up the derivative of a cubic polynomial using the increment form of the difference quotient.
  • Expand shifted squares and cubes and collect terms by powers of the increment.
  • Explain why simplifying before taking the limit removes the apparent zero-over-zero form.
  • Obtain the derivative at a general input for a cubic polynomial.
  • Compute and check derivative values at selected numerical inputs.
  • Recognize and correct common errors involving cancellation and the increment.

Why Cubic Difference Quotients Need Careful Algebra

A derivative measures the limiting slope of secant lines as the two points approach one another. For a cubic polynomial, the difference quotient involves a cube of the shifted input. Expanding that cube produces several terms, and simplifying them correctly is the key to finding the limit.

The quotient initially has a zero numerator and a zero denominator when the increment is zero. Direct substitution therefore does not evaluate the limit. Instead, we simplify the quotient while the increment is nonzero, then take its limit as the increment approaches zero.

This method uses the first-principles definition of the derivative and algebraic expansion. It does not require a general rule for differentiating integer powers.

Definition and Algebraic Setup

Definition: For a function \(f\) defined on an open interval containing \(x\), its derivative at \(x\), if the limit exists, is $$ f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}. $$ In the quotient, \(h\ne 0\). The limit asks what value the quotient approaches as nonzero increments \(h\) approach zero.

Consider a cubic polynomial with real coefficients, $$ f(x)=ax^3+bx^2+cx+d, $$ where \(a\ne 0\). The condition \(a\ne 0\) makes the polynomial genuinely cubic. Its domain is all real numbers, so for every real input \(x\), the expression \(f(x+h)\) is defined for every real increment \(h\).

To form the difference quotient, replace each occurrence of \(x\) in \(f\) by \(x+h\), subtract \(f(x)\), and divide by \(h\). The needed expansions are $$ (x+h)^3=x^3+3x^2h+3xh^2+h^3 $$ and $$ (x+h)^2=x^2+2xh+h^2. $$ After subtracting, every term independent of \(h\) cancels. The remaining terms contain a factor of \(h\), which can be removed because the quotient is considered only for \(h\ne 0\).

Deriving the Difference Quotient for a General Cubic

We now carry out the full calculation. Keeping the coefficients visible helps show exactly how each part contributes.

1
Substitute the shifted input.
Write \(f(x+h)\) by replacing each \(x\) in the polynomial with \(x+h\).
2
Expand and subtract.
Use the square and cube expansions, then subtract \(ax^3+bx^2+cx+d\).
3
Divide by the increment.
Factor out \(h\) from the numerator and cancel it under the condition \(h\ne 0\).
4
Take the limit.
After cancellation, the remaining expression is a polynomial in \(h\), so its limit is found by setting \(h=0\).

In detail, the difference quotient is

$$ \begin{aligned} \frac{f(x+h)-f(x)}{h} &=\frac{a(x+h)^3+b(x+h)^2+c(x+h)+d-(ax^3+bx^2+cx+d)}{h}\\ &=\frac{a(x^3+3x^2h+3xh^2+h^3)+b(x^2+2xh+h^2)+cx+ch+d}{h}\\ &\qquad-\frac{ax^3+bx^2+cx+d}{h}\\ &=\frac{3ax^2h+3axh^2+ah^3+2bxh+bh^2+ch}{h}\\ &=3ax^2+3axh+ah^2+2bx+bh+c,\qquad h\ne 0. \end{aligned} $$

Only after simplifying do we take the limit. As \(h\) approaches zero, the terms \(3axh\), \(ah^2\), and \(bh\) approach zero. The other terms do not depend on \(h\). Thus the derivative exists at every real \(x\), and the result is:

Theorem: If \(f(x)=ax^3+bx^2+cx+d\) has real coefficients and \(a\ne 0\), then \(f\) is differentiable for every \(x\in\mathbb R\), and $$ f'(x)=3ax^2+2bx+c. $$ The same calculation also works if \(a=0\), but then \(f\) is not a cubic polynomial.

The constant term \(d\) does not appear in the derivative because it cancels in \(f(x+h)-f(x)\). The coefficients of the other terms determine the surviving terms after division by \(h\).

Worked Examples

Worked Example: Derivative of a Cubic at a General Input

Find the derivative of \(f(x)=2x^3-5x^2+4x-1\) from its difference quotient.

First substitute \(x+h\) and subtract the original function:

$$ \begin{aligned} f(x+h)-f(x) &=\left(2(x+h)^3-5(x+h)^2+4(x+h)-1\right)\\ &\qquad-\left(2x^3-5x^2+4x-1\right). \end{aligned} $$

Expand each power and distribute its coefficient:

$$ \begin{aligned} f(x+h)-f(x) &=2x^3+6x^2h+6xh^2+2h^3-5x^2-10xh-5h^2\\ &\qquad+4x+4h-1-2x^3+5x^2-4x+1\\ &=6x^2h+6xh^2+2h^3-10xh-5h^2+4h. \end{aligned} $$

For \(h\ne 0\), divide every term by \(h\):

$$ \frac{f(x+h)-f(x)}{h} =6x^2+6xh+2h^2-10x-5h+4. $$

Now take the limit as \(h\to 0\):

$$ f'(x)=6x^2-10x+4. $$

Check against the general cubic calculation: here \(a=2\), \(b=-5\), and \(c=4\), so \(3ax^2+2bx+c=6x^2-10x+4\), agreeing with the difference quotient.

Worked Example: Evaluating a Derivative at a Selected Input

Let \(g(x)=x^3+2x^2-3x+4\). Find \(g'(1)\) directly from the difference quotient at \(x=1\).

First compute \(g(1)=1+2-3+4=4\). Then expand the shifted function:

$$ \begin{aligned} g(1+h) &=(1+h)^3+2(1+h)^2-3(1+h)+4\\ &=(1+3h+3h^2+h^3)+2(1+2h+h^2)-3-3h+4\\ &=4+4h+5h^2+h^3. \end{aligned} $$

Subtract \(g(1)\), divide by \(h\ne 0\), and take the limit:

$$ \begin{aligned} \frac{g(1+h)-g(1)}{h} &=\frac{(4+4h+5h^2+h^3)-4}{h}\\ &=\frac{4h+5h^2+h^3}{h}\\ &=4+5h+h^2,\\ g'(1)&=\lim_{h\to0}(4+5h+h^2)=4. \end{aligned} $$

Check using the general cubic result: \(a=1\), \(b=2\), and \(c=-3\), so \(g'(x)=3x^2+4x-3\). At \(x=1\), \(g'(1)=3+4-3=4\), which matches the direct limit.

Worked Example: A Cubic with Negative Coefficients

Let \(p(x)=-2x^3+3x^2+5x-6\). Find \(p'(-2)\) using the difference quotient.

First evaluate the function at the chosen input:

$$ p(-2)=-2(-8)+3(4)+5(-2)-6=16+12-10-6=12. $$

Now expand at \(-2+h\):

$$ \begin{aligned} p(-2+h) &=-2(-2+h)^3+3(-2+h)^2+5(-2+h)-6\\ &=-2(-8+12h-6h^2+h^3)+3(4-4h+h^2)-10+5h-6\\ &=16-24h+12h^2-2h^3+12-12h+3h^2-10+5h-6\\ &=12-31h+15h^2-2h^3. \end{aligned} $$

Subtract \(p(-2)=12\), divide by \(h\ne0\), and take the limit:

$$ \begin{aligned} \frac{p(-2+h)-p(-2)}{h} &=\frac{(12-31h+15h^2-2h^3)-12}{h}\\ &=\frac{-31h+15h^2-2h^3}{h}\\ &=-31+15h-2h^2,\\ p'(-2)&=\lim_{h\to0}(-31+15h-2h^2)=-31. \end{aligned} $$

Check with the general result: \(p'(x)=-6x^2+6x+5\). Substituting \(-2\) gives \(-6(4)+6(-2)+5=-24-12+5=-31\), as found from the limit.

When the Result Applies

The calculation applies to a polynomial of the form \(ax^3+bx^2+cx+d\) with real coefficients and \(a\ne0\), at any real input \(x\). The domain is all of \(\mathbb R\), and the simplified difference quotient has a finite limit for every such input. In fact, the algebra also covers the cases \(a=0\), but those are polynomials of degree at most two rather than cubic polynomials.

The order of operations matters: the original quotient is undefined at \(h=0\), so one must first simplify it for \(h\ne0\). The limit is then taken on the simplified expression. This is valid because a limit as \(h\to0\) concerns values at nonzero \(h\) near zero, not the value of the original quotient at zero.

Common Mistake: Cancelling Terms Instead of a Factor

A common error is to cancel parts of a sum as if they were common factors. For example, in the cube contribution one might write the following incorrect calculation:

$$ \frac{(x+h)^3-x^3}{h} \ne \frac{x^3+h^3-x^3}{h} =h^2. $$

The first equality is wrong: \((x+h)^3\) contains cross terms. The correct expansion is

$$ (x+h)^3=x^3+3x^2h+3xh^2+h^3. $$

Therefore the correct simplification is

$$ \frac{(x+h)^3-x^3}{h} =\frac{3x^2h+3xh^2+h^3}{h} =3x^2+3xh+h^2,\qquad h\ne0. $$

Taking the limit gives \(3x^2\), not \(h^2\). The cancellation is of the common factor \(h\) in the entire numerator, not cancellation of selected terms. As a quick check, at \(x=1\) the quotient approaches \(3\), consistent with the expanded expression \(3+3h+h^2\).

Why This Calculation Matters

The cubic case makes the structure of the first-principles method visible. Expanding the shifted input creates a constant part, terms involving \(h\), and higher powers of \(h\). Subtracting the original function removes the constant part. Dividing by \(h\) leaves a finite expression, and terms still containing \(h\) disappear in the limit.

This approach also provides a reliable way to check a proposed derivative value. At a specific input, expand \(f(x+h)\), subtract \(f(x)\), divide by the nonzero increment, and verify the limiting value. Careful algebra is especially useful when the coefficients are negative or the input is not zero.

Check Your Understanding

For each question, show the expansion and simplification before taking the limit.

  1. For \(f(x)=x^3-2x^2+x+3\), write and simplify \(\dfrac{f(x+h)-f(x)}{h}\) for \(h\ne0\), then find \(f'(x)\).
  2. For \(g(x)=2x^3+x^2-4\), find \(g'(0)\) directly from the difference quotient at zero.
  3. For \(p(x)=-x^3+4x^2-2x+1\), compute \(p'(2)\) from the definition and check the result using the general cubic formula.
  4. Why must \(h\) be nonzero when cancelling it in a difference quotient, and why can the limit still be taken as \(h\to0\)?
  5. Identify the error in the claim \((x+h)^3=x^3+h^3\), then give the correct expansion.

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