Hello Jamie,
We are given to evaluate:
$$I=\int\frac{3x+2}{x^2+3x+1}\,dx$$
I would look at the partial fraction decomposition of the integrand. Application of the quadratic formula gives us the roots of the denominator as:
$$x=\frac{-3\pm\sqrt{5}}{2}$$
Hence, we may state:
$$x^2+3x+1=\frac{1}{4}\left(2x+3-\sqrt{5} \right)\left(2x+3+\sqrt{5} \right)$$
And so the integrand may be expressed as:
$$\frac{4(3x+2)}{\left(2x+3-\sqrt{5} \right)\left(2x+3+\sqrt{5} \right)}$$
Thus, we may assume the partial fraction of this integrand will take the form:
$$\frac{4(3x+2)}{\left(2x+3-\sqrt{5} \right)\left(2x+3+\sqrt{5} \right)}=\frac{A}{2x+3-\sqrt{5}}+\frac{B}{2x+3+\sqrt{5}}$$
Using the
Heaviside cover-up method, we find:
$$A=\frac{4\left(3\left(\dfrac{-3+\sqrt{5}}{2} \right)+2 \right)}{2\left(\dfrac{-3+\sqrt{5}}{2} \right)+3+\sqrt{5}}=3-\sqrt{5}$$
$$B=\frac{4\left(3\left(\dfrac{-3-\sqrt{5}}{2} \right)+2 \right)}{2\left(\dfrac{-3-\sqrt{5}}{2} \right)+3-\sqrt{5}}=3+\sqrt{5}$$
And so we find:
$$\frac{4(3x+2)}{\left(2x+3-\sqrt{5} \right)\left(2x+3+\sqrt{5} \right)}=\frac{3-\sqrt{5}}{2x+3-\sqrt{5}}+\frac{3+\sqrt{5}}{2x+3+\sqrt{5}}$$
And we may now state:
$$I=\frac{3-\sqrt{5}}{2}\int\frac{2}{2x+3-\sqrt{5}}\,dx+\frac{3+\sqrt{5}}{2}\int\frac{2}{2x+3+\sqrt{5}}\,dx$$
Using the integration rule:
$$\int\frac{du}{u+a}\,du=\ln|u+a|+C$$
we find:
$$I=\frac{3-\sqrt{5}}{2}\ln|2x+3-\sqrt{5}|+\frac{3+\sqrt{5}}{2}\ln|2x+3+\sqrt{5}|+C$$
$$I=\frac{1}{2}\left((3-\sqrt{5})\ln|2x+3-\sqrt{5}|+(3+\sqrt{5})\ln|2x+3+\sqrt{5}| \right)+C$$
And in conclusion, we may now state:
$$\int\frac{3x+2}{x^2+3x+1}\,dx=\frac{1}{2}\left((3-\sqrt{5})\ln|2x+3-\sqrt{5}|+(3+\sqrt{5})\ln|2x+3+\sqrt{5}| \right)+C$$