My problem is: $$\int\frac{2x+6}{x^2+6x+18}\mathrm dx$$ This is part of a larger integral so I didn't see the $y=x^2+6x+18$ substitution straight away. My concern is what was wrong with my working in the first place: I substituted $3u=x+3$ to get $$\int\frac{6u}{9u^2+9}\cdot 3\mathrm du$$ $$=\int\frac{2u}{u^2+1}\mathrm du$$ $$=\int\frac{\mathrm dv}{v}$$ where $v=u^2+1$ $$=\ln(u^2+1)+C\\=\ln\left(\frac{x^2}{9}+\frac{2x}{3}+2\right)+C$$ However, if I go back to my original observation that I can substitute $y=x^2+6x+18$, I get $$\int\frac{\mathrm dy}{y}\\=\ln(x^2+6x+18)+C$$
What did I do wrong the first time?