On this page
When you face an integral with a rational function where the numerator and denominator have the same degree, your first instinct might be to reach for polynomial long division. But there is a faster way: the "add and subtract" trick.
By carefully adding and subtracting a constant in the numerator, you can force the denominator's expression to appear on top. This splits the integral into a simple polynomial and a standard proper fraction, skipping the division step entirely.
What is the integral x squared over x squared plus 1 trick?
Consider the integral of x² / (x² + 1) with respect to x.
Because the degree of the numerator (2) is equal to the degree of the denominator (2), this is an improper rational function. To make it strictly proper so that standard integration formulas apply, we need to divide the numerator by the denominator. But instead of setting up formal long division, we can just add 0 to the numerator: by adding 1 and subtracting 1.
Rewrite the numerator: x² = x² + 1 − 1
Substitute it back into the integral: ∫ (x² + 1 − 1) / (x² + 1) dx
Break the fraction apart into two terms: ∫ [ (x² + 1) / (x² + 1) ] dx − ∫ [ 1 / (x² + 1) ] dx
Simplify the first term: ∫ 1 dx − ∫ 1 / (x² + 1) dx
Both of these are now standard integrals that you can evaluate by sight. The integral of 1 with respect to x is simply x. The integral of 1 / (x² + 1) is the standard inverse tangent function, tan⁻¹(x).
The final answer is x − tan⁻¹(x) + C.
Why do we need the numerator's degree to be strictly less?
The techniques for integrating rational fractions — especially partial fractions — rely on the fraction being "proper". According to OpenStax Calculus Volume 2, partial fraction decomposition can only be applied when the highest power of x in the numerator is strictly less than the highest power in the denominator.
If the degrees are equal, or if the numerator is "top-heavy" with a higher degree, you must reduce it first. The add-and-subtract trick is a useful shortcut for this reduction when the degrees are equal and the leading coefficients match. If the degrees were different, you would first have to compare them to decide on your approach — a skill that is also crucial when calculating limits at infinity of rational functions.
How does the trick compare to polynomial long division?
To see why the trick is useful, it helps to compare it to the traditional method. If we divide x² by x² + 1 using polynomial long division, we ask: "How many times does x² go into x²?" The answer is 1.
We multiply 1 by (x² + 1) to get x² + 1, and subtract this from our original numerator (x²) to find the remainder, which is −1.
We write the result as Quotient + (Remainder / Divisor), which gives us 1 − 1 / (x² + 1). The add-and-subtract trick gets us to this exact same expression, skipping the time-consuming algorithm.
Where else does adding and subtracting work?
This technique is not limited to x² / (x² + 1). It extends to linear fractions and other common quadratic forms, provided the leading coefficients are easy to manipulate.
Example 1: A linear over a linear Integrate x / (x + 5) with respect to x. Here, we look at the denominator (+5) and decide to add and subtract 5 in the numerator: ∫ (x + 5 − 5) / (x + 5) dx = ∫ 1 dx − 5 ∫ 1 / (x + 5) dx = x − 5 ln|x + 5| + C.
Example 2: A different quadratic denominator Integrate x² / (x² − a²). This time, we look at the denominator and add and subtract a²: ∫ (x² − a² + a²) / (x² − a²) dx = ∫ (x² − a²) / (x² − a²) dx + ∫ a² / (x² − a²) dx = ∫ 1 dx + a² ∫ 1 / (x² − a²) dx. From here, you can evaluate the second term using the standard logarithmic result for the difference of two squares, a fundamental form like the integrals of √(a² − x²) and √(x² ± a²).
Example 3: Dealing with a coefficient Integrate 2x / (x + 1). First, factor out the 2, or add and subtract 2 to match the needed 2x + 2. ∫ (2x + 2 − 2) / (x + 1) dx = ∫ 2 dx − 2 ∫ 1 / (x + 1) dx = 2x − 2 ln|x + 1| + C.
You can practice recognising when to use this shortcut in the Fermi Problem Library, where the step-by-step solver explains the reasoning behind each algebraic step rather than just printing the final answer. Mastering algebraic manipulation before integration will save you valuable minutes on calculus exams.



