Tutorials › Calculus II › Linear Numerators Over Irreducible Quadratics

Completing the Square Techniques · Tutorial 254 of 998

Linear Numerators Over Irreducible Quadratics

Rewrite the numerator using the derivative of the irreducible quadratic, then integrate and verify both resulting terms.

Intermediate 10 min read

What You'll Learn

  • Identify when a real quadratic is irreducible using its discriminant
  • Express a linear numerator as a multiple of the denominator’s derivative plus a constant
  • Derive the logarithmic and inverse-tangent contributions to the antiderivative
  • Apply a single formula to quadratics with positive or negative leading coefficients
  • Check an antiderivative by differentiating it and spot common coefficient errors

Why the Numerator Should Be Rewritten

A linear numerator over a quadratic denominator often contains two different kinds of contributions. One part may be proportional to the derivative of the denominator, producing a logarithm. What remains is a constant numerator, whose integral over an irreducible quadratic produces an inverse tangent.

The useful step is to separate these contributions before integrating. The method applies to a real quadratic with no real roots, so its denominator never vanishes on the real line. It works whether the leading coefficient is positive or negative.

Key idea: Write the numerator as a multiple of the denominator’s derivative plus a constant. Integrate the derivative part logarithmically and the constant part using the reciprocal-quadratic inverse-tangent formula.

Conditions and the Numerator Decomposition

Let \(Q(x)=ax^2+bx+c\), where \(a\ne 0\). Its discriminant is \(\Delta=b^2-4ac\). The quadratic is irreducible over the real numbers precisely when \(\Delta<0\). In that case \(Q(x)\ne 0\) for every real \(x\), and \(Q\) has the same sign as \(a\) everywhere.

The derivative of the denominator is \(Q'(x)=2ax+b\). For a linear numerator \(mx+n\), seek constants \(A\) and \(B\) such that \(mx+n=AQ'(x)+B\). Matching the coefficients of \(x\) and the constant terms gives \(2aA=m\) and \(bA+B=n\). Since \(a\ne0\), these equations have the solution below.

$$ mx+n = \frac{m}{2a}(2ax+b) + \left(n-\frac{mb}{2a}\right). $$

This identity splits the original integral into two simpler ones. The first has numerator \(Q'(x)\); the second has a constant numerator.

$$ \int \frac{mx+n}{Q(x)}\,dx = \frac{m}{2a}\int \frac{Q'(x)}{Q(x)}\,dx + \left(n-\frac{mb}{2a}\right)\int\frac{dx}{Q(x)}. $$

Because \(Q\) never vanishes, the logarithmic term is \(\ln|Q(x)|\). The absolute value is important when \(a<0\), since then \(Q(x)<0\) for every real \(x\).

The Reciprocal-Quadratic Term

For completeness, the inverse-tangent formula needed for the constant part follows directly from completing the square. Let \(D=-\Delta=4ac-b^2\), so \(D>0\). Set \(w=2ax+b\). Then \(dw=2a\,dx\), and the quadratic can be rewritten as \(Q(x)=(w^2+D)/(4a)\). Therefore:

$$ \int\frac{dx}{Q(x)} = \int \frac{4a\,dx}{w^2+D} = 2\int\frac{dw}{w^2+D} = \frac{2}{\sqrt D}\arctan\left(\frac{w}{\sqrt D}\right)+C. $$

The last equality follows by differentiating \(\arctan(w/\sqrt D)\), or by the standard derivative of the inverse tangent. This substitution does not require \(a>0\): the sign of \(a\) is already accounted for by \(dw=2a\,dx\).

Formula: If \(a\ne0\) and \(\Delta=b^2-4ac<0\), then
$$ \int \frac{mx+n}{ax^2+bx+c}\,dx = \frac{m}{2a}\ln|ax^2+bx+c| + \frac{2an-mb}{a\sqrt{-\Delta}} \arctan\left(\frac{2ax+b}{\sqrt{-\Delta}}\right)+C. $$

Here \(C\) is an arbitrary constant. The formula combines the numerator decomposition with the reciprocal-quadratic integral. In particular, the inverse-tangent coefficient is the constant left after the decomposition, \(n-mb/(2a)\), multiplied by \(2/\sqrt{-\Delta}\).

Why the Formula Works

The key derivative identities explain both terms and verify the combined result. Since \(Q(x)\ne0\), differentiating \(\ln|Q(x)|\) gives \(Q'(x)/Q(x)\). For the inverse-tangent term, write \(D=-\Delta>0\) and \(w=2ax+b\). Its derivative is:

$$ \begin{aligned} \frac{d}{dx}\left[ \frac{2}{\sqrt D}\arctan\left(\frac{w}{\sqrt D}\right) \right] &= \frac{2}{\sqrt D} \frac{w'}{\sqrt D} \frac{1}{1+w^2/D}\\ &= \frac{2}{\sqrt D} \frac{2a}{\sqrt D} \frac{D}{D+w^2}\\ &= \frac{4a}{D+w^2} = \frac{1}{Q(x)}. \end{aligned} $$

The final equality uses \(Q(x)=(w^2+D)/(4a)\), which holds for positive and negative \(a\). Thus the derivative of the proposed antiderivative is \(A Q'(x)/Q(x)+B/Q(x)\), where \(A=m/(2a)\) and \(B=n-mb/(2a)\). By the numerator identity, this is exactly \((mx+n)/Q(x)\).

1
Check the conditions.
Confirm \(a\ne0\) and \(\Delta<0\), so the denominator has no real zeros.
2
Split the numerator.
Use \(mx+n=\frac{m}{2a}(2ax+b)+\left(n-\frac{mb}{2a}\right)\).
3
Integrate each part.
The derivative-over-function part gives a logarithm; the constant-over-quadratic part gives an inverse tangent.
4
Verify by differentiation.
Differentiate the logarithmic and inverse-tangent terms and combine their numerators.

Worked Examples

Worked Example: A Positive-Leading Quadratic

Evaluate \(\int (3x+5)/(x^2+4x+13)\,dx\). Here \(a=1\), \(b=4\), \(c=13\), \(m=3\), and \(n=5\). The discriminant is \(\Delta=4^2-4(1)(13)=16-52=-36<0\), so the formula applies.

The denominator derivative is \(2x+4\). Decompose the numerator:

$$ 3x+5=\frac{3}{2}(2x+4)-1, $$

because \(\frac32(2x+4)-1=3x+6-1=3x+5\). Hence the integral is \(\frac32\int Q'(x)/Q(x)\,dx-\int dx/Q(x)\). Using \(\sqrt{-\Delta}=6\), its value is:

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

The quadratic is positive, since \(x^2+4x+13=(x+2)^2+9\), so writing its logarithm without absolute-value bars is valid. To check, the logarithmic term differentiates to \((3x+6)/Q(x)\). The derivative of \(\arctan((x+2)/3)\) is \(3/Q(x)\), so the inverse-tangent term differentiates to \(-1/Q(x)\). Their sum is \((3x+5)/Q(x)\), as required.

Worked Example: A Quadratic with a Nonunit Leading Coefficient

Evaluate \(\int (7x+1)/(2x^2-4x+5)\,dx\). The coefficients are \(a=2\), \(b=-4\), \(c=5\), \(m=7\), and \(n=1\). The discriminant is \(\Delta=(-4)^2-4(2)(5)=16-40=-24<0\).

The denominator derivative is \(4x-4\). The numerator decomposes as:

$$ 7x+1=\frac74(4x-4)+8, $$

since \(\frac74(4x-4)+8=7x-7+8=7x+1\). The logarithmic coefficient is \(7/4\). The constant part contributes \(8\cdot 2/\sqrt{24}=8/\sqrt6\) to the inverse-tangent coefficient. Thus:

$$ \int\frac{7x+1}{2x^2-4x+5}\,dx = \frac74\ln(2x^2-4x+5) + \frac{8}{\sqrt6} \arctan\left(\frac{4x-4}{2\sqrt6}\right)+C. $$

For the check, the logarithmic term differentiates to \(7(x-1)/Q(x)\). The derivative of the inverse-tangent factor \(\frac{2}{\sqrt{24}}\arctan((4x-4)/\sqrt{24})\) is \(1/Q(x)\), so the full inverse-tangent term differentiates to \(8/Q(x)\). Adding gives \((7x-7+8)/Q(x)=(7x+1)/Q(x)\).

Worked Example: A Negative-Leading Quadratic

Evaluate \(\int (4x+3)/(-x^2+2x-5)\,dx\). Here \(a=-1\), \(b=2\), \(c=-5\), \(m=4\), and \(n=3\). The discriminant is \(\Delta=2^2-4(-1)(-5)=4-20=-16<0\).

The denominator derivative is \(-2x+2\), and the numerator splits as:

$$ 4x+3=-2(-2x+2)+7. $$

Therefore the logarithmic coefficient is \(-2\), and the constant part contributes \(7\cdot2/4=7/2\) to the inverse-tangent coefficient. The antiderivative is:

$$ -2\ln|-x^2+2x-5| + \frac72\arctan\left(\frac{-2x+2}{4}\right)+C. $$

The absolute value matters: \(-x^2+2x-5=-((x-1)^2+4)<0\) for every real \(x\). To check, the logarithmic term differentiates to \(-2(-2x+2)/Q(x)=(4x-4)/Q(x)\). The inverse-tangent term differentiates to \(7/Q(x)\) by the reciprocal-quadratic identity. Together they give \((4x+3)/Q(x)\).

Common Mistake: Keeping Only the Logarithm

A frequent error is to notice the denominator’s derivative but assume the entire numerator is a multiple of it. For the first example, a mistaken calculation might write:

$$ \int\frac{3x+5}{x^2+4x+13}\,dx \overset{\text{wrong}}{=} \frac32\ln(x^2+4x+13)+C. $$

Differentiating this proposed answer gives \((3x+6)/(x^2+4x+13)\), not the original integrand with numerator \(3x+5\). The discrepancy is one unit in the numerator. The correction is to retain the leftover constant: \(3x+5=\frac32(2x+4)-1\). That \(-1\) produces the inverse-tangent term \(-\frac13\arctan((x+2)/3)\).

Another source of errors is changing the inverse-tangent coefficient when rewriting its argument. It is safest to keep the form \(\arctan((2ax+b)/\sqrt{-\Delta})\) until the formula has been applied. If the argument is then simplified, its derivative must still be accounted for in any direct check.

When This Method Is Useful

This method is especially useful when the numerator has degree one and the denominator is an irreducible quadratic. It identifies the two natural pieces directly, without requiring a more complicated substitution. The denominator’s derivative determines the logarithmic part; the remainder determines the size, sign, and presence of the inverse-tangent part. If the remainder is zero, the inverse-tangent contribution vanishes. If the numerator is already constant, the logarithmic contribution vanishes.

The discriminant condition is essential. If \(\Delta<0\), the denominator has no real zeros and the inverse-tangent formula applies on the whole real line. If \(\Delta\ge0\), the quadratic may have real zeros, and the integral can require a different form and careful attention to intervals that avoid those zeros. The formula here is specifically for irreducible real quadratics.

Takeaway: First match the numerator to the derivative of the quadratic, then keep and integrate the constant remainder. Checking by differentiation confirms that both pieces are necessary and that their coefficients are correct.

Check Your Understanding

Use the discriminant and numerator decomposition in each question. When you find an antiderivative, check it by differentiating.

  1. For \(Q(x)=3x^2+6x+7\), determine whether the irreducible-quadratic formula applies.
  2. Rewrite \(5x-2\) as a multiple of the derivative of \(x^2-2x+5\) plus a constant.
  3. In the formula, what happens to the inverse-tangent term when \(2an-mb=0\)?
  4. Why should the logarithm be written as \(\ln|Q(x)|\) when the leading coefficient may be negative?
  5. For \(\int (2x+1)/(x^2+1)\,dx\), identify the logarithmic coefficient and the constant remainder after decomposing the numerator.

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