Trig sub in quadratic - completing the square
Compute the integral:
Solution
(1) Complete the square to obtain Pythagorean form:
Add and subtract to get desired constant term:
(2) Perform shift substitution:
Set as inside the square:
Infer . Plug into integrand:
(3) Trig sub with :

Use substitution . (From triangle or memorized tip.)
Infer . Plug in data:
(4) Integrate using ad hoc memorized formula:
(5) Convert trig back to :
First in terms of , referring to the triangle:
Then in terms of using . Plug everything in:
(6) Simplify using log rules:
The common denominator can be pulled outside as .
The new term can be “absorbed into the constant” (redefine ).
So we write our final answer thus: