Partial fractions integration Re-express $\dfrac{6x^5 + x^2 + x + 2}{(x^2 + 2x + 1)(2x^2 - x + 4)(x+1)}$  in terms of partial fractions and compute the indefinite integral $\dfrac{1}5{}\int f(x)dx $ using the result from the first part of the question.
 A: Hint
Use $$\dfrac{6x^5 + x^2 + x + 2}{(x^2 + 2x + 1)(2x^2 - x + 4)(x+1)}=\frac{A}{(x+1)^3}+\frac{B}{(x+1)^2}+\frac{C}{x+1}+\frac{Dx+E}{2x^2-x+4}+F$$
and solve for $A,B,C,D,E$ and $F$.
Explanation
Note that this partial fraction decomposition is a case where the degree of the numerator and denominator are the same. (Just notice that the sum of the highest degree terms in the denominator is $2+2+1=5.$) This means that the typical use of partial fraction decomposition does not apply.
Furthermore, notice that $(x^2+2x+1)$ factorizes as $(x+1)^2$, which means the denominator is really $(x+1)^3(2x^2-x+4)$. This means the most basic decomposition would involve denominators of $(x+1)^3$ and $(2x^2-x+4)$. However, we can escape that by using a more complicated decomposition involving the denominators $(x+1)^3$, $(x+1)^2$, $(x+1)$, and $(2x^2-x+4)$. The $F$ term is necessary for the $6x^5$ term to arise in the multiplication, intuitively speaking.
More thoroughly stated, the $F$ term is needed because of the following equivalency between $6x^5+x^2+x+2$ and the following expression:
$$
\begin{align}
&A(2x^2-x+4)\\
+&B(2x^2-x+4)(x+1)\\
+&C(2x^2-x+4)(x+1)^2\\
+&[Dx+E](x+1)^3\\
+&F(2x^2-x+4)(x+1)^3.
\end{align}
$$
Notice how the term $F(2x^2-x+4)(x+1)^3$ is the only possible term that can give rise to $6x^5$? That is precisely why it is there.
Hint 2
Part 1
In the integration of $\frac{1}{5}\int f(x)dx$, first separate the integral, $\int f(x)dx$ into many small integrals with the constants removed from the integrals. That is, $\int f(x) dx$ is
$$A\int \frac{1}{(x+1)^3}dx+B\int \frac{1}{(x+1)^2}dx+C\int \frac{1}{x+1}dx+D\int \frac{x}{2x^2-x+4}dx\quad+E\int \frac{1}{2x^2-x+4}dx+F\int 1dx.$$
Part 2
Next, use the substitution $u=x+1$ with $du=dx$ on the first three small integrals:
$$A\int \frac{1}{u^3}du+B\int \frac{1}{u^2}du+C\int \frac{1}{u}du+D\int \frac{x}{2x^2-x+4}dx+E\int \frac{1}{2x^2-x+4}dx\quad +F\int 1dx.$$
Part 3
To deal with the integral $\int \frac{1}{2x^2-x+4}dx$, you must complete the square. This is done as follows:
$$
\begin{align}
\int \frac{1}{2x^2-x+4}dx&=\int \frac{\frac{1}{2}}{x^2-\frac{1}{2}x+2}dx\\
&=\frac{1}{2} \int \frac{1}{\left(x-\frac{1}{4}\right)^2+\frac{31}{16}}dx.
\end{align}
$$
To conclude, you make the trig substitution $x-\frac{1}{4}=\frac{\sqrt{31}}{4}\tan \theta$ with $dx=\left(\frac{\sqrt{31}}{4}\tan \theta+\frac{1}{4}\right)'d\theta=\frac{\sqrt{31}}{4}\sec^2\theta  d\theta$. This gives you:
$$\frac{1}{2} \int \frac{1}{\left(x-\frac{1}{4}\right)^2+\frac{31}{16}}dx=\frac{1}{2} \int \frac{\frac{\sqrt{31}}{4}\sec^2 \theta}{\frac{31}{16}\tan^2\theta+\frac{31}{16}}d\theta.$$
