polynomial long division Integration $$
\int \frac{3x^2 +6x +2}{x^2 + 3x +2}dx
$$
I've been trying to solve this integral, my gut tells me to use polynomial long division so I factored and got
$$
\int \frac{3x^2 +6x +2}{(2+x)(1+x)}dx
$$
I have never done a division with two factors in the denominator, would anybody be able to help out?
 A: Guide:
$$3x^2+6x+2=3(x^2+3x+2)-3x-4$$
$$\frac{3x^2+6x+2}{x^2+3x+2}=3- \frac{3x+4}{(2+x)(1+x)}$$
You might like to perform partial fraction on the second term to solve the problem.
A: Alt. hint: $\;3x^2 +6x +2=3(x^2+3x+2)-3x-4=3(x+1)(x+2)-2(x+1)-(x+2)$
A: You do polynomial long division just like you do long division on integers.
$
\require{enclose}
\begin{array}{r}
                3  \\
x^2 + 3x + 2 \enclose{longdiv}{3x^2+6x+2} \\
     \underline{3x^2 + 9x + 6} \\
                -3x - 4  
\end{array}
$
$\frac {3x+6x + 2}{x^2+3x + 2} = 3 - \frac {3x+ 4}{x^2+3x+2}$
But I think what you are really looking for is something like
$\frac {3x^2+6x + 2}{x^2+3x + 2} = A + \frac {B}{x+1} + \frac {C}{x+2}\\
3x^2+6x + 2 = A(x^2 + 3x + 2) + B(x+2) + C(x+1)\\
3x^2 + 6x +2 = Ax^2  +(3A + B + C)x + (2A + 2B + C)$
The two polynomial are equal if all of the coefficients are equal
$A = 3\\
3A + B + C = 6\\
2A + 2B + C = 2$
And solve for $A,B,C$
A: $\int \frac{3x^2 +6x +2}{x^2 + 3x +2}dx
$
Since
$\dfrac1{x^2 + 3x +2}
=\dfrac1{(x+2)(x+1)}
=\dfrac1{x+1}-\dfrac1{x+2}
$
and
$\begin{array}\\
\dfrac{3x^2 +6x +2}{x^2 + 3x +2}
&=\dfrac{3(x^2+3x+2)-3(3x+2) +6x +2}{x^2 + 3x +2}\\
&=3-\dfrac{3x+4}{x^2 + 3x +2}\\
&=3-(3x+4)(\dfrac1{x+1}-\dfrac1{x+2})\\
&=3-\dfrac{3x+4}{x+1}-\dfrac{3x+4}{x+2}\\
&=3-\dfrac{3(x+1)+1}{x+1}+\dfrac{3(x+2)-2}{x+2}\\
&=3-3-\dfrac{1}{x+1}+3-\dfrac{2}{x+2}\\
&=3-\dfrac{1}{x+1}+\dfrac{2}{x+2}\\
\end{array}
$
and this you can
integrate by yourself.
