Find all roots of $2x^3+16$ in $\mathbb C$ Find all roots of $p(x) = 2 x^3 + 16$ in $\mathbb C$.


I found my answers to be x = 2, -1+i$\sqrt{3}$, -1+i$\sqrt{3}$.

But when I put the expression into Symbolab, it gives me -2, 1+i$\sqrt{3}$, 1+i$\sqrt{3}$ as roots of p(x) in C.

Can someone explain where I went wrong?

This is how I did it;

First, I rewrite p(x) and get

$2x^3+16=0$

$2x^3=-16$

$x^3=-8$ ------ (1)

Express (1) in Euler form

$x=re^{\theta i}$

$x^3=r^3e^{3\theta i}$

Let w = -8

$ |w| = \sqrt{(-8)^2} = 8$

$\theta = tan^{-1}(0) = 0$

$w = 8e^{0\theta}$

Now I have 

$r^3e^{3\theta i} = 8e^{0\theta}$

Equate the modulus and argument

$r^3 = 8$

$r = 2$

$3\theta = 0+2\pi k$ ------- for k $\in Z$

$\theta = {2\pi k \over 3}$

Now I have

$ x = 2(cos {2\pi k \over 3} + i sin {2\pi k \over 3})$

Calculating x by substituting k = 0,1,2

k = 0, x = 2

k = 1, x = 2(${-1 \over 2} + i {\sqrt{3} \over 2}$) = -1+i${\sqrt{3}}$

k = 2, x = 2(${-1 \over 2} - i {\sqrt{3} \over 2}$) = -1-i${\sqrt{3}}$

So all roots of p(x) in C are 2, -1-i${\sqrt{3}}$, -1+i${\sqrt{3}}$

.

.

.

I will be very appreciated if someone can help me out.
I will give three answers to three different questions.


  
  Can someone explain where I went wrong?
  


The complete rule for the argument of a complex number $z=x+i\,y$ is not simply $\theta=\tan^{-1} \frac{y}{x}$ but:
$$
\theta=
\begin{cases}
\arctan\frac{y}{x} &amp; x&gt;0 \\
\arctan\frac{y}{x}+\pi &amp; x&lt;0 \text{ and } y\ge 0 \\
\arctan\frac{y}{x}-\pi &amp; x&lt;0 \text{ and } y  &lt; 0 \\
\frac{\pi}{2} &amp; x=0 \text{ and } y  &gt; 0 \\
-\frac{\pi}{2} &amp; x=0 \text{ and } y  &lt; 0 \\
\text{undefined} &amp; x=0 \text{ and } y  = 0 \\
\end{cases}
$$
where $\arctan$ provides a value in $\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$.


  
  Which is the deep mathematical issue going on here?
  


The definition of inverse function. Some functions do not have a globally defined inverse. In this case, $\tan 0=\tan \pi=0$ so $\tan^{-1} 0$ is ambiguous. However, we can define $\tan:\left(-\frac{\pi}{2},\frac{\pi}{2}\right)\to\mathbb{R}$ and then this function is monotonically increasing thus invertible. The problem is then that we cannot obtain any possible argument, so we must consider all the cases above.


  3.a. In general, how can I do the exercises about complex numbers?


Drawing the unit circle. When $x&gt;0$-i.e. the complex number is in the first or fourth quadrant with argument $\theta\in\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$-then the formula $\arctan\frac{y}{x}$ gives the correct result. But imagine that you change the sign of a complex number, i.e. $x\gets -x$ and $y\gets -y$. Then:
$$\arctan\frac{-y}{-x}=\arctan\frac{y}{x}$$
and the $\arctan$ is unable to detect the change of sign. But if you draw the situation, you realize that you are in the second or third quadrants, so you get the value of the corresponding argument in $\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$ by the formula  $\arctan\frac{y}{x}$ and then "change sign"... but taking the opposite complex corresponds to half a turn of the circle, i.e. adding an angle of $\pi$ radians.

Now, a final detail: you can add multiples of $2\pi$ to the argument and you obtain the same complex number, because it corresponds to full turns of the circle. Then you have to fix a criterion, by defining a principal argument. Some people prefer $\theta\in[0,2\pi)$ whereas other use $\theta\in(-\pi,\pi]$. Whatever is your convention, in the computation above, you may end up with an argument outside your chosen interval, so you can freely add or subtract $2\pi$ as needed. For instance, in the formula above, when you are in the third quadrant, you should add $\pi$ to do the "half turn" corresponding to changing sign, but then you go out of the conventional interval, so you subtract $2\pi$ to go back. This is the explanation of the $-\pi$ of the third line of the formula, but mind that there are two processes going on here: adding $\pi$ is mandatory to go to the correct quadrant; subtracting $2\pi$ is somewhat optional, since it is only a convention to give the result in a unique way.

In other words,


  3.b. How can I learn by heart the formula above?


Don't even try. Nobody can. I strongly discourage it. It is much more instructive and less prone to errors to draw and understand really what is going on.
Another way you can calculate this is to use De Moivre's theorem, which states that if $z = r(\cos \theta + i\sin \theta)$, the $n$th roots of $z$ are $$r^{1/n}\left(\cos\frac{\theta+2\pi k}{n} + i \sin \frac{\theta+2\pi k}{n}\right)$$

From $(1)$, which is $x^3=-8$, we find that $z = 8(\cos \pi + i \sin \pi)$, so $r=8$, $\theta=\pi$ (because $8$ and $-8$ are opposite to each other), and $n=3$ (we are finding the $3$rd roots of $z$). Substituting these values into the formula, we have:

First root: $8^{1/3}(\cos \frac{\pi+2\pi *0}{3} + i \sin \frac{\pi+2\pi *0}{n}) = 2(\cos \frac{\pi}{3} + i\sin \frac{\pi}{3}) = 1+i\sqrt{3}$

Second root: $8^{1/3}(\cos \frac{\pi+2\pi *1}{3} + i \sin \frac{\pi+2\pi *1}{3}) = 2(\cos\pi+i \sin \pi) = -2$

Third root: $8^{1/3}(\cos \frac{\pi+2\pi *2}{3} + i \sin \frac{\pi+2\pi *2}{3}) = 2(\cos \frac{5\pi}{3} + i\sin\frac{5\pi}{3}) = 1-i\sqrt{3}$

Use the fact that $n$th roots of $z$ have $n$ complex roots. Have we have found all the complex $3$rd roots of $8$ yet?