<s>[INST] integrating fraction/completing the square Does anyone know how to integrate the following?
$\frac{dx}{9x^2 + 6x + 17}$
I have been trying for ages and cannot get an answer anywhere close to the answer I get on maple?
 [/INST] $$9x^2+6x+17=(3x)^2+2\cdot3x\cdot1+1^2+17-1=(3x+1)^2+4^2$$
Put $3x+1=4\tan\theta$ so that $(3x+1)^2+4^2=\cdots=16\sec^2\theta$ and $3dx=4\sec^2\theta d\theta$
So, $$\int \frac{dx}{9x^2+6x+17}=\int\frac{4\sec^2\theta d\theta}{3\cdot16\sec^2\theta}=\frac1{12}\int d\theta=\frac{\theta}{12}+C=\frac{\arctan\left(\frac{3x+1}4\right)}{12}+C$$
</s>