Why Expand Before Differentiating?
A polynomial may be written as a sum of powers, such as \(x^3+2x-1\), or as a product of factors, such as \((x+1)(x-2)\). When the expression is written as a product, one useful method is to expand it first and then differentiate the resulting polynomial term by term.
This method uses algebra to rewrite the expression without changing its value. Once the product has become a sum of powers of \(x\), the power rule and the sum and difference rules apply directly. The order matters: first distribute and collect like terms; then differentiate.
The method in this tutorial applies when the factors are polynomials. It does not require a separate differentiation rule for products: the algebraic expansion turns the expression into a polynomial, whose derivative is covered by the polynomial derivative rules.
The Algebra Behind Expansion
The distributive law says that multiplying one term by a sum means multiplying it by every term in that sum. For example, \(a(b+c)=ab+ac\). With two sums, distribute each term in the first sum across every term in the second. Then combine terms that have the same power of \(x\).
For instance, multiplying \((x+2)(x+3)\) requires four products: \(x\cdot x\), \(x\cdot 3\), \(2\cdot x\), and \(2\cdot 3\). The middle two products are both multiples of \(x\), so they can be combined.
For larger factors, the same process applies. Every term in one factor must be multiplied by every term in the other factor. If there are three factors, it is often easiest to expand two of them first, simplify, and then multiply that result by the third.
From the Expanded Polynomial to Its Derivative
Once an expression is expanded and simplified, differentiate each term. For a nonnegative integer \(n\), the power rule gives \(\frac{d}{dx}x^n=nx^{n-1}\) when \(n\geq 1\), while the derivative of a constant is zero. The sum and difference rules allow the derivative to be taken term by term.
Before differentiating, it is important to combine like terms. For example, \(3x+2x=5x\). Keeping the terms separate would still allow term-by-term differentiation, but simplifying first makes the coefficients easier to track and the final derivative easier to read.
Worked Examples
Worked Example: A Product of Two Linear Factors
Expand \((x+2)(x+3)\), then find its derivative.
First distribute each term in the first factor across both terms in the second factor:
Now differentiate the simplified polynomial term by term. The derivative of \(x^2\) is \(2x\), the derivative of \(5x\) is \(5\), and the derivative of \(6\) is \(0\):
Check the expansion at \(x=1\). The original product gives \((1+2)(1+3)=3\cdot4=12\). The expanded polynomial gives \(1^2+5(1)+6=1+5+6=12\). The values agree. The derivative calculation also follows term by term: \(\frac{d}{dx}(x^2+5x+6)=2x+5\).
Worked Example: A Linear Factor and a Quadratic Factor
Expand \((2x-1)(x^2+x+3)\), then differentiate.
Multiply \(2x\) by each term of the quadratic, and then multiply \(-1\) by each term:
The two \(x^2\) terms combine to \(2x^2-x^2=x^2\), and the two \(x\) terms combine to \(6x-x=5x\). Differentiate the simplified polynomial:
Check the expansion at \(x=2\). The original product is \((4-1)(4+2+3)=3\cdot9=27\). The expanded polynomial is \(2(8)+4+5(2)-3=16+4+10-3=27\). For the derivative, differentiating each expanded term gives \(6x^2\), \(2x\), \(5\), and \(0\), respectively, so the result is \(6x^2+2x+5\).
Worked Example: Three Linear Factors
Expand \((x-2)(x+1)(x+3)\), then find its derivative. Expand the first two factors first:
Now multiply this result by the third factor, \(x+3\). Distribute both terms of \(x+3\) across all three terms of \(x^2-x-2\):
In the last line, \(-x^2+3x^2=2x^2\), and \(-2x-3x=-5x\). Differentiate the resulting polynomial:
Check the expansion at \(x=0\). The original product is \((-2)(1)(3)=-6\), while the expanded polynomial is \(0+0-0-6=-6\). The derivative is checked term by term: \(\frac{d}{dx}(x^3)=3x^2\), \(\frac{d}{dx}(2x^2)=4x\), \(\frac{d}{dx}(-5x)=-5\), and \(\frac{d}{dx}(-6)=0\). Their sum is \(3x^2+4x-5\).
Worked Example: A Repeated Linear Factor
Expand \((2x+1)^2\), then differentiate. A square means the factor is multiplied by itself:
Differentiate each term of the expanded polynomial:
Check the expansion at \(x=1\). The original expression is \((2+1)^2=9\); the expanded expression is \(4(1)^2+4(1)+1=4+4+1=9\). The derivative follows from the expanded terms: \(4x^2\) contributes \(8x\), \(4x\) contributes \(4\), and \(1\) contributes \(0\).
Why the Method Works
The essential reason is that expansion changes the form of an expression, not the function it defines. The distributive law guarantees that the product and its expanded polynomial have the same value for every real input. Equal functions have the same derivative wherever their derivatives exist. A polynomial has a derivative at every real input, and its derivative is found term by term using the power rule and the sum and difference rules.
This reasoning can be written for any two polynomials. Suppose \(P(x)=\sum_{i=0}^{m}a_ix^i\) and \(Q(x)=\sum_{j=0}^{n}b_jx^j\), where \(a_i\) and \(b_j\) are real coefficients. Applying distributivity to every pair of terms gives:
Terms with the same exponent can then be collected. The expression is still a polynomial, and it has the same value as the original product for every \(x\). By the polynomial derivative rule, differentiating that expanded expression gives its derivative. This establishes the method for products of two polynomial factors. Repeating the expansion one factor at a time handles any finite number of polynomial factors.
Multiply every term in one factor by every term in the other factor. For more than two factors, work through the factors in stages.
Add coefficients of terms with the same power of \(x\), keeping signs attached to their terms.
Apply the power rule to each positive power of \(x\), and replace the derivative of every constant by zero.
Substitute a convenient value into both the original product and the expanded polynomial. Confirm that the values match.
Common Mistake: Missing Cross Terms
A frequent error is to multiply only the first terms together and the constant terms together, leaving out the cross terms. For example, the incorrect calculation
omits \(x\cdot3\) and \(2\cdot x\). Those products are \(3x\) and \(2x\), so they must be included:
Differentiating the incorrect expression would give \(2x\), whereas differentiating the correct expansion gives \(2x+5\). The missing terms change the derivative. A reliable check is to count the pairwise products before simplifying: two binomials produce four products, and each one must appear in the expansion.
When This Method Is Useful
Expansion is especially useful when every factor is a polynomial and the resulting polynomial is manageable. It gives a direct route to a familiar term-by-term calculation and makes the coefficients and powers visible. It can also make it easier to compare two polynomial expressions or verify that an algebraic simplification is correct.
Careful bookkeeping is essential. In each multiplication, include every pair of terms; when collecting terms, combine only terms with the same exponent; and when differentiating, multiply each coefficient by its exponent and reduce the exponent by one. Constants disappear under differentiation, but their contributions during expansion still matter.
Check Your Understanding
For each question, expand and simplify before differentiating. Check each expansion by substituting a convenient value into both forms.
- Expand \((x+4)(x-1)\), then find its derivative.
- Expand \((3x+2)(x^2-1)\), then differentiate the resulting polynomial.
- Expand \((x-1)(x+2)(x+4)\), then find its derivative.
- What terms are missing from the incorrect expansion \((x+1)(x+5)=x^2+5\)? Write the correct expansion.
- Why should like powers be combined before presenting the final derivative?