I want to calculate $\int_0^{\infty} x^p /(x^4+1) dx$ where $-1 < p < 3$. My first guess is to let $f(z) := \frac {z^p}{z^4+1}$ and integrate this over $\gamma_R$ where $$ \gamma_r = [-R,R] \cup \{Re^{i\theta} : \theta \in [0,\pi] \} $$ The simple poles of $f$ are in $e^{k \pi i /4}$ where $k\in \{1,3,5,7\}$ so two of the poles lie in $\gamma_R$ for $R > 1$.
Is this a good approach ?