How do I evaluate this integral?
$$\int_{0}^{1}(-1)^x \mathrm dx$$
Do I need to use $e^{i\theta}=\cos(\theta)+i\sin(\theta)$
How do I evaluate this integral?
$$\int_{0}^{1}(-1)^x \mathrm dx$$
Do I need to use $e^{i\theta}=\cos(\theta)+i\sin(\theta)$
It has to be defined what $(-1)^x$ is. A possible approach would be to define $(-1)^x = e^{x\ln (-1)}$. However, $\ln(-1)$ is a complex logarithm which has infnitely many branches which gives $\ln(-1) = (2k+1)\pi i$ with some $k \in \mathbb Z$. Then in fact $e^{(2k+1)\pi i} = -1$. Doing so we get $$\int_0^1 (-1)^x dx = \int_0^1 e^{(2k+1)\pi i x} dx = \int_0^1 \cos((2k+1)\pi x) dx + i \int_0^1\sin((2k+1)\pi x) dx \\ = \left[ \sin((2k+1)\pi x)/(2k+1)\pi\right]_0^1 - i \left[ \cos((2k+1)\pi x)/(2k+1)\pi\right]_0^1 = 2i / (2k+1)\pi.$$
Note that there is some arbitraryness in this approach: For each choice of $k$ we get a different result.