$\int \sqrt{x^{2}-8 x+7} d x$ is equal to
A. $\frac{1}{2}(x-4) \sqrt{x^{2}-8 x+7}+9 \log \left|x-4+\sqrt{x^{2}-8 x+7}\right|+C$
B. $\frac{1}{2}(x+4) \sqrt{x^{2}-8 x+7}+9 \log \left|x+4+\sqrt{x^{2}-8 x+7}\right|+C$
C. $\frac{1}{2}(x-4) \sqrt{x^{2}-8 x+7}-3 \sqrt{2} \log \left|x-4+\sqrt{x^{2}-8 x+7}\right|+C$
D. $\frac{1}{2}(x-4) \sqrt{x^{2}-8 x+7}-\frac{9}{2} \log \left|x-4+\sqrt{x^{2}-8 x+7}\right|+C$
Let $I=\int \sqrt{x^{2}-8 x+7} d x$
$=\int \sqrt{\left(x^{2}-8 x+16\right)-9} d x$
$=\int \sqrt{(x-4)^{2}-(3)^{2}} d x$
It is known that, $\int \sqrt{x^{2}-a^{2}} d x=\frac{x}{2} \sqrt{x^{2}-a^{2}}-\frac{a^{2}}{2} \log \left|x+\sqrt{x^{2}-a^{2}}\right|+\mathrm{C}$
$\therefore I=\frac{(x-4)}{2} \sqrt{x^{2}-8 x+7}-\frac{9}{2} \log \left|(x-4)+\sqrt{x^{2}-8 x+7}\right|+C$
Hence, the correct answer is D.