To integrate \( \frac{1}{x^2 + a^2} \), complete the square if necessary and use the standard result \( \int \frac{dx}{x^2 + a^2} = \frac{1}{a} \tan^{-1}\left( \frac{x}{a} \right) \).
Step 1: Completing the square.
We start by completing the square for the quadratic expression \( x^2 - 8x + 17 \):
\[
x^2 - 8x + 17 = (x - 4)^2 + 1
\]
Step 2: Substitution.
Let \( u = x - 4 \), so \( du = dx \). The integral becomes:
\[
\int \frac{dx}{(x - 4)^2 + 1} = \int \frac{du}{u^2 + 1}
\]
Step 3: Standard integral.
The integral \( \int \frac{du}{u^2 + 1} \) is a standard result and equals \( \tan^{-1}(u) \). Step 4: Substituting back.
Substitute \( u = x - 4 \) back into the result:
\[
\int \frac{dx}{x^2 - 8x + 17} = \tan^{-1}(x - 4) + C
\]
Step 5: Conclusion.
Thus, the integral evaluates to:
\[
\tan^{-1}(x - 4) + C
\]