∫IntegralPasoEspañol
Rational functions

Completing the square

Material by the IntegralPaso project. Conditions and limits are stated in each guide; external teaching review is pending.

ax2+bx+c=a(x+b2a)2+c−b24aax^2+bx+c=a\left(x+\frac b{2a}\right)^2+c-\frac{b^2}{4a}

A shift converts a quadratic into a standard form. The constant sign then determines whether an arctangent, a logarithm or a radical substitution is appropriate.

Common mistake

The discriminant determines real roots; check the domain before integrating.

Step-by-step example

  1. Complete the square.

    x2+2x+5=(x+1)2+4x^2+2x+5=(x+1)^2+4
  2. Shift the variable.

    u=(x+1)/2,dx=2 duu=(x+1)/2,\quad dx=2\,du
  3. Apply the arctangent rule.

    ∫dxx2+2x+5=12arctan⁡x+12+C\int\frac{dx}{x^2+2x+5}=\frac12\arctan\frac{x+1}{2}+C
Practice this method