Find following integration
$$\int \frac{px^{p+2q-1} - qx^{q-1}}{x^{2p+2q}+2x^{p+q}+1} dx $$
Find following integration
$$\int \frac{px^{p+2q-1} - qx^{q-1}}{x^{2p+2q}+2x^{p+q}+1} dx $$
Write the fraction in the form
$$ \frac{px^{p-1}-qx^{-q-1}}{(x^p+x^{-q})^2} $$ From here, you should be able to figure it out, using the substitution $u=x^p+x^{-q}$.
Well, not a pleasant integral. May be this will be of any help. First simplify the denominator:$$x^{2p+2q}+2x^{p+q}+1=(x^{p+q}+1)^2 dx$$ Then the numerator (will try to make the same power as in the denominator to change variable): $$px^{p+2q-1} - qx^{q-1}=x^{p+q-1}(px^q-qx^{-p})$$ Then place $x^{p+q-1}$ under differentiation sign. And you'll get: $$\frac{1}{p+q}\int \frac{(px^q-qx^{-p})}{(x^{p+q}+1)^2} dx^{p+q}$$ Then you can change the variable to $t=x^{p+q}$. But the result still will not be very nice. $$\frac{1}{p+q}\int \frac{(pt^{\frac{q}{p+q}}-qt^{-{\frac{p}{p+q}}})}{(t+1)^2} dt$$ Mathematica say it will be $$-\frac{1}{p+q}\frac{(p+q) t^{\frac{q}{p+q}}}{t+1}$$ But each of the integrals has the answer in terms of Gauss hypergeometric function.