Trig sub in quadratic - completing the square

Compute the integral:

dxx26x+11

Solution

(1) Complete the square to obtain Pythagorean form:

x26x+(62)2x26x+9=(x3)2

Add and subtract to get desired constant term:

x26x+11x26x+99+11(x3)2+2

(2) Perform shift substitution:

Set u=x3 as inside the square:

(x3)2+2=u2+2

Infer du=dx. Plug into integrand:

dxx26x+11duu2+2

(3) Trig sub with tanθ:

center

Use substitution u=2tanθ. (From triangle or memorized tip.)

Infer du=2sec2θdθ. Plug in data:

duu2+2sec2θsecθdθ=secθdθ

(4) Integrate using ad hoc memorized formula:

secθdθln|tanθ+secθ|+C

(5) Convert trig back to x:

First in terms of u, referring to the triangle:

tanθ=u2,secθ=u2+22

Then in terms of x using u=x3. Plug everything in:

ln|tanθ+secθ|+Cln|x32+(x3)2+22|+C

(6) Simplify using log rules:

lnf(x)alnf(x)lna

The common denominator 12 can be pulled outside as ln2.

The new term ln2 can be “absorbed into the constant” (redefine C).

So we write our final answer thus:

ln|x3+(x3)2+2|+C