Find real part of $x^i$ without the “arg(x)”

complex numbers

I am a novice at complex analysis – more experienced in algebra and calculus (real).

To find the real part of $x^i$, I first had to do something: Solve $x^i = e^{iy}$ for y then find $a$ and $b$ using Euler's formula.

Take $\ln$ of both sides: $i\ln(x) = iy$, $y = \ln(x)$

$e^{i\ln(x)} = \cos(\ln(x)) + i\sin\left(\ln(x)\right)$, the real part of $x^i$ should be $\cos(\ln(x))$, but this is incorrect. According to WolframAlpha, there is a whole other part of the solution that I missed.

enter image description here

I had to look up what that thing, the "complex argument" function, was – it is the angle to the origin of right angle triangles made to find complex-plane coordinates. However, due to the fact that the other part of the equation with the ln is definitely real, the "arg" function has to be real – or otherwise this wouldn't be the "real part" of anything (e to an imaginary power doesn't show up on real graphs – it isn't real) – despite this, there was no straight-to-the-point formula on the internet giving $\arg(x)$ in terms of real elementary functions – instead they all referred back to the fact that $\arg(a + bi) = \tan^{-1}(\frac{b}{a})$ which I'm guessing they derived from the right triangle in the complex coordinates analysis – since WolframAlpha didn't bother to simplify it, it seemed like if I wanted to turn this function into a more familiar inverse tan function I had to express the identity function in terms of real and imaginary parts; $a = x$, $b = 0$ – therefore we get $\tan^{-1}(0) = 0$ – implying $e^0$ would cancel to $1$ and I was right after all, the function never even existed to begin with. However when plotted, the two graphs are not the same. How can I turn "$\arg(x)$" into a recognizable, elementary, real function? So that the real part of $x^i$ could be plotted on Desmos, for example. My guess is that it is an unfortunate byproduct of taking the natural logarithm of an imaginary number at the start or it is an unspoken condition related to Euler's formula.

Best Answer

$x^i$ is multivalued. As an example, consider $x=-2$. We have (as Gary pointed out) for $n\in\Bbb Z$,

$$-2 = e^{\ln(-2)} = e^{\ln\lvert-2\rvert+i\arg(-2)} e^{i2n\pi} = e^{\ln(2)} e^{i\left(2n\pi+\arg(-2)\right)} \\ \implies (-2)^i = e^{i\ln(2)} e^{-2n\pi-\arg(-2)} \\ \implies \Re (-2)^i = e^{-(2n+1)\pi} \cos(\ln(2))$$

WolframAlpha usually generates a table like this one when a result can be multivalued:

enter image description here

WolframAlpha assumes the principal branch, so that

$$x = e^{\ln\lvert x\rvert} e^{i\arg(x)} \implies x^i = e^{i\ln\lvert x\rvert} e^{-\arg(x)} \implies \Re x^i = \cos(\ln\lvert x\rvert) e^{-\arg(x)}$$

where

$$e^{-\arg(x)} = \begin{cases}e^{-\pi} & \text{if }x<0 \\1 & \text{otherwise}\end{cases}$$

It's a bit hard to tell with their default plot themes, but they do overlap:

enter image description here