Achievable logoAchievable logo
AP Calculus AB
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Limits
2. Derivative basics
3. Advanced differentiation
4. Contextual uses
5. Analytical uses
6. Integration
6.1 Accumulation of change
6.2 Riemann sums & area
6.3 Definite integrals
6.4 Accumulation functions
6.5 Behavior of accumulation functions
6.6 Fundamental theorem of calculus
6.7 Indefinite integrals
6.8 u-substitution
6.9 Long division & completing the square
7. Differential equations
8. Applications of integrals
9. Testing details tag
10. test
Wrapping up
Achievable logoAchievable logo
6.9 Long division & completing the square
Achievable AP Calculus AB
6. Integration
Our AP Calculus AB course is currently in development and is a work-in-progress.

Long division & completing the square

5 min read
Font
Discuss
Share
Feedback

What you’ll learn:

  • Other integration techniques to simplify integrals into recognizable forms
  • More integrals involving inverse trig functions

In this section, we introduce two more techniques to rearrange an integral into a more recognizable form, so that integration rules or u-substitution can be used.

  1. Long division
  2. Completing the square

Long division

When integrating a rational function where the degree of the numerator is greater than or equal to the degree of the denominator, try long division first.

∫x+12x2+3x+5​dx

Solution

With polynomial long division,

x+12x2+3x+5​=2x+1+x+14​

So the integral is

∫(2x+1+x+14​)dx

which becomes

∫(2x+1)dx+4∫x+11​dx

Use the reverse power rule for both terms of the 1st integral, and use u-substitution on the 2nd integral with

u=x+1

du=dx

22x2​+x+4∫u1​du

=x2+x+4ln∣u∣

=x2+x+4ln∣x+1∣+C​

∫x2+1x3−x2+2​dx

Solution

(spoiler)

With polynomial long division,

x2+1x3−x2+2​=x−1+x2+1−x+3​

So the integral becomes

∫(x−1+x2+1−x+3​)dx

The integral can be broken up into

∫(x−1)dx+∫x2+1−x+3​dx

=2x2​−x+∫x2+1−x+3​dx

u-substitution doesn’t quite work on the remaining integral yet but we can further separate the fraction into

2x2​−x+∫x2+1−x​dx+∫x2+13​dx

For the 1st integral ∫x2+1−x​dx, use u-substitution with

u=x2+1

Then

du=2xdx

−21​du=−xdx

Rewriting the integral in terms of u,

∫x2+1−x​dx=∫u1​⋅(−21​)du

=−21​∫u1​du

=−21​ln∣u∣

=−21​ln(x2+1)

The 2nd integral ∫x2+13​dx appears to be similar to the derivative of tan−1(x). Then

∫x2+13​dx

=3∫x2+11​dx

=3tan−1(x)

Putting everything together,

∫x2+1x3−x2+2​dx

=2x2​−x−21​ln(x2+1)+3tan−1(x)+C​

Completing the square

If the integrand has a quadratic expression in the denominator or under a square root and it’s not easily factorable, try completing the square.

∫x2+4x+51​dx

Solution

(spoiler)

Completing the square for x2+4x+5,

∫(x2+4x+4)+5−41​dx

=∫(x+2)2+11​dx

This resembles the integral

∫x2+11​dx=tan−1(x)+C

once we make the u-substitution

u=x+2

du=dx

Rewriting the integral in terms of u,

∫(x+2)2+11​dx

=∫u2+11​du

=tan−1(u)

=tan−1(x+2)+C​

∫−2x−x2​1​dx

Solution

(spoiler)

Completing the square for −x2−2x,

∫−(x2+2x+1)+1​1​dx

=∫1−(x+1)2​1​dx

This resembles the integral

1−x2​1​dx=sin−1(x)+C

once we set

u=x+1

du=dx

Rewriting the integral in terms of u,

1−u2​1​du

=sin−1(u)

=sin−1(x+1)+C​

∫x2+4x+136​dx

Solution

(spoiler)

Completing the square,

∫(x2+4x+4)+13−46​dx

∫(x+2)2+96​dx

This resembles the integral

∫x2+11​dx=tan−1(x)+C

But the 9 in the denominator has to be a 1. To achieve this, multiply both the top and bottom by 1/9:

∫((x+2)2+9)⋅91​6⋅91​​dx

∫32​⋅9(x+2)2​+11​dx

9(x+2)2​ in the denominator can be turned into (3x+2​)2.

∫32​⋅(3x+2​)2+11​dx

Then make the u-substitution

u=3x+2​

du=31​dx

The integral rewritten in terms of u is

∫u2+12​dx

=2tan−1(u)

=2tan−1(3x+2​)+C​

Sign up for free to take 5 quiz questions on this topic

All rights reserved ©2016 - 2026 Achievable, Inc.