integral of (x-3)/(x^2 + 2x + 4)
Since the denominator is not easily factorable and PFD does not help much, we can try completing the square.
$\displaystyle \int\frac{x-3}{x^{2}+2x+4}dx$
$\displaystyle \int\frac{x-3}{(x+1)^{2}+3}dx$
Now, let $\displaystyle u=x+1, \;\ du=dx, \;\ x=u-1$
$\displaystyle \int\frac{u-4}{u^{2}+3}du=\int\frac{u}{u^{2}+3}du-4\int\frac{1}{u^{2}+3}du$
Now, it's just a matter of ln and arctan.
On post #2 was told that $\displaystyle x^2+2x+4=(x+1)^2+3,$ now you have to compute $\displaystyle \int{\frac{dx}{{{\big({{\left( x+1 \right)}^{2}}+3\big)}^{2}}}}.$
Put $\displaystyle \sqrt3u=x+1$ and the integral becomes $\displaystyle \frac{1}{3\sqrt{3}}\int{\frac{du}{{{\left( {{u}^{2}}+1 \right)}^{2}}}}.$ Now, for this one, put $\displaystyle u=\frac1v$ and the integral becomes,
$\displaystyle \begin{aligned}
-\int{\frac{{{v}^{2}}}{{{\left( {{v}^{2}}+1 \right)}^{2}}}\,dv}&=-\int{\left\{ -\frac{1}{2\left( {{v}^{2}}+1 \right)} \right\}'v\,dv} \\
& =-\left( -\frac{v}{2\left( {{v}^{2}}+1 \right)}+\frac{1}{2}\int{\frac{dv}{{{v}^{2}}+1}} \right) \\
& =\frac{1}{2}\left( \frac{v}{{{v}^{2}}+1}-\arctan v \right)+{{k}_{1}}.
\end{aligned}$
Now put everything together and we get,
$\displaystyle \int\frac{dx}{\big(x^2+2x+4\big)^2}\,dx=\frac{1}{6 \sqrt{3}}\left( \frac{\sqrt{3}(x+1)}{{{x}^{2}}+2x+4}+\arctan \frac{\sqrt{3}}{x+1} \right)+k.$