Solved Exercises on Integrating Using Long Division and Completing the Square in Calculus 2

Master integration techniques: long division for improper rational functions and completing the square for quadratic expressions through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Long Division: Improper Rational Function
Exercise 1
Evaluate: \(\displaystyle\int \frac{x^2 + 3x + 2}{x + 1} dx\) using long division
Definition:

Improper Rational Function: When the degree of the numerator is greater than or equal to the degree of the denominator, use polynomial long division.

Long division method:
  1. Divide the highest degree term of the numerator by the highest degree term of the denominator
  2. Multiply the divisor by this result and subtract from the dividend
  3. Repeat the process with the remainder
  4. Continue until the remainder has a lower degree than the divisor
Original
\(\int \frac{x^2 + 3x + 2}{x + 1} dx\)
Long Division
\(x + 2\)
Result
\(\frac{x^2}{2} + 2x + C\)
Step 1: Set up long division

Divide \(x^2 + 3x + 2\) by \(x + 1\)

Step 2: First division step

\(\frac{x^2}{x} = x\), multiply \(x(x + 1) = x^2 + x\), subtract: \((x^2 + 3x + 2) - (x^2 + x) = 2x + 2\)

Step 3: Second division step

\(\frac{2x}{x} = 2\), multiply \(2(x + 1) = 2x + 2\), subtract: \((2x + 2) - (2x + 2) = 0\)

Step 4: Write the result

\(\displaystyle\frac{x^2 + 3x + 2}{x + 1} = x + 2 + \frac{0}{x + 1} = x + 2\)

Step 5: Integrate the quotient

\(\displaystyle\int (x + 2) dx = \frac{x^2}{2} + 2x + C\)

\(\displaystyle\int \frac{x^2 + 3x + 2}{x + 1} dx = \frac{x^2}{2} + 2x + C\)
Final answer:

\(\displaystyle\int \frac{x^2 + 3x + 2}{x + 1} dx = \frac{x^2}{2} + 2x + C\)

Applied rules:

• Long Division: Reduce improper rational function to proper form

• Polynomial Integration: Integrate each term separately

• Power Rule: \(\int x^n dx = \frac{x^{n+1}}{n+1} + C\)

2 Completing the Square: Quadratic Denominator
Exercise 2
Evaluate: \(\displaystyle\int \frac{1}{x^2 + 4x + 5} dx\) using completing the square
Definition:

Completing the Square: Rewrite \(ax^2 + bx + c\) as \(a(x + h)^2 + k\) to facilitate integration using arctangent formula.

Original
\(\int \frac{1}{x^2 + 4x + 5} dx\)
Complete Square
\(\int \frac{1}{(x + 2)^2 + 1} dx\)
Result
\(\arctan(x + 2) + C\)
Step 1: Complete the square in the denominator

\(x^2 + 4x + 5 = x^2 + 4x + 4 - 4 + 5 = (x + 2)^2 + 1\)

Step 2: Rewrite the integral

\(\displaystyle\int \frac{1}{x^2 + 4x + 5} dx = \int \frac{1}{(x + 2)^2 + 1} dx\)

Step 3: Use the arctangent formula

\(\displaystyle\int \frac{1}{u^2 + a^2} du = \frac{1}{a}\arctan\left(\frac{u}{a}\right) + C\)

Step 4: Apply with \(u = x + 2\), \(a = 1\)

\(\displaystyle\int \frac{1}{(x + 2)^2 + 1} dx = \arctan(x + 2) + C\)

\(\displaystyle\int \frac{1}{x^2 + 4x + 5} dx = \arctan(x + 2) + C\)
Final answer:

\(\displaystyle\int \frac{1}{x^2 + 4x + 5} dx = \arctan(x + 2) + C\)

Applied rules:

• Completing the Square: Transform quadratic to standard form

• Arctangent Formula: \(\int \frac{1}{u^2 + a^2} du = \frac{1}{a}\arctan\left(\frac{u}{a}\right) + C\)

• Quadratic Forms: Recognize when to complete the square

3 Long Division with Remainder
Exercise 3
Evaluate: \(\displaystyle\int \frac{x^3 + 2x^2 - x + 1}{x^2 + 1} dx\) using long division
Definition:

Polynomial Long Division: When the degree of the numerator is greater than the degree of the denominator, divide to get a quotient and remainder.

Original
\(\int \frac{x^3 + 2x^2 - x + 1}{x^2 + 1} dx\)
Long Division
\(x + 2 + \frac{-2x - 1}{x^2 + 1}\)
Result
\(\frac{x^2}{2} + 2x - \ln(x^2 + 1) - \arctan(x) + C\)
Step 1: Set up long division

Divide \(x^3 + 2x^2 - x + 1\) by \(x^2 + 1\)

Step 2: First division step

\(\frac{x^3}{x^2} = x\), multiply \(x(x^2 + 1) = x^3 + x\), subtract: \((x^3 + 2x^2 - x + 1) - (x^3 + x) = 2x^2 - 2x + 1\)

Step 3: Second division step

\(\frac{2x^2}{x^2} = 2\), multiply \(2(x^2 + 1) = 2x^2 + 2\), subtract: \((2x^2 - 2x + 1) - (2x^2 + 2) = -2x - 1\)

Step 4: Write the result

\(\displaystyle\frac{x^3 + 2x^2 - x + 1}{x^2 + 1} = x + 2 + \frac{-2x - 1}{x^2 + 1}\)

Step 5: Integrate each term separately

\(\displaystyle\int (x + 2) dx + \int \frac{-2x}{x^2 + 1} dx + \int \frac{-1}{x^2 + 1} dx\)

\(= \frac{x^2}{2} + 2x - \ln(x^2 + 1) - \arctan(x) + C\)

\(\displaystyle\int \frac{x^3 + 2x^2 - x + 1}{x^2 + 1} dx = \frac{x^2}{2} + 2x - \ln(x^2 + 1) - \arctan(x) + C\)
Final answer:

\(\displaystyle\int \frac{x^3 + 2x^2 - x + 1}{x^2 + 1} dx = \frac{x^2}{2} + 2x - \ln(x^2 + 1) - \arctan(x) + C\)

Applied rules:

• Long Division: Separate polynomial part from rational part

• Logarithmic Integration: \(\int \frac{f'(x)}{f(x)} dx = \ln|f(x)| + C\)

• Arctangent Integration: \(\int \frac{1}{x^2 + 1} dx = \arctan(x) + C\)

Long Division and Completing the Square Properties
\(\displaystyle\frac{P(x)}{Q(x)} = D(x) + \frac{R(x)}{Q(x)}\)
Polynomial Long Division
Long Division
\(\deg(P) \geq \deg(Q)\)
\(\frac{P(x)}{Q(x)} = D(x) + \frac{R(x)}{Q(x)}\)
\(\deg(R) < \deg(Q)\)
Completing Square
\(x^2 + bx + c = (x + \frac{b}{2})^2 + (c - \frac{b^2}{4})\)
Standard form
Arctangent Form
\(\int \frac{1}{x^2 + a^2} dx = \frac{1}{a}\arctan\left(\frac{x}{a}\right) + C\)
Quadratic integration
Logarithmic Form
\(\int \frac{f'(x)}{f(x)} dx = \ln|f(x)| + C\)
Derivative pattern
Key definitions:

Improper Rational Function: A rational function where the degree of the numerator is greater than or equal to the degree of the denominator.

Proper Rational Function: A rational function where the degree of the numerator is less than the degree of the denominator.

Completing the Square: The process of transforming a quadratic expression \(ax^2 + bx + c\) into the form \(a(x + h)^2 + k\).

Integration methodology:
  1. Identify the technique: Determine if long division or completing the square is needed
  2. Apply the transformation: Perform long division or complete the square
  3. Recognize standard forms: Identify which integration formula to apply
  4. Integrate: Apply appropriate integration techniques
  5. Combine results: Sum all integrated terms
Tip 1: Use long division when the degree of numerator ≥ degree of denominator.
Tip 2: Complete the square when you have a quadratic that doesn't factor nicely.
Tip 3: After long division, integrate the polynomial and rational parts separately.
Solution: Exercises 4 to 5
4 Completing the Square with Coefficients
Exercise 4
Evaluate: \(\displaystyle\int \frac{1}{2x^2 + 8x + 10} dx\) using completing the square
Definition:

Completing the Square with Coefficients: Factor out the leading coefficient before completing the square.

Original
\(\int \frac{1}{2x^2 + 8x + 10} dx\)
Factor Coefficient
\(\frac{1}{2}\int \frac{1}{x^2 + 4x + 5} dx\)
Result
\(\frac{1}{2}\arctan(x + 2) + C\)
Step 1: Factor out the leading coefficient

\(\displaystyle\int \frac{1}{2x^2 + 8x + 10} dx = \int \frac{1}{2(x^2 + 4x + 5)} dx = \frac{1}{2}\int \frac{1}{x^2 + 4x + 5} dx\)

Step 2: Complete the square in the denominator

\(x^2 + 4x + 5 = x^2 + 4x + 4 - 4 + 5 = (x + 2)^2 + 1\)

Step 3: Rewrite the integral

\(\displaystyle\frac{1}{2}\int \frac{1}{(x + 2)^2 + 1} dx\)

Step 4: Apply the arctangent formula

\(\displaystyle\frac{1}{2}\int \frac{1}{(x + 2)^2 + 1} dx = \frac{1}{2}\arctan(x + 2) + C\)

Step 5: Verify by differentiation

\(\displaystyle\frac{d}{dx}\left[\frac{1}{2}\arctan(x + 2)\right] = \frac{1}{2} \cdot \frac{1}{(x + 2)^2 + 1} = \frac{1}{2[(x + 2)^2 + 1]} = \frac{1}{2x^2 + 8x + 10}\) ✓

\(\displaystyle\int \frac{1}{2x^2 + 8x + 10} dx = \frac{1}{2}\arctan(x + 2) + C\)
Final answer:

\(\displaystyle\int \frac{1}{2x^2 + 8x + 10} dx = \frac{1}{2}\arctan(x + 2) + C\)

Applied rules:

• Factor Leading Coefficient: Extract constant before completing the square

• Completing the Square: Transform to standard form

• Arctangent Integration: Apply the standard formula

5 Combined Techniques
Exercise 5
Evaluate: \(\displaystyle\int \frac{x^2 + 4x + 7}{x^2 + 4x + 8} dx\) using long division and completing the square
Definition:

Combined Techniques: When both techniques are needed, perform long division first, then apply completing the square to the remaining rational function.

Original
\(\int \frac{x^2 + 4x + 7}{x^2 + 4x + 8} dx\)
Long Division
\(1 + \frac{-1}{x^2 + 4x + 8}\)
Result
\(x - \frac{1}{2}\arctan\left(\frac{x + 2}{2}\right) + C\)
Step 1: Notice degrees are equal, so divide

Since \(\deg(x^2 + 4x + 7) = \deg(x^2 + 4x + 8)\), we'll get a quotient of 1 with some remainder

Step 2: Perform the division

\(\displaystyle\frac{x^2 + 4x + 7}{x^2 + 4x + 8} = \frac{(x^2 + 4x + 8) - 1}{x^2 + 4x + 8} = 1 + \frac{-1}{x^2 + 4x + 8}\)

Step 3: Complete the square in the denominator

\(x^2 + 4x + 8 = x^2 + 4x + 4 - 4 + 8 = (x + 2)^2 + 4\)

Step 4: Rewrite the integral

\(\displaystyle\int \left(1 + \frac{-1}{(x + 2)^2 + 4}\right) dx = \int 1 dx - \int \frac{1}{(x + 2)^2 + 4} dx\)

Step 5: Apply the arctangent formula

\(\displaystyle x - \int \frac{1}{(x + 2)^2 + 2^2} dx = x - \frac{1}{2}\arctan\left(\frac{x + 2}{2}\right) + C\)

\(\displaystyle\int \frac{x^2 + 4x + 7}{x^2 + 4x + 8} dx = x - \frac{1}{2}\arctan\left(\frac{x + 2}{2}\right) + C\)
Final answer:

\(\displaystyle\int \frac{x^2 + 4x + 7}{x^2 + 4x + 8} dx = x - \frac{1}{2}\arctan\left(\frac{x + 2}{2}\right) + C\)

Applied rules:

• Long Division: When degrees are equal, divide first

• Completing the Square: Transform quadratic denominators

• Arctangent Formula: \(\int \frac{1}{u^2 + a^2} du = \frac{1}{a}\arctan\left(\frac{u}{a}\right) + C\)

Integration Using Long Division and Completing the Square: Comprehensive Summary
\(\displaystyle\frac{P(x)}{Q(x)} = D(x) + \frac{R(x)}{Q(x)}\)
Polynomial Long Division
Key definitions:

Polynomial Long Division: A technique to divide one polynomial by another, resulting in a quotient and remainder: \(P(x) = Q(x) \cdot D(x) + R(x)\), where \(\deg(R) < \deg(Q)\).

Completing the Square: The process of rewriting a quadratic expression \(ax^2 + bx + c\) in the form \(a(x + h)^2 + k\), where \(h = -\frac{b}{2a}\) and \(k = c - ah^2\).

Improper Rational Function: A rational function where the degree of the numerator is greater than or equal to the degree of the denominator, requiring long division.

Complete methodology for both techniques:
  1. Identify the technique needed: Check if long division or completing the square is required
  2. Perform long division: If \(\deg(\text{numerator}) \geq \deg(\text{denominator})\), divide first
  3. Complete the square: If you have a quadratic expression that doesn't factor, complete the square
  4. Recognize standard forms: Identify which integration formula to apply
  5. Integrate each part: Apply appropriate integration techniques to each component
  6. Combine results: Sum all integrated terms
Tip 1: Use long division when the degree of the numerator is greater than or equal to the degree of the denominator.
Tip 2: Complete the square when you encounter a quadratic that doesn't factor over the reals.
Tip 3: Factor out the leading coefficient before completing the square for expressions like \(ax^2 + bx + c\) where \(a \neq 1\).
Tip 4: After long division, integrate the polynomial and rational parts separately.
Tip 5: Verify your result by differentiating to ensure you get back the original integrand.
Common errors: Forgetting to factor out coefficients before completing the square, performing long division incorrectly, misapplying integration formulas, not recognizing when techniques are needed.
Exam preparation: Practice pattern recognition, master polynomial long division, memorize completing the square formula, know standard integration forms.
Essential formulas and patterns:

• Long Division Result: \(\frac{P(x)}{Q(x)} = D(x) + \frac{R(x)}{Q(x)}\) where \(\deg(R) < \deg(Q)\)

• Completing the Square: \(x^2 + bx + c = (x + \frac{b}{2})^2 + (c - \frac{b^2}{4})\)

• With Coefficient: \(ax^2 + bx + c = a(x + \frac{b}{2a})^2 + (c - \frac{b^2}{4a})\)

• Arctangent Form: \(\int \frac{1}{x^2 + a^2} dx = \frac{1}{a}\arctan\left(\frac{x}{a}\right) + C\)

• Logarithmic Form: \(\int \frac{f'(x)}{f(x)} dx = \ln|f(x)| + C\)

• Linear Form: \(\int \frac{1}{ax + b} dx = \frac{1}{a}\ln|ax + b| + C\)

Decision trees for technique selection:
Long Division: Use when \(\deg(\text{numerator}) \geq \deg(\text{denominator})\). Examples: \(\frac{x^3}{x^2+1}\), \(\frac{x^2+x}{x+1}\), \(\frac{x^4}{x^2+1}\)
Completing the Square: Use when denominator is a quadratic that doesn't factor. Examples: \(\frac{1}{x^2+4x+7}\), \(\frac{x}{x^2+2x+5}\)
Combined: Use both when the numerator has higher degree and the denominator requires completing the square. Example: \(\frac{x^3}{x^2+4x+8}\)
Verification: Always differentiate your result to verify it matches the original integrand.

Questions & Answers

Question: When should I use long division versus completing the square? How do I decide which technique to apply?

Answer: Use this decision tree:

  • Long Division: When \(\deg(\text{numerator}) \geq \deg(\text{denominator})\). This reduces the problem to a polynomial plus a proper rational function.
  • Completing the Square: When you have a quadratic denominator that doesn't factor over the reals (discriminant < 0).
  • Both: Sometimes you need both - use long division first if needed, then complete the square on the remaining rational function.

Examples: For \(\int \frac{x^3}{x^2+1} dx\), use long division. For \(\int \frac{1}{x^2+4x+7} dx\), use completing the square. For \(\int \frac{x^3}{x^2+4x+8} dx\), use both.

Question: How do I know if a quadratic expression can be factored or if I need to complete the square?

Answer: Use the discriminant of the quadratic \(ax^2 + bx + c\):

  • If \(b^2 - 4ac > 0\): The quadratic factors into two distinct linear factors. Use partial fractions.
  • If \(b^2 - 4ac = 0\): The quadratic factors into a perfect square: \((x + h)^2\). This is already factored.
  • If \(b^2 - 4ac < 0\): The quadratic does not factor over the reals. Complete the square to get \((x + h)^2 + k\) where \(k > 0\).

For example, \(x^2 + 4x + 5\) has discriminant \(16 - 20 = -4 < 0\), so complete the square: \((x + 2)^2 + 1\).

Question: When completing the square, do I always need to factor out the leading coefficient? When can I skip this step?

Answer: You should factor out the leading coefficient when it's not 1, but you can sometimes skip this if you're comfortable with the process:

When to factor out: Always factor out the leading coefficient from the terms you're completing the square for.

Example with factoring: For \(2x^2 + 8x + 10\):

  • Factor: \(2(x^2 + 4x) + 10\)
  • Complete inside: \(2(x^2 + 4x + 4 - 4) + 10\)
  • Simplify: \(2((x + 2)^2 - 4) + 10 = 2(x + 2)^2 - 8 + 10 = 2(x + 2)^2 + 2\)

Alternative method: You can complete the square directly by using the formula: \(ax^2 + bx + c = a(x + \frac{b}{2a})^2 + (c - \frac{b^2}{4a})\).

Both methods give the same result, but factoring out first is usually clearer.