Complete the square in the denominator:
![x^2 - 8x + 39 = x^2 - 8x + 16 + 23 = (x-4)^2 + 23](https://img.qammunity.org/2023/formulas/mathematics/college/5joplz70q0gido8qzk2ik4f860t1800dvc.png)
Then in the integral, substitute
and
.
![\displaystyle \int (dx)/(x^2 - 8x + 39) = \int (√(23) \sec^2(t) \, dt)/(\left(√(23)\tan(t)\right)^2 + 23) = \frac1{√(23)} \int (\sec^2(t))/(\tan^2(t)+1) \, dt](https://img.qammunity.org/2023/formulas/mathematics/college/di9yvy12lmwe37ig7o8tp5udlo1tl62m6y.png)
Recall that tan²(x) + 1 = sec²(x) for all x (such that cos(x) ≠ 0, anyway). Then the integral reduces to the trival
![\displaystyle \frac1{√(23)} \int dt = \frac1{√(23)} t + C](https://img.qammunity.org/2023/formulas/mathematics/college/40yxqxcg1whyilms3ynw03cou5ja4u25wy.png)
and putting the result back in terms of x, we get
![\displaystyle \int (dx)/(x^2 - 8x + 39) = \boxed{\frac1{√(23)} \tan^(-1)\left((x-4)/(√(23))\right) + C}](https://img.qammunity.org/2023/formulas/mathematics/college/g4b591m5pfzz5erzo0ly461v096f3hvxkk.png)
If you want to proceed via partial fractions, there's more work involved. We can use the complete-square expression to easily find the roots of the denominator:
![(x-4)^2 + 23 = 0 \implies (x-4)^2 = -23 \implies x - 4 = \pm i √(23) \implies x = 4 \pm i √(23)](https://img.qammunity.org/2023/formulas/mathematics/college/fclm4cy1wnsj6efrfc5q5s9jrrz2xxvt4v.png)
Then we factorize
![x^2 - 8x + 39 = \left(x - 4 - i√(23)\right) \left(x - 4 + i √(23)\right)](https://img.qammunity.org/2023/formulas/mathematics/college/1kx0ew1tgnnnz8n3uxyztjec7ajkgimqd7.png)
and the PFD would be
![\frac1{x^2-8x+39} = \frac a{x - 4 - i√(23)} + \frac b{x - 4 + i√(23)}](https://img.qammunity.org/2023/formulas/mathematics/college/mv62wrnt03vnjrxccxe0btu0odtmnjkuun.png)
Solve for the coefficients:
![1 = a\left(x - 4 + i√(23)\right) + b\left(x - 4 - i√(23)\right)](https://img.qammunity.org/2023/formulas/mathematics/college/95z1ljiw4hlj8l6i9lk1rjzsxc6kuw8erm.png)
![\implies \begin{cases}a+b = 0 \\ \left(-4+i√(23)\right) a - \left(4+i√(23)\right) b = 1 \end{cases} \implies a = \frac i{2√(23)}, b=-\frac i{2√(23)}](https://img.qammunity.org/2023/formulas/mathematics/college/j60wl050raqbf1k53tg6n487fpkpicnslx.png)
Then the integral is
![\displaystyle \int (dx)/(x^2-8x+39) = \frac i{2√(23)} \ln\left|x - 4 - i√(23)\right| - \frac i{2√(23)} \ln\left|x - 4 + i√(23)\right| + C](https://img.qammunity.org/2023/formulas/mathematics/college/9g85sv0hq564m8kb9ogijv6ieom4tn49xa.png)
and we can condense the logarithms to
![\displaystyle \int (dx)/(x^2-8x+39) = \frac i{2√(23)} \ln(\left|x - 4 - i√(23))/(\left|x - 4 + i√(23)\right|) + C](https://img.qammunity.org/2023/formulas/mathematics/college/ndigl9pnisj1nrz9p50g9749fn6xr6b1uv.png)
Now we fight the urge to be discouraged by the presence of imaginary numbers in this result. The two antiderivatives are one and the same!
For any complex number z, the following identity holds:
![\tan^(-1)(z) = -\frac i2 \ln \left((i-z)/(i+z)\right)](https://img.qammunity.org/2023/formulas/mathematics/college/2doaamplefogcfcw581ioszfh75s7q98pc.png)
With some rewriting, we have for instance
![\frac i{2√(23)} \ln(\left|x - 4 - i√(23)\right|)/(\left|x - 4 + i√(23)\right|) = -\frac1{√(23)} * -\frac i2 \ln \left|((x-4)/(√(23)) - i)/((x-4)/(√(23)) + i)\right| \\\\ = -\frac1{√(23)} \tan^(-1)\left(-(x-4)/(√(23))\right) \\\\ = \frac1{√(23)} \tan^(-1)\left((x-4)/(√(23))\right)](https://img.qammunity.org/2023/formulas/mathematics/college/o2cn1bb6wwqdvrdn4zdsb7mpmiz3t1608j.png)
Admittedly, I skip over a bunch of details, but the point is that both methods end with the same result, but the first method is much simpler to follow and execute, in my opinion.