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
I would suggest to use the formula $$\int\frac{du}{u^2+a^2}=\frac{1}{a}\arctan\frac{u}{a}+C.$$ Now, we have $$\int\frac{3}{x^2+12x+45}dx=3\int\frac{dx}{(x+6)^2+9}.$$ With $a=3$ and $u=x+6$, you will get what you want.