<s>[INST] $\tan(\theta) = \frac{a}{b}$ s.t. $\gcd(a,b) = 1$, $a+b$ is odd. Show $\theta$ can be trisected iff $a^2 + b^2$ is a perfect cube I've been stuck on this problem for quite some time. 
Let tan$(\theta) = \dfrac{a}{b}$ s.t. $a,b \in \mathbb{Z}$, $b \neq 0$, $\gcd(a,b) = 1,$ and $a+b$ is odd. Show $\theta$ can be trisected iff $a^2 + b^2$ is a perfect cube.
What I've come up with so far is:
Let $\phi = \dfrac{\theta}{3}$, then $$\tan(\theta)=\frac{3\tan(\phi)-\tan^3(\phi)}{1-3\tan^2(\phi)}.$$ Thus $\tan(\phi)$ is a zero of $$f(t) = t^3 -3t^2\tan(\theta)-3t+\tan(\theta)$$ and thus a zero of 
$$g(t) = bt^3-3t^2a-3bt+a$$
I know that if I can show that $g$ is reducible iff $a^2 + b^2$ is a perfect cube, then I'm done, but I'm unsure of how to show this. 
The book gave a hint of considering that $\mathbb{Z}[i]$ is a UFD, which I don't know how to use in relation to this problem. 
 [/INST] Since $R=\mathbb Z[i]$ is a UFD, you can factorize $a+bi$ as a product of primes raised to certain exponents. Classifying exponents according to their value modulo $3$ (which can be $0,1$ or $2$), you can write $a+bi=x^3yz^2$ with $x,y,z\in R$ and $y$ and $z$ are coprime in $R$.
Suppose that the norm $N(a+bi)=a^2+b^2$ is a perfect cube, say $a^2+b^2=w^3$ with $w\in {\mathbb N}$. We then have the equality (in $\mathbb N$) $|x|^3 |y| |z|^2=w^3$, and $|y|$
and $|z|$ are coprime. This is possible only if $|y|=|z|=1$, so $y$ and $z$ are units in $R$, but then $y,z$ are in $\lbrace \pm 1,\pm i \rbrace$ whence $a+bi=(xy^3z^6)^2$, so that $a+bi$ is a perfect cube in $R$. The implication in the other side being trivial, we have :
$$ a^2+b^2 \text{ is a perfect cube in } {\mathbb Z} \Leftrightarrow
a+bi \text{ is a perfect cube in } R \tag{1} $$.
Then, $\theta$ is trisectable iff $\frac{a}{b}=\frac{t^3-3t}{3t^2-1}$ for some $t\in{\mathbb Q}$, iff $\frac{a}{b}=\frac{c^3-3cd^2}{3dc^2-d^3}$ for some coprime $c,d\in{\mathbb Z}$ with $d\neq 0$ and $3c^2-d^2\neq 0$ (put $t=\frac{c}{d}$). Let $C=c^3-3cd^2$ and $D=3dc^2-d^3$. I claim that 
$$ \text{ if } p>2 \text{ is a prime in } {\mathbb Z}, \text{ it cannot divide both }
C \text { and } D  \tag{2}$$
For suppose that this were the case, and that $p$ divides both $C=c(c^2-3d^2)$ and $D=d(3c^2-d^2)$. If $p$ divides $c$, then $p$ cannot divide $d$ and so must divide $3c^2-d^2$, and hence divides $d^2$, contradiction. So $p$ cannot divide $c$, and similarly $p$ cannot divide $d$. So $p$ divides $u=c^2-3d^2$ and $v=3c^2-d^2$, and hence divides $u+3v=10c^2$, so that $p$ divides $10$. So $p=5$. But then $-3 \equiv \big(\frac{c}{d}\big)^2 [{\sf{mod}}\ 5]$ is a square modulo $5$ which is absurd. Next, we can show that
$$ \text{ if } p=2,\ p \text{  cannot divide both }
C \text { and } D  \tag{3}$$
For suppose that this were the case. Then $c$ and $d$ are both odd, and it follows that $C$ and $D$ are both congruent to $2$ modulo $4$, and hence $\frac{C}{2}$ and $\frac{D}{2}$ are coprime by (2). Then $\frac{a}{b}=\frac{C/2}{D/2}$ forces $(a,b)=(\varepsilon\frac{C}{2},\varepsilon\frac{D}{2})$  for some $\varepsilon=\pm 1$, contradicting the hypothesis that $a+b$ is odd.
From (2) and (3) we deduce that $C$ and $D$ are coprime. Then $\frac{a}{b}=\frac{C}{D}$ forces $(a,b)=(\varepsilon C,\varepsilon D)$  for some $\varepsilon=\pm 1$. Replacing $(c,d)$ with $(-c,-d)$, we may assume without loss that $\varepsilon= 1$.
So $\theta$ is trisectable iff $a=c^3-3cd^2, b=3dc^2-d^3$ for some some coprime $c,d\in{\mathbb Z}$ with $d\neq 0$ and $3c^2-d^2\neq 0$. But this is exactly equivalent to
$a+bi=(c+di)^3$, and we are then done by (1).
</s>