13
$\begingroup$

I know that $\left ( -1 \right )^{2/3}=\left ( \left ( -1 \right )^{2} \right )^{1/3}=1$

But Matlab computes this as $- 0.5 + 0.8660254038i$ a complex number.Why?

  • 1
    Remember that in the complex numbers there are *three* third roots for $1$; and that $\sqrt[3]{-1}^2$ is not necessarily the same thing as $\sqrt[3]{(-1)^2}$ for complex numbers.2012-10-17

4 Answers 4

9

By convention, $-\frac12 + \frac{\sqrt3}2i \approx -0.5+0.866i$ is the principal value of $(-1)^\frac23$.

In particular, Matlab is presumably evaluating $(-1)^\frac23$ as $\exp(\frac23\log(-1))$ and choosing the principal branch of the logarithm, where $\log(-1) = \pi i$, and thus ending up with

$\begin{aligned} (-1)^\frac23 &= \exp\left(\tfrac23\log(-1)\right) \\ &= \exp\left(\tfrac23\pi i\right) \\ &= -\frac12+\frac{\sqrt3}2 i \\ &\approx -0.5+0.866i. \end{aligned}$

  • 0
    Wolfram Alpha gives the principal root, but then is kind enough to ask you whether you would prefer the real-valued root.2015-05-12
6

Terminology. The way Matlab seems to be seeing this, when you ask for $k^{2/3}$, you are asking for the number $z$ that solves the equation $ z^3 = k^2. $

In case $k = -1$, there are three solutions to this equation in the complex plane, one of which happens to be the real number 1, and for some reason Matlab has instead given you the one in the second quadrant. I am a little surprised that it is reading the input this way; it seems to me that from the standpoint of applied math it ought to return the unique real root when it exists, unless you specifically ask it not to.

2

If the argument of the function is taken to be a complex number, the roots of (negative) unity are given by the equation $e^\frac{i\pi(2k - 1)}{n}, k = 1,2,3...n.$ So for $n=3$, the third roots of unity will be $e^\frac{i\pi}{3} \approx 0.5 + 0.866i $, $e^{i\pi} = -1$, and $e^\frac{i5\pi}{3} \approx 0.5 - 0.866i$. Squaring these gives the three solutions mentioned above by countinghaus: $-0.5 + 0.866i$, $1$, and $-0.5 - 0.866i$.

0

Because:

$(-1)^{\frac{2}{3}}=\left|(-1)^{\frac{2}{3}}\right|e^{\arg\left((-1)^{\frac{2}{3}}\right)i}=1e^{\frac{2}{3}\pi i}=e^{\frac{2}{3}\pi i}=\cos\left(\frac{2}{3}\pi\right)+\sin\left(\frac{2}{3}\pi\right)i=$

$-\frac{1}{2}+\frac{\sqrt{3}}{2}i$

  • 0
    You can't do that! You are using the value of $\arg((-1)^\frac23)$ to evaulate $(-1)^\frac23$.2015-05-12