girgit.org

Integrals

A quadratic in the denominator? Complete the square

The big ideaAny quadratic \( ax^2 + bx + c \) can be rewritten by completing the square as a constant times (something)² ± (number)², so integrals with a quadratic in the denominator, with or without a root, fall into the six special forms.

In simple words

A messy expression like x² + 4x + 13 is really a perfect square in disguise, plus a leftover number. Once you see it as "(x + 2) squared, plus 9", it fits a pattern you already know how to finish. If there is also an x on top, split the top into "a bit that matches the bottom's slope" and "a plain number", and handle the two bits separately.

Step 1: complete the square

\[ ax^2 + bx + c = a\left[ \left( x + \frac{b}{2a} \right)^2 + \left( \frac{c}{a} - \frac{b^2}{4a^2} \right) \right]. \]

Put \( t = x + \frac{b}{2a} \), so dt = dx. The bracket becomes \( t^2 \pm k^2 \), with the sign decided by whether \( \frac{c}{a} - \frac{b^2}{4a^2} \) is positive or negative. Then \( \int \frac{dx}{ax^2 + bx + c} \) and \( \int \frac{dx}{\sqrt{ax^2 + bx + c}} \) are rows of the six-integral table.

Worked examples

  1. \( \int \frac{dx}{x^2 + 4x + 13} \). \( x^2 + 4x + 13 = (x + 2)^2 + 9 \). With t = x + 2 and a = 3: \( \frac{1}{3}\tan^{-1}\frac{x + 2}{3} + C \).
  2. \( \int \frac{dx}{x^2 - 6x + 5} \). \( (x - 3)^2 - 4 \): row 1 with a = 2, giving \( \frac{1}{4}\log\left| \frac{x - 5}{x - 1} \right| + C \).
  3. \( \int \frac{dx}{\sqrt{8 + 2x - x^2}} \). Take the minus sign inside first: \( 8 + 2x - x^2 = 9 - (x^2 - 2x + 1) = 9 - (x - 1)^2 \). Row 5: \( \sin^{-1}\frac{x - 1}{3} + C \).
  4. \( \int \frac{dx}{2x^2 + 4x + 10} \). Take out 2: \( \frac{1}{2}\int \frac{dx}{(x + 1)^2 + 4} = \frac{1}{4}\tan^{-1}\frac{x + 1}{2} + C \).

Guess first: \( \int \frac{dx}{\sqrt{3 - 2x - x^2}} \)

The square is \( x^2 + 2x + 1 = (x + 1)^2 \). Guess: is the denominator \( \sqrt{(x + 1)^2 - 4} \), giving a log?

See what happens
No, the minus in front of x² flips everything. \( 3 - 2x - x^2 = 3 - (x^2 + 2x) = 3 - [(x + 1)^2 - 1] = 4 - (x + 1)^2 \). This is "number minus square", row 5: \( \sin^{-1}\frac{x + 1}{2} + C \). Always factor out the sign of x² before you complete the square.

Try it: change b and c, or drag the lowest point of the parabola, and watch which row of the table you land in.

Step 2: an x on top, \( \int \frac{px + q}{ax^2 + bx + c}\,dx \)

Find numbers A and B with

\[ px + q = A\,\frac{d}{dx}(ax^2 + bx + c) + B = A(2ax + b) + B, \]

by matching the coefficient of x and the constant term. The A part has the derivative of the bottom on top, so it gives a log (the f′/f pattern). The B part is a plain constant over the quadratic, which Step 1 handles.

Worked example

\( \int \frac{3x + 1}{x^2 + 2x + 5}\,dx \).

  1. The derivative of the bottom is 2x + 2. Write 3x + 1 = A(2x + 2) + B. Matching x: 2A = 3, so \( A = \frac{3}{2} \). Matching constants: 2A + B = 1, so B = −2.
  2. The A part: \( \frac{3}{2}\int \frac{2x + 2}{x^2 + 2x + 5}\,dx = \frac{3}{2}\log(x^2 + 2x + 5) \). No modulus needed: the bottom is always positive.
  3. The B part: \( -2\int \frac{dx}{(x + 1)^2 + 4} = -2 \cdot \frac{1}{2}\tan^{-1}\frac{x + 1}{2} \).
  4. Answer: \( \frac{3}{2}\log(x^2 + 2x + 5) - \tan^{-1}\frac{x + 1}{2} + C \).

The root version, \( \int \frac{px + q}{\sqrt{ax^2 + bx + c}}\,dx \)

Split the top in exactly the same way. Now the A part is \( \int \frac{f'(x)}{\sqrt{f(x)}}\,dx = 2\sqrt{f(x)} \) (put t = f(x)), and the B part is a row of the table.

Worked example

\( \int \frac{x + 2}{\sqrt{x^2 + 2x + 3}}\,dx \). Write x + 2 = ½(2x + 2) + 1.

  1. A part: \( \frac{1}{2} \cdot 2\sqrt{x^2 + 2x + 3} = \sqrt{x^2 + 2x + 3} \).
  2. B part: \( \int \frac{dx}{\sqrt{(x + 1)^2 + 2}} = \log\left| x + 1 + \sqrt{x^2 + 2x + 3} \right| \) (row 6).
  3. Answer: \( \sqrt{x^2 + 2x + 3} + \log\left| x + 1 + \sqrt{x^2 + 2x + 3} \right| + C \).

Remember

  • Constant on top: complete the square, then use the six-integral table.
  • Linear on top: px + q = A(derivative of the bottom) + B. A gives a log (no root) or \( 2\sqrt{f(x)} \) (with a root); B goes back to the table.
  • If x² has a minus sign, take it out before completing the square.

Words to know

Completing the square
Rewriting x² + bx + c as (x + b/2)² plus a leftover number.
Comparing coefficients
Setting the x-terms and the constant terms on both sides equal to find A and B.
Derivative of the denominator
For ax² + bx + c it is 2ax + b; the A part of the top copies it.

Completing the square, \( x^2 - 8x + 25 \) is

  1. \( (x - 4)^2 + 9 \)
  2. \( (x - 8)^2 - 39 \)
  3. \( (x + 4)^2 + 9 \)

For \( \int \frac{2x + 5}{x^2 + 4x + 8}\,dx \), what are A and B in 2x + 5 = A(2x + 4) + B?

  1. A = 2, B = −3
  2. A = 1, B = 1
  3. A = 1, B = 5

\( \int \frac{dx}{\sqrt{5 - 4x - x^2}} \) equals

  1. \( \log\left| x + 2 + \sqrt{5 - 4x - x^2} \right| + C \)
  2. \( \sin^{-1}\frac{x + 2}{3} + C \)
  3. \( \sin^{-1}\frac{x - 2}{3} + C \)