Maths WorkshopMaths problems with full solutions
Exercise 728Calculus › Single-variable calculus › Integration › Integration techniquesL1Added 2 Nov 2026

Completing the square before integrating

#rational functions#completing the square#arctangent

Statement

Compute ∫01dxx2+x+1\displaystyle\int_0^1\frac{dx}{x^2+x+1}.

Hint

The denominator has no real root. Complete the square to get (x+12)2+34\left(x+\frac12\right)^2+\frac34 and aim for an arctan⁡\arctan.

Show solutionHide solution

Solution

Completing the square. x2+x+1=(x+12)2+34=34[(2x+13)2+1]x^2+x+1=\left(x+\frac12\right)^2+\frac34=\frac34\left[\left(\frac{2x+1}{\sqrt3}\right)^2+1\right].

Antiderivative. With u=2x+13u=\frac{2x+1}{\sqrt3}, du=23dxdu=\frac2{\sqrt3}dx:
∫dxx2+x+1=43⋅32∫duu2+1=23arctan⁡2x+13+C.\int\frac{dx}{x^2+x+1}=\frac43\cdot\frac{\sqrt3}2\int\frac{du}{u^2+1}=\frac2{\sqrt3}\arctan\frac{2x+1}{\sqrt3}+C.

Definite integral.
23(arctan⁡3−arctan⁡13)=23(π3−π6)=π33≈0.6046.\frac2{\sqrt3}\left(\arctan\sqrt3-\arctan\frac1{\sqrt3}\right)=\frac2{\sqrt3}\left(\frac\pi3-\frac\pi6\right)=\frac\pi{3\sqrt3}\approx0.6046.