Complex integration with varying degrees

37 Views Asked by At

So I'm studying for an exam and going over past exams and one problem is causing me a little difficulty. Any help would be appreciated.

The problem is: Let $0 \leq p < n \in \mathbb{Z}$. Calculate the following integral by recalling notions from complex analysis:

$ \int_0^{+\infty} \frac{x^{2p}}{1 + x^{2n}}dx $

So here's what I've done so far. I figured I'd use a contour integration and so I split it up into a half-disk centered at $0$ with radius $R$ where I would take $R$ to infinity. By the contour I get that

$ \int_0^R \frac{x^{2p}}{1 + x^{2n}}dx + \int_0^{2\pi} \frac{(Re^{it})^{2p}}{1 + (Re^{it})^{2n}}Rie^{it}dt + \int_{-R}^0 \frac{x^{2p}}{1 + x^{2n}}dx = 2 \pi i \sum Res$

Where $\sum Res$ is just the shorthand for all residues found inside the contour.

It's easy to see that the middle term is just $0$ since $n > p$. This then leaves me with:

$ 2 \int_0^R \frac{x^{2p}}{1 + x^{2n}}dx = 2 \pi i \sum Res$

At which point I need to actually calculate the residues. It's easy to see that the only time that $1 + x^{2n} = 0$ is when $x = i$ or $x = -i$ and when $n$ is odd. Thus when $n$ is even we have that the integral is just $0$. But when $n$ is odd we have the fun formula to find the residue (noting that only $i$ is located inside of our contour)

$((x - i)^n \frac{x^{2p}}{1 + x^{2n}})^{(n-1)} $ where $(...)^{(n-1)}$ is the $n-1$-st derivative, and after taking the derivative we evaluate at $x = i$.

But this just seems weird. It feels like I'm doing something wrong because it seems as though calculating the residue would be ridiculously hard for an exam. Any ideas or hints as to what I'm doing wrong or where I can go to figure out how to solve this?

Thanks in advance.