# Partial-Fraction Decomposition

So I was doing some integrals and ran across this one: $$\int{\frac{3x+1}{x^2+4x+4}}dx=\int{\frac{3x+1}{(x+2)(x+2)}}dx$$

Of course, I started decomposing the fraction and immediately realized it won't work the usual way because the system of equations would have no solutions. I know i need to include $x$ somewhere when decomposing, but I never got the hold of that.

• The general form you want to use here is $\frac{A}{x+2}+\frac{B}{(x+2)^2}$. – user84413 Mar 1 '15 at 21:34

$$3x + 1 = 3(x + 2) - 5$$
$$\frac{3x + 1}{(x + 2)^2} = \frac{3}{x + 2} - \frac{5}{(x + 2)^2}.$$
\begin{align}\frac{3x+1}{(x+2)^2}=&\frac{3(x+2)-5}{(x+2)^2}=&\frac{3}{x+2}-\frac{5}{(x+2)^2}\end{align} and from there you can integrate