Integrating $\int\frac{5x^4+4x^5}{(x^5+x+1)^2}dx $ In the following integral:
$$I = \int\frac{5x^4+4x^5}{(x^5+x+1)^2}dx $$
I thought of making partial fractions , then solve it . 
But I am not able to make partial fractions.

This problem can be easily solved if you use the Ostrogadsky method. Let me just give a hint of the procedure to be used.

Let $P (x) $ and  $Q (x) $ be polynomials, where $Q (x) $ has repeated roots and $P (x)/Q (x) $ is a proper fraction, that is, no more polynomial long division can be done. Then, $$\int \frac {P(x)}{Q (x)} dx = \frac {P_1 (x)}{Q_1 (x)} +\int \frac {P_2 (x)}{Q_2 (x)} dx $$ Here $Q_1 (x) $ is the gcd of $Q (x) $ and it's derivative $Q'(x) $ ( computed using Euclidean algorithm) and $Q_2 (x)=Q (x)/Q_1 (x) $. We differentiate the integral equation on both sides and find suitable polynomials $P_1(x) $ and $P_2 (x) $ by solving a system of linear equations for their undetermined coefficients (very much like in partial fraction decomposition). The degrees of $P_1 (x) $ and $P_2 (x) $ are lower than that of $Q_1 (x) $ and $Q_2 (x) $ respectively. 

For our integral we have, $$P (x)= x^4 (4x+5) $$ $$Q (x)=(x^5+x+1)^2$$ $$Q'(x)=2 (5x^4+1)(x^5+x+1) $$ $$Q_1(x)=Q_2 (x)=x^5+x+1$$ We then get the polynomials $$P_1 (x)=-x-1 \text {  and  } P_2 (x)=0$$. Thus, $$I =\int \frac {5x^4+4x^5}{(x^5+x+1)^2} dx =-\frac {x+1}{x^5+x+1} $$ Hope it helps. 
