$$\int \frac{4x^5-1}{(x^5+x+1)^2}\,dx=\int \frac{4x^5+5x^4-5x^4-1}{(x^5+x+1)^2}\,dx$$
$$=\int \frac{4x^5+5x^4}{(x^5+x+1)^2}\,dx-\int \frac{5x^4+1}{(x^5+x+1)^2}\,dx=J_1-J_2$$
$J_2$ can be handled by using the substitution $x^5+x+1=t$ and comes out to be $\dfrac{-1}{x^5+x+1}$. For $J_1$, factor out $x^{5}$ from the expression in parentheses in denominator, i.e:
$$J_1=\int \frac{4x^5+5x^4}{(x^5+x+1)^2}\,dx= \int \frac{\dfrac{4}{x^5}+\dfrac{5}{x^6}}{\left(1+\dfrac{1}{x^4}+\dfrac{1}{x^5}\right)^2}\,dx$$
Now use the substitution $1+\dfrac{1}{x^4}+\dfrac{1}{x^5}=t\Rightarrow -\left(\dfrac{4}{x^5}+\dfrac{5}{x^6}\right)\,dx=dt$, hence
$$J_1=-\int \frac{dt}{t^2}=\frac{1}{t}+C=\frac{x^5}{x^5+x+1}+C$$
Hence,
$$J_1-J_2=\frac{x^5}{x^5+x+1}+\frac{1}{x^5+x+1}+C=\boxed{\dfrac{x^5+1}{x^5+x+1}+C}$$