<s>[INST] Evaluate integral as a logarithm plus an arctangent. Evaluate the integral as a logarithm plus an arctangent.
$$ \int \frac{x}{3x^2-18x+45} \ dx $$
I just completed the square and couldn't continue.
$$ \int \frac{x}{3(x-3)^2+18} \ dx $$
Fixed a typo $18$ changed to $18 x$
 [/INST] $$\begin{align}
\int \frac{x}{3(x-3)^2+18} \ dx & = \frac 1 3 \cdot \frac 1 2 \int\frac{2(x-3)}{(x-3)^2 + 6} + \frac 1 3 \int \frac{3}{(x-3)^2+6}\,dx.
\end{align}
$$
The first integral can be handled by the substitution $u=(x-3)^2+6$ and $du=2(x-3)\,dx$.
Then:
$$
\int \frac{dx}{(x-3)^2+6} = \frac 1 6 \int \frac{dx}{\frac{(x-3)^2}{6}+ 1}.
$$
Let $u = \dfrac{x-3}{\sqrt{6}}$ and then $dx = \sqrt{6} \, du$.  You get an arctangent.
</s>