AP Calculus AB · Topic 6.10 · Reading guide, about 4 min

Algebra first: reshaping fractions before integrating

Polynomial long division and completing the square to rewrite rational and radical integrands into logarithm, arctangent and arcsine forms.

In one minute

Some integrals look impossible until you change their shape. A fraction whose numerator has degree at least as large as its denominator's can be divided out into a polynomial plus a simpler fraction. A quadratic that will not factor can be rewritten as a square plus a constant, which exposes an inverse trig form.

Neither move is new calculus. Both are algebra done on purpose, so that the integrand matches one of the basic antiderivatives from 6.8 or a substitution from 6.9.

Key terms

Polynomial long division
Dividing one polynomial by another to get a quotient and a remainder, so ND=quotient+remainderD\frac{N}{D}=\text{quotient}+\frac{\text{remainder}}{D}.
Proper fraction
A rational expression whose numerator has smaller degree than its denominator. Long division is not needed.
Improper fraction
A rational expression whose numerator has degree at least that of the denominator. Divide first.
Completing the square
Rewriting x2+bx+cx^2+bx+c as (x+h)2+k(x+h)^2+k by adding and subtracting (b2)2\left(\frac b2\right)^2.
Arctangent form
∫1a2+u2 du=1aarctan⁡ua+C\int\frac{1}{a^2+u^2}\,du=\frac1a\arctan\frac ua+C, for a constant a>0a>0.
Arcsine form
∫1a2−u2 du=arcsin⁡ua+C\int\frac{1}{\sqrt{a^2-u^2}}\,du=\arcsin\frac ua+C, for a constant a>0a>0.
Linear substitution
Setting u=x+hu=x+h, so du=dxdu=dx. It turns (x+h)2+k(x+h)^2+k into u2+ku^2+k without changing the integral's shape.

Long division when the top is too big

The integrals ∫1x−1 dx\int\frac{1}{x-1}\,dx and ∫xx2+1 dx\int\frac{x}{x^2+1}\,dx are fine as written. But ∫x2+1x−1 dx\int\frac{x^2+1}{x-1}\,dx has a numerator of degree 2 over a denominator of degree 1, so none of the basic rules applies directly. Divide first.

Divide x2+1x^2+1 by x−1x-1. The first term of the quotient is xx, since x(x−1)=x2−xx(x-1)=x^2-x. Subtract: (x2+1)−(x2−x)=x+1(x^2+1)-(x^2-x)=x+1. The next quotient term is 11, since 1(x−1)=x−11(x-1)=x-1. Subtract: (x+1)−(x−1)=2(x+1)-(x-1)=2. So x2+1=(x−1)(x+1)+2x^2+1=(x-1)(x+1)+2, giving x2+1x−1=x+1+2x−1\frac{x^2+1}{x-1}=x+1+\frac{2}{x-1}.

Now integrate term by term: ∫(x+1+2x−1)dx=x22+x+2ln⁡∣x−1∣+C\int\left(x+1+\frac2{x-1}\right)dx=\frac{x^2}{2}+x+2\ln|x-1|+C. Check by differentiating: x+1+2x−1x+1+\frac{2}{x-1}. Combining over x−1x-1 gives (x+1)(x−1)+2x−1=x2+1x−1\frac{(x+1)(x-1)+2}{x-1}=\frac{x^2+1}{x-1}, the original integrand. The remainder over the denominator gives a logarithm, by a quick substitution u=x−1u=x-1.

Which reshaping move fits which integrand
Integrand formMoveResult type
Numerator degree ≥\ge denominator degreePolynomial long divisionPolynomial terms plus logarithm or inverse trig
1x2+bx+c\frac{1}{x^2+bx+c}, quadratic with no real rootsComplete the square, then use u=x+hu=x+hArctangent
1c−bx−x2\frac{1}{\sqrt{c-bx-x^2}}, quadratic under a rootComplete the square so it reads a2−u2a^2-u^2Arcsine
2x+bx2+bx+c\frac{2x+b}{x^2+bx+c}, numerator is the derivative of the denominatoru-substitution with uu equal to the denominatorLogarithm

Completing the square

For ∫1x2+4x+13 dx\int\frac{1}{x^2+4x+13}\,dx, no factors with real roots exist, because the discriminant 16−5216-52 is negative. Complete the square: x2+4x+13=(x2+4x+4)+9=(x+2)2+9x^2+4x+13=(x^2+4x+4)+9=(x+2)^2+9.

Let u=x+2u=x+2, so du=dxdu=dx. The integral becomes ∫1u2+9 du\int\frac{1}{u^2+9}\,du, which has arctangent form with a=3a=3: 13arctan⁡u3+C=13arctan⁡x+23+C\frac13\arctan\frac u3+C=\frac13\arctan\frac{x+2}{3}+C.

Check by differentiating. The derivative of 13arctan⁡x+23\frac13\arctan\frac{x+2}{3} is 13⋅11+(x+23)2⋅13=19+(x+2)2=1x2+4x+13\frac13\cdot\frac{1}{1+\left(\frac{x+2}{3}\right)^2}\cdot\frac13=\frac{1}{9+(x+2)^2}=\frac{1}{x^2+4x+13}, which is correct.

The radical version is similar. For ∫18−2x−x2 dx\int\frac{1}{\sqrt{8-2x-x^2}}\,dx, rewrite 8−2x−x2=9−(x2+2x+1)=9−(x+1)28-2x-x^2=9-(x^2+2x+1)=9-(x+1)^2. With u=x+1u=x+1 and a=3a=3 the integral becomes arcsin⁡x+13+C\arcsin\frac{x+1}{3}+C.

For a definite example, ∫021x2+4 dx=12[arctan⁡x2]02=12(arctan⁡1−arctan⁡0)=12⋅π4=π8\int_0^2\frac{1}{x^2+4}\,dx=\frac12\left[\arctan\frac x2\right]_0^2=\frac12(\arctan1-\arctan0)=\frac12\cdot\frac{\pi}{4}=\frac\pi8. When the numerator is the derivative of the denominator, as in 2x+4x2+4x+13\frac{2x+4}{x^2+4x+13}, the integral is ln⁡(x2+4x+13)+C\ln(x^2+4x+13)+C instead, since that denominator is always positive.

Spotting which case you are in

Ask three questions in order. First, compare degrees: if the numerator is not smaller, divide. Second, look at the numerator of what remains: if it is a constant multiple of the denominator's derivative, use a logarithm. Third, if the denominator is an irreducible quadratic with a constant numerator, complete the square and use arctangent.

A quick test for the quadratic x2+bx+cx^2+bx+c is the discriminant b2−4cb^2-4c. A negative value means no real roots, so the square completes to (x+h)2+k(x+h)^2+k with k>0k>0. A square under a root needs the form a2−(x+h)2a^2-(x+h)^2, so the leading coefficient of x2x^2 must be negative there. If a quadratic denominator factors into two different real linear pieces (positive discriminant) and the numerator is not a multiple of its derivative, the integral needs partial fractions, which this course does not ask for, so expect a different setup. A perfect square is the exception: ∫1x2+2x+1 dx=∫1(x+1)2 dx=−1x+1+C\int\frac{1}{x^2+2x+1}\,dx=\int\frac{1}{(x+1)^2}\,dx=-\frac{1}{x+1}+C by the substitution u=x+1u=x+1.

Combining the moves

A numerator that is not purely the derivative of the denominator often splits into a derivative part plus a constant. For ∫2x+7x2+4x+13 dx\int\frac{2x+7}{x^2+4x+13}\,dx, the derivative of the denominator is 2x+42x+4, so write 2x+7=(2x+4)+32x+7=(2x+4)+3. The first piece gives ∫2x+4x2+4x+13 dx=ln⁡(x2+4x+13)+C\int\frac{2x+4}{x^2+4x+13}\,dx=\ln(x^2+4x+13)+C. The second piece is 3∫1(x+2)2+9 dx=3⋅13arctan⁡x+23=arctan⁡x+233\int\frac{1}{(x+2)^2+9}\,dx=3\cdot\frac13\arctan\frac{x+2}{3}=\arctan\frac{x+2}{3}.

The full answer is ln⁡(x2+4x+13)+arctan⁡x+23+C\ln(x^2+4x+13)+\arctan\frac{x+2}{3}+C. Check: the second term has derivative 39+(x+2)2=3x2+4x+13\frac{3}{9+(x+2)^2}=\frac{3}{x^2+4x+13} and the first has derivative 2x+4x2+4x+13\frac{2x+4}{x^2+4x+13}. These add to 2x+7x2+4x+13\frac{2x+7}{x^2+4x+13}, as required.

Long division can also feed the other tools. For ∫x3+2x2+1 dx\int\frac{x^3+2}{x^2+1}\,dx, note that x3+2=x(x2+1)−x+2x^3+2=x(x^2+1)-x+2, so the fraction equals x+2−xx2+1x+\frac{2-x}{x^2+1}. Then split the remainder: ∫2x2+1 dx=2arctan⁡x\int\frac{2}{x^2+1}\,dx=2\arctan x and ∫−xx2+1 dx=−12ln⁡(x2+1)\int\frac{-x}{x^2+1}\,dx=-\frac12\ln(x^2+1). The answer is x22+2arctan⁡x−12ln⁡(x2+1)+C\frac{x^2}{2}+2\arctan x-\frac12\ln(x^2+1)+C. Differentiating gives x+2x2+1−xx2+1=x+2−xx2+1x+\frac{2}{x^2+1}-\frac{x}{x^2+1}=x+\frac{2-x}{x^2+1}, matching the division.

How it connects

  • Back to 3.4: arctangent and arcsine appear here because their derivatives are 11+x2\frac1{1+x^2} and 11−x2\frac{1}{\sqrt{1-x^2}}.
  • Back to 6.8: the final forms are the basic antiderivatives, so memorize that list well.
  • Back to 6.9: the logarithm cases and the shift u=x+hu=x+h are both u-substitutions.
  • Forward to 6.14: this is one of the five tools you must choose among by looking at the integrand.

Common mistakes

  • Skipping long division. Integrating x2+1x−1\frac{x^2+1}{x-1} as if it were 1x−1\frac{1}{x-1} gives a wrong answer. Check degrees first.
  • **Forgetting the factor 1a\frac1a in the arctangent form.** For 1x2+9\frac{1}{x^2+9} the answer is 13arctan⁡x3\frac13\arctan\frac x3, not just arctan⁡x3\arctan\frac x3.
  • Completing the square with the wrong constant. Add (b2)2\left(\frac b2\right)^2 and subtract the same amount, then check by expanding.
  • Splitting the denominator. 1x2+4\frac{1}{x^2+4} is not 1x2+14\frac1{x^2}+\frac14. Fractions split on a sum in the numerator only.

How it shows up on the exam

  • Rational integrands where the numerator degree matches or exceeds the denominator, needing division before integrating.
  • Quadratic denominators that do not factor, or quadratics inside a root, needing completed squares and an inverse trig answer.
  • Multiple-choice items that give a form such as 1x2+2x+5\frac{1}{x^2+2x+5} and ask for its antiderivative or the exact value of a definite integral, where checking an answer choice by differentiating is a fast backup.

Check yourself

  1. How can you tell, before doing any work, that ∫x3+2x2+1 dx\int\frac{x^3+2}{x^2+1}\,dx needs long division?
  2. Why does x2+6x+10x^2+6x+10 lead to arctangent while x2+6x+8x^2+6x+8 does not?
  3. What is the antiderivative of 1x2+25\frac{1}{x^2+25}, and where does the constant factor come from?
  4. For 15−4x−x2\frac{1}{\sqrt{5-4x-x^2}}, what completed-square form do you reach?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.