Integrate $\int\frac{3x}{x^5+x^4+1}dx$ I have an integral which I solved. But, I am not sure whether my answer is right or not. The integral is $$\int\frac{3x}{x^5+x^4+1}dx$$ My answer $$3\left(-\dfrac{\displaystyle\sum_{\left\{Z:\>Z^3-Z+1=0\right\}}\frac{\left(2Z^2-3Z-1\right)\ln\left(\left|x-Z\right|\right)}{3Z^2-1}}{7}\\+\dfrac{\ln\left(x^2+x+1\right)}{7}-\dfrac{4\arctan\left(\frac{2x+1}{\sqrt{3}}\right)}{7\sqrt{3}}\right)$$

Maple agrees with your answer, except that  $\ln(|x-Z|)$ is replaced by $\ln(x-Z)$.  Maple does this because Maple considers $x$ to be a complex variable.  Two out of three of your zeros $Z$ are complex numbers anyway, so $\ln(|x-Z|)$ would be wrong even if $x$ is a real variable.

A simpler example.  Factor $(x^2+1) = (x+i)(x-i)$, then
apply partial fractions:
$$
\int \frac{dx}{x^2+1} = 
\int\left(\frac{i}{2}\;\frac{1}{x+i}-
\frac{i}{2}\;\frac{1}{x-i}\right) dx ,
$$
which is questionably equal to
$$
A(x):=\frac{i}{2}\ln|x+i|-\frac{i}{2}\ln|x-i|+C .
$$
I claim this is wrong.  Assuming $x$ is a real variable, compute the derivative
like this:
$$
\frac{d}{dx}\left(\frac{i}{2}\ln|x+i|\right)
=\frac{i}{4}\frac{d}{dx}\ln\big(|x+i|^2\big)
=\frac{i}{4}\frac{d}{dx}\ln\big(x^2+1\big)
=\frac{ix}{2(x^2+1)}
$$
and similarly
$$
\frac{d}{dx}\left(\frac{i}{2}\ln|x-i|\right)
=\frac{ix}{2(x^2+1)}
$$
so that
$$
\frac{d}{dx}\big(A(x)\big) = 0 .
$$
Thus $A(x)$ is not the antiderivative of $1/(x^2+1)$ .
The answer should be
$$
A_1(x) = \frac{i}{2}\ln(x+i)-\frac{i}{2}\ln(x-i)+C
$$
without the absolute values.  Regardless of which branches of the logarithms you choose,
$$
\frac{d}{dx}\big(A_1(x)\big) = \frac{1}{x^2+1} .
$$
In fact, for the principal values of the logs, $A_1(x)$ is real.
