0

When calculating $(-2)^{\pi}$ we get: $$ Z=(-2)^π=2^π (\cos(π^2(2k+1))+i \sin(π^2(2k+1))),\quad k \in \mathbb{Z} $$ at $k=0$: $$z=(-2)^π=2^π(\cos(π^2)+i \sin(π^2))$$

Now $z^{1/π}$ must be $-2$

no software can get -2 ... and I keep getting a wrong argument (or phase angle) although the abs is correct which is 2 as shown in the attached pic using julia programming language.

Does anyone have a good interpretation of that and how can we get the correct value?

enter image description here

Matti P.
  • 6,012
Ahmed
  • 61
  • 5
  • 2
    Yeah, it's not a good idea to calculate non-integer powers of negative numbers: https://math.stackexchange.com/questions/1211/non-integer-powers-of-negative-numbers – Matti P. Nov 04 '19 at 06:53
  • Absolutely no software? Are you sure of this? – Allawonder Nov 04 '19 at 17:32
  • By the way, this is simply an issue with those who programmed the calculators you've used. You're supposed to get $-1$ if we allow the law $(a^m)^n=a^{mn}$ to hold here, which we may allow if we don't mind multiple values in our "equations." – Allawonder Nov 04 '19 at 17:40

1 Answers1

2

Now $z^{1/\pi}$ must be $−2$

Why? This intuition is often coming from the "rule" $(a^b)^c = a^{bc}$ but this only applies in special circumstances when dealing with complex-valued exponentiation. In fact, in this context, the cases where that equality holds would be more appropriately seen as the exception to the rule, rather than the rule itself.

As for what is happening here? It's just trigonometry. When you evaluate $$\cos(\pi^2)+i\sin(\pi^2) = \cos(\pi^2-4\pi)+i\sin(\pi^2-4\pi),$$ its principal angle is $\pi^2 - 4\pi,$ not $\pi^2.$ Then when you divide the angle by $\pi,$ you get $$\frac{\pi^2 - 4\pi}{\pi} = \pi - 4 \approx -0.858407346$$


As for your ultimate question of "how can we get the correct value?" I don't know if there is a way to systematically do it. In this case, you'd need to take the original exponent ($\pi$), multiply it by $\pi$ (to get $\pi^2$), and then find which branch this angle is in -- in this case, $$-\pi + 2k\pi < \pi^2 < \pi+2k\pi \implies k=2.$$ Then when you take the next power ($1/\pi$) you'd need to tell your program to use that branch rather than the principal branch.

  • Thanks for your clarification.

    Shouldn’t the principal angle be between 0 and 2π? In our case the principal angle should be (π^2-2π).

    Also shouldn’t we use 0+2πk and 2π+2πk in your inequality?

    And using k=2 gives 5π^2 in the original equation which leads to the same result. Finally, I was using the interactive Julia session online so it’s more like a calculator than a program. https://repl.it/languages/julia

    – Ahmed Nov 05 '19 at 22:40
  • 1
    @Ahmed How we define the principal angle is really just a matter of convention. In julia, it seems that angle(z) gives a value $(-\pi, \pi]$. For instance, try angle(-1) and angle(-1-0.00001*im) which is also why my inequality had $-\pi$ and $\pi.$ – Brian Moehring Nov 05 '19 at 23:04
  • 1
    I don't really follow that you mean when you say "And using k=2 gives 5π^2 in the original equation which leads to the same result." As for the last comment about Julia, it seems to be similar to R, matlab, or some Python IDEs in that it runs the code as you're typing it rather than compiling and running later. I would still call it a program -- though the distinction is justifiably blurry -- since you can still define structures and functions and do standard programming tricks like recursion – Brian Moehring Nov 05 '19 at 23:10