Some integrals involving rational functions are not ready for direct antidifferentiation or substitution at first. If the degree of the numerator is greater than or equal to the degree of the denominator, you often begin with long division so the integrand becomes a polynomial plus a proper rational expression. In other cases, especially when the denominator is a quadratic expression, you may need completing the square to rewrite it into a more useful form. These algebra steps make the integral match familiar antiderivative patterns that you already know.
You should think of this topic as an algebra-first integration lesson. The main goal is to rewrite the integrand into a form you can actually integrate. Long division helps separate a quotient into simpler pieces, while completing the square is especially useful when a quadratic denominator needs to look more like a standard expression such as . Once the algebra is done, the actual integration usually becomes much more straightforward.