Tutorials › Calculus II › Factoring, Expanding, and Cancelling Strategically

Integration Strategy · Tutorial 3 of 998

Factoring, Expanding, and Cancelling Strategically

Compare algebraic rewrites before integrating, and choose the form that makes the next step clearer without changing the integrand’s domain.

Beginner 9 min read

What You'll Learn

  • Decide when factoring makes a useful structure visible.
  • Recognize when expansion produces a simpler polynomial integrand.
  • Cancel only common factors, and track excluded input values.
  • Use a factored expression to set up a straightforward substitution.
  • Factor a denominator to expose a simple rational decomposition.
  • Verify each antiderivative by differentiation.

Why Rewrite an Integrand?

An integrand can be written in several algebraically equivalent ways. Those forms need not be equally convenient to integrate. Factoring can expose common factors or a useful pattern; expanding can turn a product into a polynomial; cancelling can remove a common factor from a quotient. The strategic question is not simply which form looks shortest. It is which form makes a valid next step easiest to see.

For instance, a product involving \(2x\) and a power of \(x^2+4\) may suggest changing variables, while expanding the same product creates several polynomial terms. In a rational function, factoring the denominator may reveal a sum of simpler fractions. In another expression, expansion may be the most direct route to an elementary antiderivative.

Key idea: Rewriting is useful when it reveals structure or reduces work. Every rewrite must preserve the expression wherever the original integrand is defined, and any change to the domain must be recorded.

Three Algebraic Moves

Factoring expresses a sum or polynomial as a product. For example, \(x^2-9=(x-3)(x+3)\). This form can reveal common factors or split a denominator into factors.

Expanding uses the distributive law to write a product as a sum. For example, \((x+1)(x-2)=x^2-x-2\). This can be useful when the resulting terms are simple powers of \(x\).

Cancelling removes a common multiplicative factor from the numerator and denominator of a fraction. It is valid only when that factor is nonzero. In particular, terms within a sum cannot be cancelled separately.

Domain condition: If a factor is cancelled from a rational expression, the simplified expression agrees with the original only where the original denominator is nonzero. Cancellation does not put an excluded input back into the original domain.

Worked Example: Factoring and Cancelling a Common Factor

Worked Example: Simplifying a Quotient Before Integrating

Find an antiderivative of \(\frac{x^2-9}{x-3}\), keeping track of the original domain.

The denominator is zero at \(x=3\), so the original integrand is defined only when \(x\ne 3\). Factor the numerator:

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

For \(x\ne 3\), the common factor can be cancelled:

$$ \frac{(x-3)(x+3)}{x-3}=x+3. $$

Thus, on any interval that does not contain \(3\), integrate the simpler expression:

$$ \int \frac{x^2-9}{x-3}\,dx = \int (x+3)\,dx = \frac{x^2}{2}+3x+C. $$

Here the antiderivative applies separately on intervals such as \((-\infty,3)\) and \((3,\infty)\); the constants on those intervals need not be the same. Check by differentiating the proposed antiderivative:

$$ \frac{d}{dx}\left(\frac{x^2}{2}+3x+C\right) =x+3 =\frac{x^2-9}{x-3}, \qquad x\ne 3. $$

The derivative agrees with the original integrand at every point where that integrand is defined. It does not follow that the original quotient is defined at \(x=3\).

Why Factoring Can Reveal a Substitution

Factoring is especially helpful when one factor is the derivative of another expression appearing repeatedly. This does not mean every product should be factored or that every such expression must be integrated by substitution. It means that preserving the factors can make a candidate change of variable visible before the expression becomes a longer sum.

The reason a suitable substitution works is the chain rule in reverse. If \(u=g(x)\) and \(H'(u)=h(u)\), then the chain rule gives \(\frac{d}{dx}H(g(x))=h(g(x))g'(x)\). Thus an integrand of the form \(h(g(x))g'(x)\) has the antiderivative \(H(g(x))\). Factoring or leaving an expression in product form can make these roles easier to identify.

Worked Example: Keeping a Product Form for Substitution

Worked Example: A Power of a Quadratic Expression

Evaluate \(\int 2x(x^2+4)^3\,dx\). The factored form shows the repeated inner expression \(x^2+4\) and its derivative \(2x\). Set \(u=x^2+4\), so \(du=2x\,dx\):

$$ \int 2x(x^2+4)^3\,dx = \int u^3\,du = \frac{u^4}{4}+C = \frac{(x^2+4)^4}{4}+C. $$

To see why expansion is less direct here, expand the cubic first:

$$ (x^2+4)^3=x^6+12x^4+48x^2+64, $$

and then multiply by \(2x\):

$$ 2x(x^2+4)^3 = 2x^7+24x^5+96x^3+128x. $$

Integrating those powers gives \(\frac{x^8}{4}+4x^6+24x^4+64x^2\), which is equivalent to the compact answer up to the constant, but requires more terms. Check the compact answer directly:

$$ \frac{d}{dx}\left(\frac{(x^2+4)^4}{4}\right) = \frac14\cdot4(x^2+4)^3\cdot2x = 2x(x^2+4)^3. $$

The factored form was preferable because it displayed the inner expression and its derivative together.

Factoring a Denominator to Expose a Decomposition

For a rational integrand, factoring the denominator can reveal whether the expression can be written as a sum of simpler fractions. A decomposition is useful only if its coefficients are correct and the resulting terms are easier to integrate. The example below is a direct case with distinct linear factors; it is an illustration of why factoring can help, not a general rule for every rational function.

Worked Example: Factoring Before Decomposing

Worked Example: Two Linear Denominator Factors

Find an antiderivative of \(\frac{3x+5}{x^2+3x+2}\). Factor the denominator:

$$ x^2+3x+2=(x+1)(x+2). $$

Seek constants \(A\) and \(B\) such that

$$ \frac{3x+5}{(x+1)(x+2)} = \frac{A}{x+1}+\frac{B}{x+2}. $$

Combining the fractions gives the numerator \(A(x+2)+B(x+1)\). Matching coefficients with \(3x+5\) yields

$$ A+B=3,\qquad 2A+B=5. $$

Subtract the first equation from the second: \(A=2\). Then \(2+B=3\), so \(B=1\). Therefore, wherever \(x\ne -1,-2\),

$$ \frac{3x+5}{(x+1)(x+2)} = \frac{2}{x+1}+\frac{1}{x+2}. $$

Integrate the two terms:

$$ \int \frac{3x+5}{x^2+3x+2}\,dx = 2\ln|x+1|+\ln|x+2|+C. $$

Check by differentiation and combine the fractions:

$$ \frac{d}{dx}\left(2\ln|x+1|+\ln|x+2|\right) = \frac{2}{x+1}+\frac{1}{x+2} = \frac{2(x+2)+(x+1)}{(x+1)(x+2)} = \frac{3x+5}{x^2+3x+2}. $$

The original integrand is undefined at \(-1\) and \(-2\), so the antiderivative is understood on intervals that avoid those points.

When Expansion Is the Better Choice

Expansion is not the opposite of strategy; it is another strategic option. If multiplying out a product produces a short polynomial, then the power rule can make integration immediate. In contrast, preserving factors is often more useful when they expose a common factor, a repeated inner expression, or a denominator structure. The deciding factor is the work required after the rewrite, not whether a form is factored or expanded.

Worked Example: Expanding a Product into a Polynomial

Worked Example: A Product with No Useful Inner Pairing

Find an antiderivative of \((x+1)(x-2)\). Expanding gives

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

Integrate the resulting powers:

$$ \int (x^2-x-2)\,dx = \frac{x^3}{3}-\frac{x^2}{2}-2x+C. $$

Check by differentiating:

$$ \frac{d}{dx}\left(\frac{x^3}{3}-\frac{x^2}{2}-2x+C\right) = x^2-x-2 = (x+1)(x-2). $$

Here expansion exposes a simple sum of powers. No common factor or repeated inner expression makes the unexpanded product more advantageous.

A Common Mistake: Cancelling Terms Instead of Factors

Cancellation is valid for a common factor of the entire numerator and denominator, not for parts of sums. For example, the following calculation is wrong:

$$ \frac{x+2}{x+5} \;\not=\; \frac{2}{5}. $$

This would amount to cancelling the \(x\) terms even though \(x\) is not a factor multiplying the whole numerator and denominator. A numerical check at \(x=1\) confirms the error: the original fraction is \(\frac{3}{6}=\frac12\), whereas the proposed result is \(\frac25\).

The correct procedure is to factor the numerator and denominator and cancel only an identical factor that multiplies each whole expression. If no such factor exists, do not cancel. Also check where a cancelled factor is zero: the simplified expression may have a larger domain than the original quotient.

A Practical Choice of Form

1
Inspect the original expression.
Identify products, sums, common factors, and denominator factors before changing the form.
2
Try factoring when structure may matter.
Look for a common factor to cancel, a repeated inner expression, or factors in a denominator that may support a simpler decomposition.
3
Try expansion when a short polynomial results.
Compare the expanded terms with the power rule rather than assuming that a product must be kept intact.
4
Check the domain and verify.
Record excluded inputs from the original denominator, then differentiate the proposed antiderivative to check it against the original integrand on its domain.

These are choices of representation, not competing integration rules. A useful rewrite leaves the value of the integrand unchanged where it is defined and makes the next mathematical step clearer. Sometimes factoring is best; sometimes expansion is best; sometimes cancellation removes clutter. When no rewrite gives a clear advantage, keep the original form and reassess the structure rather than manipulating it automatically.

Check Your Understanding

For each question, pay attention both to algebraic structure and to the original domain.

  1. Factor \(\frac{x^2-16}{x-4}\). For which values of \(x\) does the original expression exist?
  2. Should you expand or preserve \(2x(x^2+1)^4\) if you want to look for a substitution based on \(x^2+1\)? Explain what feature you would inspect.
  3. Factor the denominator in \(\frac{2x+3}{x^2+3x+2}\). What simple fraction terms might a decomposition use?
  4. Explain why cancelling the \(x\) terms in \(\frac{x+3}{x+7}\) is not valid.
  5. Expand \((x-1)(x+4)\), find an antiderivative of the resulting polynomial, and check it by differentiation.

Test yourself: Calculus II 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