Kim’s Math NotesCourse index

Integrating Using Long Division and Completing the Square

When should I use polynomial division or complete the square before integrating?

Rewrite before integrating: divide when the top degree is at least the bottom degree, and complete the square to reach 1aarctanua.

ln right away, or the remainder dropped

Common mistake ∫x2+3x+1dx: u=x+1, so ln|x+1|; or divide and drop the remainder.

Correction Top degree ≥ bottom: divide. Quotient +remainderbottom: x−1+4x+1.

The rules, all in one place

First, the rules we'll need, all in one place. Completing the square: half of b, squared, builds the perfect square, and what's left over stays outside. Next: the integral of d u over u squared plus one is arctangent u, plus C. That's the derivative of arctangent, read backward. With a squared instead of one, it's one over a, times arctangent of u over a, plus C.

Don't drop that one over a.

Watch this part of the concept lesson

Read the rest of this scene

We'll check it by substitution soon. And the same idea under a root gives arcsine of u over a, plus C.

Top-heavy: divide first

Back to our fraction. Compare the degrees. The top has degree one, and so does the bottom. When the top's degree is greater than or equal to the bottom's, divide first. It's just like numbers: seven over two is three, plus one half.

Here, x plus three is one x plus one, with two left over. So the fraction equals one, plus two over x plus one. Keep that remainder. Now each piece is easy.

Watch this part of the concept lesson

Read the rest of this scene

One gives x. Two over x plus one, with u equal to x plus one, gives two log of the absolute value of x plus one. Plus C.

Quadratic bottom: complete the square

Next, take one over x squared plus six x plus ten. The bottom's derivative is two x plus six. The top is just one, so u equals the bottom won't work. Does the bottom factor? Check the discriminant: thirty-six minus forty is negative, so it doesn't factor.

So complete the square.

Watch this part of the concept lesson

Read the rest of this scene

Half of six is three, and three squared is nine. Ten is nine plus one: x plus three, squared, plus one. Now the inside is x plus three. Let u equal x plus three, so d u equals d x. That's the arctangent rule from the start: arctangent u, plus C, so arctangent of x plus three, plus C.

Why the one over a

Now let's check that one over a. Take one over x squared plus four. Factor four out of the bottom: one fourth times the integral of one over x over two, squared, plus one. The inside is x over two. Let u equal x over two.

Then d u equals one half d x, so d x equals two d u.

Watch this part of the concept lesson

Read the rest of this scene

One fourth times two is one half. So it's one half arctangent of x over two, plus C. That's exactly the rule with a equal to two. Not a new formula, just substitution.

Example 1: divide, then integrate

Example one. Find the integral of x squared plus three, over x plus one. The plan: the top has degree two, the bottom degree one. Two is at least one, so we use long division. Write the top with a zero x, so every power has its place.

x times what gives x squared? x. And x times x plus one is x squared plus x. Subtract that whole row: negative x plus three. One more round. Negative one times x plus one is negative x minus one. Subtract: three minus negative one is four.

So the quotient is x minus one, and the remainder is four: x minus one, plus four over x plus one. Integrate each term: x squared over two, minus x, plus four log of the absolute value of x plus one. Plus C.

Watch this part of the concept lesson

Read the rest of this scene

Check: differentiate, and you get back x minus one, plus four over x plus one. Problems one, three, and six in your workbook start with division. Try them.

Common mistakes: skip or drop

Two mistakes cost points here. One: writing log of x plus one right away. The top isn't the derivative of the bottom. Two: dividing, then dropping the remainder. Do this: divide first.

Keep the remainder, and it becomes four log of the absolute value of x plus one.

Watch this part of the concept lesson

Example 2: complete the square, then arctan

Example two, A. P. style. Find the integral from two to four of one over x squared minus four x plus eight. There are four choices. The plan: if the bottom won't factor, complete the square and use arctangent. Discriminant: sixteen minus thirty-two is negative, so no factoring.

Half of negative four is negative two.

Watch this part of the concept lesson

Read the rest of this scene

Squared, four. Eight is four plus four: x minus two, squared, plus four. Let u equal x minus two, so d u equals d x. And change the ends: two goes to zero, four goes to two. Now it's d u over u squared plus two squared.

So a equals two, and the rule gives one half, times arctangent of u over two. Arctangent of one is pi over four. Arctangent of zero is zero. Half of pi over four: pi over eight. So the answer is B.

Drop that one half, and you land on choice A. Problems two, four, and five b in your workbook complete the square. Try them.

Worked examples

Example 1

Find ∫x2+3x+1dx.
Hint

Top degree ≥ bottom degree: divide first.

Answer and solution

Answer x22−x+4ln|x+1|+C

  1. x2+3=(x+1)(x−1)+4
  2. x2+3x+1=x−1+4x+1
  3. ∫(x−1+4x+1)dx=x22−x+4ln|x+1|+C

Example 2

∫241x2−4x+8dx is
  1. π4
  2. π8
  3. π16
  4. 12ln2
Hint

The bottom has no real zeros: complete the square.

Answer and solution

Answer B. π8

  1. x2−4x+8=(x−2)2+4
  2. u=x−2: ends 0 to 2, and a=2.
  3. ∫02duu2+4=12[arctanu2]02=12⋅π4=π8
  4. Answer B.

Workbook

Problem 1

Find ∫x+5x+2dx.
Hint

Divide: x+5=(x+2)+3.

Answer and solution

Answer x+3ln|x+2|+C

  1. x+5=(x+2)+3→x+5x+2=1+3x+2
  2. ∫(1+3x+2)dx=x+3ln|x+2|+C

Common mistake Integrating top over bottom term by term without dividing.

Watch the worked solution to Problem 1

Problem 2

∫1x2+2x+2dx=
  1. ln(x2+2x+2)+C
  2. arctan(x+1)+C
  3. arctan(x+2)+C
  4. 12arctan(x+1)+C
Hint

Complete the square: (x+1)2+1.

Answer and solution

Answer B. arctan(x+1)+C

  1. x2+2x+2=(x+1)2+1
  2. u=x+1:∫duu2+1=arctan(x+1)+C
  3. Answer B. (The top is not the derivative of the bottom, so not ln.)

Common mistake Choosing ln: the top is not the derivative of the bottom.

Watch the worked solution to Problem 2

Problem 3

Find ∫2x2+xx−1dx.
Hint

Long division: 2x2+x=(x−1)(2x+3)+3.

Answer and solution

Answer x2+3x+3ln|x−1|+C

  1. 2x2+x−2x(x−1)=3x,3x−3(x−1)=3
  2. 2x2+x=(x−1)(2x+3)+3
  3. 2x2+xx−1=2x+3+3x−1
  4. ∫(2x+3+3x−1)dx=x2+3x+3ln|x−1|+C

Common mistake Forgetting the remainder term 3/(x - 1).

Watch the worked solution to Problem 3

Problem 4

∫1x2−6x+13dx=
  1. 12arctanx−32+C
  2. arctanx−32+C
  3. 12arctan(x−3)+C
  4. ln(x2−6x+13)+C
Hint

Complete the square: (x−3)2+4.

Answer and solution

Answer A. 12arctanx−32+C

  1. x2−6x+13=(x−3)2+4,a=2
  2. u=x−3:∫duu2+4=12arctanx−32+C
  3. Answer A.

Common mistake Forgetting the factor 1/2 from the square root of 4.

Watch the worked solution to Problem 4

Problem 5

Evaluate each integral.
  1. ∫01x2+2x2+1dx
  2. ∫−301x2+6x+18dx
Hint

(a) x2+2x2+1=1+1x2+1. (b) (x+3)2+9.

Answer and solution
  1. 1+π4
  2. π12
  1. 1+1x2+1→[x+arctanx]01=1+π4
  2. (x+3)2+9,u=x+3:0→3,13[arctanu3]03=π12

Common mistake Evaluating the arctan at the wrong ends.

Watch the worked solution to Problem 5

Problem 6

∫x2+4x+6x+2dx=
  1. x22+4x+6ln|x+2|+C
  2. x+2+2x+2+C
  3. x22+2x+2ln|x+2|+C
  4. x22+2x−2(x+2)2+C
Hint

x2+4x+6=(x+2)2+2.

Answer and solution

Answer C. x22+2x+2ln|x+2|+C

  1. x2+4x+6=(x+2)2+2
  2. x2+4x+6x+2=x+2+2x+2
  3. ∫(x+2+2x+2)dx=x22+2x+2ln|x+2|+C
  4. Answer C.

Common mistake Dividing wrongly so the remainder is lost.

Watch the worked solution to Problem 6