Can $\int_0^1\frac{1+x^{2i}}{x^i(1+x^2)}dx $ be Evaluated Using Differentiating Under the Integral

integrationordinary differential equations

I'm trying to solve:
$$\int_0^1\frac{1+x^{2i}}{x^i(1+x^2)}dx $$

I don't know complex analysis so I tried using differentiating under the integral somehow to solve the integral but to no avail. I've tried:

$$I(a)=\int_0^1\frac{1+a^2x^{2i}}{x^i(1+x^2)}dx$$
$$I(a)=\int_0^1\frac{1+e^ax^{2i}}{x^i(1+x^2)}dx$$

Neither of which helped. I've tried setting up some differential equations using like using the second variable insertion, I was able to get:

$$I(a)-I'(a)=\int_0^1\frac{1}{x^i(1+x^2)}dx$$

Which seemed promising, but didn't lead anywhere.

Would be appreciated if someone could solve the integral using differentiating under the integral or other methods (except Complex Analysis I don't know residues and whatnot yet).

$i$ is the imaginary unit

Best Answer

Assuming $a\in(-1,1)$, it is not difficult to prove $$ f(a)=\int_{0}^{1}\frac{x^a+x^{-a}}{x^2+1}\,dx =\frac{1}{2}\int_{0}^{+\infty}\frac{x^a+x^{-a}}{x^2+1}\,dx = \int_{0}^{+\infty}\frac{x^a}{x^2+1}\,dx= \frac{\pi}{2\cos\frac{\pi a}{2}},$$ for instance by setting $\frac{1}{x^2+1}=u$, then invoking Euler's Beta function and the reflection formula for the $\Gamma$ function. Assuming that $x^i$ is defined as $\cos\log x+i\sin\log x$ for $x\in\mathbb{R}^+$, and similarly $x^z$ is defined as $\exp(z\operatorname{Log} x)$, with $\text{Log}$ being the principal determination of the complex logarithm, we have $$ \int_{0}^{1}\frac{x^i+x^{-i}}{x^2+1}\,dx = \frac{\pi}{2\cosh\frac{\pi}{2}} $$ since $f(z)$ is a holomorphic function in the region $|z|<1$ and it is continuous in a neighbourhood of $z=i$.