For example, integrating

$\displaystyle \displaystyle{\frac{1}{x^2 + x + 1}}$

we would transform it so...

$\displaystyle \ =\ \displaystyle{\frac{1}{(x + \frac{1}{2})^2 + \frac{3}{4}}}$

(square now completed). Then...

$\displaystyle \ =\ \displaystyle{\frac{1}{\frac{3}{4}[\frac{4}{3}(x + \frac{1}{2})^2 + 1]}}$

$\displaystyle \ =\ \displaystyle{\frac{4}{3}\ \frac{1}{(\frac{2}{\sqrt{3}}x + \frac{1}{\sqrt{3}})^2 + 1}}$

It's worth noticing that whether or not there are any incomplete squares to complete, a crucial step often is what came after in this case, which is turning the constant term into a one so you're able to do a trig sub and then use a Pythag identity. E.g., no completing the square here...

$\displaystyle \displaystyle{\frac{1}{3 + x^2}}$

... but you want to turn the 3 into a one in the same way as with the three quarters, above.

Spoiler:

Then the trig sub, which is really a matter of identifying $\displaystyle \ \frac{1}{\sqrt{3}}x\ $ as an inner function of a composite, and reasoning that if we swap the whole of this inner function for tan, we'll be able to integrate with respect to the inner-most variable. Just in case a picture helps...

... where (key in spoiler) ...

Spoiler:

For the 'completed' square...

If you've memorised $\displaystyle \ \frac{1}{1 + x^2}\ $ as a standard integrand, of course, you won't need to map to or substitute with tan...

PS...

Spoiler:

_________________________________________

Don't integrate - balloontegrate!

Balloon Calculus; standard integrals, derivatives and methods

Balloon Calculus Drawing with LaTeX and Asymptote!