<s>[INST] how to integrate $\int\frac{1}{x^2-12x+35}dx$? How to integrate following
$$\int\frac{1}{x^2-12x+35}dx?$$
What I did is here:
$$\int\frac{dx}{x^2-12x+35}=\int\frac{dx}{(x-6)^2-1}$$
substitute $x-6=t$, $dx=dt$
$$=\int\frac{dt}{t^2-1}$$
partial fraction decomposition,
$$=\int{1\over 2}\left(\frac{1}{t-1}-\frac{1}{t+1}\right)dt$$
$$=\frac12(\ln|1-t|-\ln|1+t|)+c$$
$$=\frac12\left(\ln\left|\frac{1-t}{1+t}\right|\right)+c$$
substitute back to $t$
$$=\frac12\ln\left|\frac{7-x}{x-5}\right|+c$$
I am not sure if my answer correct. Can I integrate this without substitution?  Thank you
 [/INST] You can do that without substitution. Use partial fractions by factorizing denominator:$x^2-12x+35=(x-5)(x-7)$
$$\int \frac{dx}{x^2-12x+35}=\int \frac{dx}{(x-7)(x-5)}$$
$$=\int\frac12\left( \frac{1}{x-7}-\frac{1}{x-5}\right)dx$$
$$=\frac12(\ln\left| x-7\right|-\ln\left| x-5\right|)$$
$$=\frac12\ln\left| \frac{x-7}{x-5}\right|+C$$
</s>