Integration Techniques - Adding [arbitrary] values to the numerator. Suppose you wanted to evaluate the following integral.

Where did the 4 come from? I understand that it makes the solution but how would you make an educated guess to put a 4? And how in the future would I solve similar questions?

We want to have a fraction with the form
$$\frac{f'}f$$
so since the derivative of the denominator $x^2+4x+13$ is $2x+4$ so we write the numerator
$$x-2=\frac 1 2 (2x-4)=\frac 1 2 (2x+4)-4$$
