The quantity $i^x$ by itself is not well-defined. The way one would like to define it is $i^x = e^{x\log i}$, and then use the Taylor series for the exponential to compute $e^{x\log i}$. The problem with this is that $\log i$ is not well-defined: there are infinitely many possible values of $\log i$, namely $\log i = \frac{\pi i}{2} + 2\pi in$ for any $n\in \mathbb{Z}$. Thus to define $i^x$, you have to make a choice as to which one of these logarithms you are using. The standard choice would be $\log i = \pi i/2$. In this case, $i^x = e^{x\log i} = e^{i\pi x/2} = \cos(\pi x/2) + i\sin(\pi x/2).$ However, if you had chosen $\log i = \pi i/2 + 2\pi in$ for some $n\neq 0$, then $i^x = e^{x(\pi i/2 + 2\pi in)} = \cos(\pi x/2 + 2\pi nx) + i\sin(\pi x/2 + 2\pi nx).$