| Study Guides
AP · Integration with long division and completing the square · 14 min read · Updated 2026-05-10

Integration with long division and completing the square — AP Calculus BC Study Guide

For: AP Calculus BC candidates sitting AP Calculus BC.

Covers: Polynomial long division for improper rational integrands, completing the square for irreducible quadratic denominators, integration of linear over irreducible quadratics, and linking results to the inverse trigonometric integrals required for AP Calculus BC.

You should already know: Basic integration rules for power, logarithmic, and inverse trigonometric functions; polynomial algebra (long division, factoring); how to compute derivatives of polynomial and rational functions.

A note on the practice questions: All worked questions in the "Practice Questions" section below are original problems written by us in the AP Calculus BC style for educational use. They are not reproductions of past College Board / Cambridge / IB papers and may differ in wording, numerical values, or context. Use them to practise the technique; cross-check with official mark schemes for grading conventions.


1. What Is Integration with long division and completing the square?

This topic covers two algebraic preprocessing techniques used to rewrite rational functions (ratios of polynomials) into forms that can be integrated using basic rules you already know. It is explicitly listed in the AP Calculus BC Course and Exam Description (CED) as part of Unit 6: Integration and Accumulation of Change, and typically accounts for 1-2% of total exam points, appearing in both multiple-choice (MCQ) and free-response (FRQ) sections.

When you have a rational integrand where the degree of the numerator is greater than or equal to the degree of the denominator , the integrand is called improper, and you must use polynomial long division to rewrite it as a sum of a polynomial and a proper rational function (where numerator degree < denominator degree). If the resulting proper rational function has an irreducible quadratic denominator (a quadratic that cannot be factored into real linear terms), completing the square lets you rewrite the denominator to match the form required for inverse trigonometric integrals (arcsine, arctangent), which are required content for BC. These techniques are foundational for partial fraction decomposition, which comes later in the unit.

2. Integration of Improper Rational Functions via Polynomial Long Division

A rational function is defined as improper if . You cannot integrate this directly using basic integration rules, because the rational form does not match any of the standard integral templates you have memorized. Polynomial long division rewrites the improper integrand as: where is the quotient polynomial, and is the remainder polynomial, which satisfies . This is exactly analogous to rewriting an improper numerical fraction like as : we separate the whole part (the polynomial ) from the remaining fractional part (the proper rational function ).

The new expression can be integrated term-by-term easily: is a polynomial that integrates via the power rule, and is now a proper rational function that can be integrated with other techniques like completing the square.

Worked Example

Problem: Evaluate .

  1. Confirm the integrand is improper: , , so , and long division is required.
  2. Perform polynomial long division: Dividing by gives quotient and remainder . The integrand rewrites to: .
  3. Integrate term-by-term using the power rule for polynomial terms and the natural log rule for the rational term:
  4. Verify by differentiation: The derivative of the result matches the original integrand, confirming the result is correct.

Exam tip: Always check the degree of the numerator and denominator before starting integration of a rational function. If the degrees are equal or the numerator degree is higher, you must use long division first — skipping this step will lead to an incorrect result.

3. Completing the Square for Irreducible Quadratic Denominators

After long division (or when you start with a proper rational function), you may get an integrand with an irreducible quadratic denominator: , where the discriminant , meaning it cannot be factored into real linear terms. Completing the square rewrites this quadratic in vertex form to match one of the two standard inverse trigonometric integral templates you already know:

To complete the square for :

  1. Factor the leading coefficient out of the first two terms: .
  2. Add and subtract inside the parentheses to form a perfect square: This leaves you with a quadratic of the form , where , which matches the form needed for substitution into the inverse trig integral formulas.

Worked Example

Problem: Evaluate .

  1. Check the discriminant of the denominator: , so the denominator is irreducible over the reals, and we need to complete the square.
  2. Complete the square: Group the -terms: . Add and subtract inside the group: .
  3. Rewrite the integral to match the arctangent template: . Let , so , and the integral becomes .
  4. Apply the arctangent integral formula: .

Exam tip: Always factor out the leading coefficient of the quadratic before completing the square if the leading coefficient is not 1. Forgetting this step will leave you with an incorrect constant term that won't match the standard inverse trig forms.

4. Integrating Linear Over Irreducible Quadratic Functions

One of the most common integrands you will encounter on the AP exam is , where is irreducible. This is not a constant over a quadratic, so you cannot directly apply the inverse trig integral after completing the square. Instead, you split the numerator into a multiple of the derivative of the denominator plus a constant, then integrate the two terms separately. The first term will be a logarithmic integral (since it has the form , which integrates to ), and the second term will use the inverse trig integral after completing the square.

The method follows these steps:

  1. Let (the denominator), and compute .
  2. Write the numerator , then solve for constants and by equating coefficients.
  3. Split the integrand into two terms: .
  4. Integrate the first term with the log rule, and the second term by completing the square and applying the inverse trig rule.

Worked Example

Problem: Evaluate .

  1. Confirm the denominator is irreducible: , so it cannot be factored. , so .
  2. Split the numerator: Write . Equate coefficients: , then .
  3. Split the integral:
  4. Integrate the first term: (we drop absolute value because the quadratic is always positive).
  5. Integrate the second term by completing the square: , so .
  6. Combine results: .

Exam tip: Always drop the absolute value around an irreducible quadratic in the log term because the quadratic is always positive (it never crosses the x-axis), so you can simplify the final result by writing just instead of .

5. Common Pitfalls (and how to avoid them)

  • Wrong move: Stopping after long division and integrating the quotient but forgetting to add the remainder term over the denominator. Why: Students focus on completing the long division calculation and omit the non-zero remainder, which is present in most problems. Correct move: After completing long division, always write the full result: before integrating term-by-term.
  • Wrong move: When the degree of the numerator equals the degree of the denominator, skipping long division and trying to use partial fractions or inverse trig directly. Why: Students think you only need long division when the numerator degree is strictly higher, not equal. Correct move: Always check for : if degrees are equal, the condition is satisfied, so perform long division first.
  • Wrong move: When completing the square for , writing . Why: The student forgot to factor out the leading coefficient 2 from the x terms before completing the square. Correct move: Always factor the leading coefficient out of the first two terms first: .
  • Wrong move: When integrating , trying to use inverse trig directly without splitting the numerator. Why: Students see a quadratic denominator and immediately complete the square, forgetting the linear numerator produces a log term. Correct move: Always split the numerator into a multiple of the derivative of the denominator plus a constant before integrating.
  • Wrong move: When applying the arctangent formula to , stopping at . Why: The student forgot the substitution step for , which requires accounting for the chain rule factor of 2 from . Correct move: After rewriting the quadratic, always do the u-substitution explicitly and carry the constant factor through: the correct result here is .

6. Practice Questions (AP Calculus BC Style)

Question 1 (Multiple Choice)

Which of the following is the antiderivative of ? A) B) C) D)

Worked Solution: First, confirm the integrand is improper: degree of the numerator is 2, which is greater than the degree of the denominator (1), so polynomial long division is required. Dividing by gives quotient and remainder , so the integrand simplifies to . Integrate term-by-term using the power rule for polynomial terms and the natural log rule for the rational term: . This matches option B. Correct answer: B.


Question 2 (Free Response)

Consider the function for . (a) Evaluate the indefinite integral . (b) Find the particular solution such that . (c) Find the area under the curve on the interval , rounded to three decimal places.

Worked Solution: (a) , so perform long division: . Integrate term-by-term: (b) Substitute into the general antiderivative: . The particular solution is: (c) The area is the definite integral . Calculate: , . Subtract to get area .


Question 3 (Application / Real-World Style)

The rate of change of a population of deer in a protected forest is modeled by the function where is the number of deer at time (measured in years since the reserve was established), for . Find the total change in population from to , rounded to the nearest whole deer.

Worked Solution: Total change is given by the definite integral . The denominator is irreducible (discriminant ), so split the numerator: , , so . Split the integral: Calculate the numerical value: , and the second term , so total change . Rounding to the nearest whole number gives 5 deer.

Interpretation: The deer population increases by approximately 5 deer over the first 3 years after the reserve is established.

7. Quick Reference Cheatsheet

Category Formula Notes
Improper rational function definition is improper if Requires polynomial long division before integration
Long division result = quotient polynomial, = remainder polynomial
Completing the square for general quadratic Factor out from x terms before adding the square constant
Arctangent integral template Applies to irreducible quadratic denominators after completing the square
Arcsine integral template Appears when completing the square gives a difference of squares under a square root
Linear numerator split Split before integrating linear over irreducible quadratic
Log integral rule $\int \frac{f'(x)}{f(x)} dx = \ln f(x)
General result for First term gives the log, second gives the arctangent after splitting

8. What's Next

This topic is the critical prerequisite for partial fraction decomposition, the next major technique for integrating rational functions in AP Calculus BC. Partial fraction decomposition only works for proper rational functions, so you must master long division to reduce improper integrands before you can split them into partial fractions. Completing the square is also required to integrate the irreducible quadratic terms that often result from partial fraction decomposition, so this skill will be used repeatedly in the next section of the unit. Beyond integration of rational functions, completing the square appears when rewriting quadratics in polar coordinate and area problems later in the course, and the algebraic manipulation skills from this topic are required for almost all non-basic integration problems on the AP exam.

← Back to topic

Stuck on a specific question?
Snap a photo or paste your problem — Ollie (our AI tutor) walks through it step-by-step with diagrams.
Try Ollie free →