Hi I was trying to solve this integral:
$\int_{0}^{\infty}e^{ix}dx$
When I integrate it normally and apply limits, I get an undefined answer as $e^{\infty}=\infty$
But if I take $i$ as $-\frac{1}{i}$, I get:
$\int_{0}^{\infty}e^{-\frac{1}{i}x}dx= \frac{1}{i}[e^{-\frac{1}{i}x}]_0^\infty = \frac{1}{i}[0-1]=i$
So, which one is the right answer ?
The integral does not converge, the problem with your second approach (and also the first one in retrospective) is the simplification at the end when writing $$ \frac{1}{i}\big[e^{-x/i}\big]_0^\infty = \frac{1}{i}[0 - 1] $$
You have to be more careful, when evaluating at infinity when complex numbers are involved. Using the definition of improper integral (to evaluate at "$\infty$") and the Euler identity to expand $e^{ix}$: $$ \lim_{x\to\infty} e^{-x/i} = \lim_{x\to\infty} e^{ix} = \lim_{x\to\infty} \big( \cos(x) + i\cdot\sin(x)\big) $$ and both the real and complex part of the limit diverges. This show that $e^{ix} \not\to \infty$ as in fact the norm of $e^{ix}$ is always 1, i.e. $|e^{ix}| = 1$.