# Calculate:$\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$$

-
Instead of continuing to rapidly fire questions without any kind of motivation or personal thoughts, you might want to slow down the pace and to add this kind of input to your future questions. – Did Apr 1 '13 at 8:29

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}$.

-
The idea is neat but you still have a factor of $x^{2q}$ in the numerator. How to deal with it? The substitution will be painfull or am I wrong? – Caran-d'Ache Apr 1 '13 at 7:52
Work it out - the fraction as I wrote it is the same as the fraction as written in the question. Multiply top and bottom of my fraction by $x^{2q}$, you'll see it. – Glen O Apr 1 '13 at 8:02
No, we are speaking about different things. I understand how to get from what you wrote what kalpeshmpopat had. I am saying that if you use your substitution $u=x^p+x^{-q}$ then the demoninator will be $\frac{1}{u^2}$ and in the numerator you will have $\frac{\mathrm{d u}}{\mathrm{d x}}$. But still you have a multiplier $x^{2q}$ which you'll have to turn into $u$. And that step will be painfull or I don't catch something. It would be quite nice to use integration by parts if it was not for this $x^{2q}$ – Caran-d'Ache Apr 1 '13 at 10:53
No, there's no additional multiplier. If $u=x^p+x^{-q}$, then $du=(px^{p-1}-qx^{-q-1})dx$, so the integral becomes $$\int \frac{du}{u^2}$$ – Glen O Apr 1 '13 at 11:26
Oh, yes, my fault I forgot about the denominator. – Caran-d'Ache Apr 1 '13 at 12:06

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.

-
If you look at the fraction as I wrote it in my solution, you'll see that your expression and substitution isn't ideal. The integrand will end up being derivative of function divided by square of function, so the result is actually quite neat. – Glen O Apr 1 '13 at 7:44