Tutorials › Calculus II › Integrating Repeated Irreducible Quadratic Factors

Completing the Square Techniques · Tutorial 257 of 998

Integrating Repeated Irreducible Quadratic Factors

Complete the square and split a numerator to integrate repeated irreducible quadratic factors accurately.

Intermediate 9 min read

What You'll Learn

  • Recognize an irreducible quadratic and write it in completed-square form.
  • Split a linear numerator into a multiple of the denominator’s derivative and a constant remainder.
  • Integrate the derivative-based part of a squared quadratic term directly.
  • Derive and apply the formula for the reciprocal of a squared completed square.
  • Check an antiderivative by differentiating it and identify common errors.

Why Repeated Quadratic Factors Need a Careful Split

A rational integrand with a repeated quadratic denominator can look more complicated than it is. Its numerator may contain one part that matches the derivative of the quadratic and another part that does not. The matching part integrates directly; the remainder leads to a reciprocal squared completed square.

For example, in an expression of the form \((mx+n)/q(x)^2\), the derivative \(q'(x)\) is linear. Rewriting the numerator using \(q'(x)\) exposes a direct antiderivative, while completing the square in \(q(x)\) puts the remaining integral into a standard form.

Key idea: For a repeated irreducible quadratic denominator, complete the square first. Then split the linear numerator into a multiple of the quadratic’s derivative and a constant remainder.

Completing the Square and Splitting the Numerator

Let \(q(x)=Ax^2+Bx+C\), where \(A\ne 0\). The quadratic is irreducible over the real numbers when its discriminant satisfies \(B^2-4AC<0\). Completing the square gives

$$ q(x)=A\left((x-h)^2+d^2\right), \qquad h=-\frac{B}{2A}, \qquad d^2=\frac{4AC-B^2}{4A^2}>0. $$

The positivity of \(d^2\) is exactly what makes the quadratic irreducible. Also, \(q'(x)=2A(x-h)\). Thus a linear numerator can always be written as a multiple of \(q'(x)\) plus a constant:

$$ mx+n = \frac{m}{2A}q'(x)+(mh+n). $$

This follows because \(\frac{m}{2A}q'(x)=m(x-h)=mx-mh\); adding \(mh+n\) gives \(mx+n\). For a squared denominator, the derivative-based term integrates by the reverse chain rule:

$$ \int \frac{mx+n}{q(x)^2}\,dx = -\frac{m}{2Aq(x)} + (mh+n)\int\frac{dx}{q(x)^2}. $$

This identity separates the two tasks. The first term is already integrated. The remaining integral is handled by scaling the completed square and using a formula for the reciprocal of \((u^2+d^2)^2\).

The Reciprocal of a Squared Completed Square

For \(d>0\), define \(u=x-h\). The required basic integral is

$$ \int\frac{du}{(u^2+d^2)^2} = \frac{u}{2d^2(u^2+d^2)} + \frac{1}{2d^3}\arctan\left(\frac{u}{d}\right)+C. $$

Here \(C\) is an arbitrary constant of integration. This formula is valid for every real \(u\), since \(u^2+d^2\) is always positive when \(d>0\).

The scaling factor in the completed square matters. Since \(q(x)=A(u^2+d^2)\), it follows that

$$ \frac{1}{q(x)^2} = \frac{1}{A^2}\frac{1}{(u^2+d^2)^2}. $$

In particular, the factor is \(1/A^2\), which is positive whether \(A\) is positive or negative.

Why the Formula Works

A direct differentiation proves the formula and makes its two contributions clear. Differentiate its rational term:

$$ \frac{d}{du}\left(\frac{u}{2d^2(u^2+d^2)}\right) = \frac{d^2-u^2}{2d^2(u^2+d^2)^2}. $$

For the inverse-tangent term, the chain rule gives

$$ \frac{d}{du}\left(\frac{1}{2d^3}\arctan\left(\frac{u}{d}\right)\right) = \frac{1}{2d^2(u^2+d^2)}. $$

Writing the second derivative over the common denominator \(2d^2(u^2+d^2)^2\) gives a numerator of \(u^2+d^2\). Adding the two derivatives therefore yields

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

Thus differentiating the stated antiderivative gives exactly the integrand. The rational term and inverse-tangent term are both needed: together, rather than separately, they produce the squared denominator.

A Reliable Sequence of Steps

1
Complete the square.
Write the irreducible quadratic as \(A((x-h)^2+d^2)\), with \(d>0\).
2
Split the numerator.
Express \(mx+n\) as \(\frac{m}{2A}q'(x)+(mh+n)\).
3
Integrate the derivative-based part.
For a squared denominator, this part is \(-m/(2Aq(x))\).
4
Scale and integrate the remainder.
Use \(u=x-h\), retain the factor \(1/A^2\), and apply the squared completed-square formula.
5
Check by differentiation.
Differentiate the full result and compare it with the original integrand.

Worked Examples

Worked Example: A Shifted Quadratic and a Mixed Numerator

Evaluate \(\int (3x+5)/(x^2+4x+8)^2\,dx\).

First complete the square and set \(u=x+2\):

$$ x^2+4x+8=(x+2)^2+4=u^2+4, \qquad 3x+5=3u-1. $$

Separate the numerator into a derivative-based part and a constant. Since the derivative of \(u^2+4\) is \(2u\), the term \(3u\) is \(\frac{3}{2}(2u)\). Therefore

$$ \int\frac{3u-1}{(u^2+4)^2}\,du = \frac{3}{2}\int\frac{2u}{(u^2+4)^2}\,du - \int\frac{du}{(u^2+4)^2}. $$

For the first integral, use \(w=u^2+4\), so \(dw=2u\,du\):

$$ \frac{3}{2}\int w^{-2}\,dw = -\frac{3}{2w} = -\frac{3}{2(u^2+4)}. $$

For the second integral, use the formula with \(d=2\):

$$ \int\frac{du}{(u^2+4)^2} = \frac{u}{8(u^2+4)} + \frac{1}{16}\arctan\left(\frac{u}{2}\right). $$

Combining the terms and returning to \(x\), an antiderivative is

$$ -\frac{3}{2(x^2+4x+8)} -\frac{x+2}{8(x^2+4x+8)} -\frac{1}{16}\arctan\left(\frac{x+2}{2}\right)+C. $$

To check, differentiate using \(u=x+2\) and \(q=u^2+4\). The derivative of the first term is \(3u/q^2\). The derivatives of the last two terms together are \(-1/q^2\), as in the formula proof. Their sum is \((3u-1)/q^2=(3x+5)/(x^2+4x+8)^2\), the original integrand.

Worked Example: Accounting for a Leading Coefficient

Evaluate \(\int 6/(2x^2-8x+10)^2\,dx\).

Complete the square, setting \(u=x-2\):

$$ 2x^2-8x+10 = 2\left((x-2)^2+1\right) = 2(u^2+1). $$

Squaring the denominator gives a factor of \(2^2=4\), so

$$ \int\frac{6}{(2x^2-8x+10)^2}\,dx = \frac{3}{2}\int\frac{du}{(u^2+1)^2}. $$

Apply the formula with \(d=1\), then substitute \(u=x-2\):

$$ \frac{3}{2}\left( \frac{u}{2(u^2+1)}+\frac{1}{2}\arctan u \right)+C = \frac{3(x-2)}{4((x-2)^2+1)} + \frac{3}{4}\arctan(x-2)+C. $$

For the check, the derivative of the rational term is \(\frac{3}{4}(1-u^2)/(u^2+1)^2\), and the derivative of the inverse-tangent term is \(\frac{3}{4}(u^2+1)/(u^2+1)^2\). Their sum is \(\frac{3}{2}/(u^2+1)^2\), which equals \(6/[2(u^2+1)]^2\), the original integrand.

Worked Example: A Derivative Term Plus a Constant Remainder

Evaluate \(\int (2x+3)/(x^2+1)^2\,dx\).

The denominator’s quadratic is already in completed-square form, with \(u=x\) and \(d=1\). Its derivative is \(2x\), so split the numerator:

$$ 2x+3=2x+3. $$

The first part integrates by substitution \(w=x^2+1\), \(dw=2x\,dx\). The remaining constant part uses the squared-quadratic formula:

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

Equivalently, the antiderivative is \(-1/(x^2+1)+3x/[2(x^2+1)]+(3/2)\arctan x+C\). To check, the derivative of the first term is \(2x/(x^2+1)^2\). The derivatives of the two terms multiplied by \(3\) add to \(3/(x^2+1)^2\), by the formula already verified. Their total is exactly \((2x+3)/(x^2+1)^2\).

Common Pitfalls

A frequent error is to treat every numerator as if it were a multiple of the denominator’s derivative. For instance, with numerator \(3u-1\) over \((u^2+4)^2\), a mistaken calculation might write

$$ \int\frac{3u-1}{(u^2+4)^2}\,du \overset{\text{wrong}}{=} -\frac{3}{2(u^2+4)}. $$

This drops the constant \(-1\). Differentiating the proposed answer gives \(3u/(u^2+4)^2\), not \((3u-1)/(u^2+4)^2\). The correction is to keep the remainder and integrate it separately:

$$ \int\frac{3u-1}{(u^2+4)^2}\,du = -\frac{3}{2(u^2+4)} - \left( \frac{u}{8(u^2+4)}+\frac{1}{16}\arctan\left(\frac{u}{2}\right) \right)+C. $$

Another error is to lose the leading coefficient when completing the square. If \(q(x)=A(u^2+d^2)\), then \(q(x)^2=A^2(u^2+d^2)^2\); the residual integral therefore carries \(1/A^2\). Finally, the squared-quadratic formula requires \(d>0\). If the quadratic is not irreducible, this completed-square form with positive \(d^2\) does not apply.

When This Split Is Useful

Repeated irreducible quadratic factors arise when rational integrands contain powers of a quadratic that has no real roots. The numerator split is useful because it isolates the portion directly related to the denominator’s rate of change. Completing the square then reveals the constant-remainder integral as a reciprocal squared distance from a shifted center, whose antiderivative combines a rational term with an inverse tangent.

For a squared denominator, the process is complete once both pieces have been integrated. With higher powers, the same numerator split can still isolate a derivative-based term, but the remaining reciprocal power is a distinct integral that may require additional methods. It is important not to apply the squared-denominator formula to a different power.

Takeaway: For \((mx+n)/q(x)^2\), rewrite the numerator using \(q'(x)\) plus a constant, complete the square in \(q(x)\), retain the square of its leading coefficient, and check the result by differentiation.

Check Your Understanding

For each question, identify the quadratic form or numerator split before attempting the integration.

  1. Complete the square in \(3x^2+12x+15\), and state the values of \(A\), \(h\), and \(d\).
  2. Write \(5x-1\) as a multiple of the derivative plus a constant for \(q(x)=x^2-4x+7\).
  3. Why does the residual integral from \(1/[A^2((x-h)^2+d^2)^2]\) contain \(A^2\), rather than \(A\)?
  4. Differentiate the formula for \(\int du/(u^2+d^2)^2\) and explain how the two derivative terms combine.
  5. What error occurs if the constant remainder in a linear numerator is discarded?

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