AP Calculus AB and BC
Integral of 1/(x^2+2x+5): Complete the Square
The integral of 1 over x squared plus 2x plus 5 is one half times arctan of x plus 1 all over 2, plus C. The quadratic has no real roots, so completing the square rewrites the denominator as x plus 1 squared plus 4, which is the arctangent form.
Complete the square first
Test the denominator before choosing a method. The discriminant of is . Negative means no real roots, so there are no linear factors and partial fractions has nothing to split.
Now the template applies with and . Since , the substitution costs nothing extra.
Reading a quadratic denominator
Quadratic denominators come in three shapes, and the discriminant separates them before any integration happens. Two real roots, as in , means linear factors and logarithms. A repeated root, as in , means the denominator is and the answer is a power, . No real roots, as here, means completing the square and expecting an arctangent.
Nothing about resembles until the square is completed. That single step is the problem; everything after it is pattern matching against a formula you already know.
The mistakes students make
Every one of these still lands on an arctangent, so the answer keeps the right shape while the shift inside it or the constant in front of it is wrong. Differentiating back catches all three in a line.
- Completing the square as . Expanding already supplies the , so the constant left over is .
- Answering with nothing in front. Its derivative is , which is twice the integrand.
- Putting out front by copying instead of . The template divides by , so the coefficient is .
Every answer on this page is machine checked
An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.
Frequently asked questions
What is the integral of 1/(x^2+2x+5)?
It is .
How do I know to complete the square?
Check the discriminant of the denominator. If it is negative the quadratic is irreducible, no factoring is possible, and completing the square is what turns it into the arctangent form.
When does a quadratic denominator give a logarithm instead of an arctangent?
When the quadratic has two distinct real roots, so it splits into different linear factors, or when the numerator is a multiple of the derivative of the denominator, as in . A repeated root is the third case and it gives a power rather than a logarithm.