<s>[INST] Integrating $\int \frac{3}{x^2+12x+45}$ My professor is giving a mastery exam over integrals and one of the sections covered is un-factorable quadratics like this problem that are supposed to be done by completing the square.
$$\int \frac{3}{x^2+12x+45}$$
Completing the square and everything gives $$\int \frac{3}{(x+6)^2+9}$$
I figured the answer would be somewhere in the range of $$\frac{1}{3} \tan^{-1}\Biggl(\frac{x+6}{9}\Biggl)+c$$
like I learned in the textbook aside from not knowing what to do with the three. Anyways the answer is somehow $$\tan^{-1}\Biggl(\frac{x}{3}+2\Biggl) + c$$ and I don't know what I did wrong
 [/INST] Since\begin{align}\int\frac3{x^2+12x+45}\,\mathrm dx&=\int\frac3{(x+6)^2+9}\,\mathrm dx\\&=\int\frac{\frac39}{\frac{(x+6)^2}9+1}\,\mathrm dx\\&=\int\frac{\frac13}{\left(\frac{x+6}3\right)^2+1}\,\mathrm dx,\end{align}the substitution $y=\frac{x+6}3$ leads indeed to the answer $\arctan\left(\frac{x+6}3\right)$.
</s>