<s>[INST] Integration with substitution I want to integrate (2x+1)/((x^2 - 6x + 14)^3)
I'm guessing you use substitution but im unsure what to substitute, is it best to make u = x^2 or X^2-6x or even x^2 - 6x + 14
I find that it makes turning the top of the fraction into terms of u very difficult
 [/INST] Using Trigonometric substitution 
put $x-3=\sqrt5\tan\theta$ as $\displaystyle x^2-6x+14=(x-3)^2+(\sqrt5)^2$
$$\int \frac{2x+1}{(x^2-6x+14)^3}dx=\int\frac{2(\sqrt5\tan\theta+3)+1}{(5\sec^2\theta)^3}\sqrt5\sec^2\theta d\theta$$
$$=\frac1{25\sqrt5}\int(2\sqrt5\tan\theta+7)\cos^4\theta d\theta=\cdots$$
$$=\frac2{25}\int\sin\theta\cos^3\theta d\theta+\frac7{25\sqrt5}\int\cos^4\theta d\theta$$
The first integral can be managed by substituting $\cos\theta =u$
For the second one use Double-Angle Formulas  , $\displaystyle \cos^4\theta=\frac{(2\cos^2\theta)^2}4=\frac{(1+\cos2\theta)^2}4=\frac14+\frac{\cos2\theta}2+\frac{\cos^22\theta}4$ 
Again, $\displaystyle2\cos^22\theta=1+\cos4\theta$
As the principal value $\arctan$ lies $\left[-\frac\pi2,\frac\pi2\right]$
$\displaystyle\cos\theta=+\frac1{\sqrt{1+\tan^2\theta}}=\frac{\sqrt5}{\sqrt{x^2-6x+14}}$
and $\displaystyle\sin\theta=\tan\theta\cdot\cos\theta$
</s>