# Finding the roots of any cubic with trigonometric roots.

Question: How would you find the roots of a cubic polynomial whose roots are only expressive in trigonometric forms?

I'm really confused on how you would solve it. Some examples:$$x^3+x^2-2x-1=0\\x_1=2\cos\frac {2\pi}7,x_2=2\cos\frac {4\pi}7,x_3=2\cos\frac {8\pi}7\tag{1}$$$$x^3-x^2-9x+1=0\\x_1=4\cos\frac {2\pi}7,x_2=4\cos\frac {4\pi}7+1,x_3=4\cos\frac {8\pi}7+1\tag{2}$$$$x^3+x^2-6x-7=0\\x_1=2\left(\cos\frac {4\pi}{19}+\cos\frac {6\pi}{19}+\cos\frac {10\pi}{19}\right)\\x_2=2\left(\cos\frac {2\pi}{19}+\cos\frac {14\pi}{19}+\cos\frac {16\pi}{19}\right)\\x_3=2\left(\cos\frac {8\pi}{19}+\cos\frac {12\pi}{19}+\cos\frac {20\pi}{19}\right)\tag{3}$$ With $(3)$ being a very famous relation with this problem.

Now that I know it's possible, I'm wondering if there is a simple way to find the roots of any cubic with trigonometric roots. And is it possible to use the method to find the roots of cubics such as $x^3+x^2-10x-8=0$?

• I don't know what you mean by "simple", but you may want to study history of Cardano and Tartaglia (leading up to Cardano's formula for cubics which encompasses your cubic equations) – imranfat Oct 23 '16 at 0:44
• – Will Jagy Oct 23 '16 at 1:45
• math.stackexchange.com/questions/1980175/… – Will Jagy Oct 23 '16 at 1:50
• mercio gave a detailed answer. In particular, a root of $x^3+x^2-10x-8=0$ is $$x = 2\left(\cos\tfrac {2\pi}{31}+\cos\tfrac {4\pi}{31}+\cos\tfrac {8\pi}{31}+\cos\tfrac {16\pi}{31}+\cos\tfrac {32\pi}{31}\right) =3.083872\dots$$ – Tito Piezas III Oct 25 '16 at 1:36
• @mercio: Can you look at this question? – Tito Piezas III Oct 27 '16 at 5:59

For $x^3+x^2-10x-8 = 0$.

$(\Bbb Z/31 \Bbb Z)^*/\{\pm 1\}$ is cyclic of order $15$, so it has only one subgroup $H$ of index $3$.
$H = \{\pm 1; \pm 2; \pm 4; \pm 8; \pm 15\}$ (generated by $\pm 2$)

So, the roots should be integer combinations of the quantities $\sum_{n \in kH} 2\cos(\frac {2n\pi}{31})$ where $kH \in G/H$ are the three cosets of $H$

In fact, the roots are exactly those sums

$\sum_{n \in H} 2\cos(\frac {2n\pi}{31}) = 3.083872... \\ \sum_{n \in 3H} 2\cos(\frac {2n\pi}{31}) = -0.786802... \\ \sum_{n \in 9H} 2\cos(\frac {2n\pi}{31}) = -3.297071...$

However, it can't be related to an equation like $x = \sqrt {2a + \sqrt {2a +\sqrt {2a + x}}}$ because modulo $2$, the action of the Frobenius automorphism would permute the roots cyclically, while here, the Frobenius acts trivially because $\pm 2 \in H$ (or equivalently, because $2$ is a cube mod $31$).

• The other occurrence of the same question is math.stackexchange.com/questions/1980175/… Cannot tell whether you have seen my comment on your 2014 post.. – Will Jagy Oct 23 '16 at 22:24
• yeah that's how i found this. Also this reminded me of math.stackexchange.com/questions/989183/… – mercio Oct 23 '16 at 22:25
• @mercio .... Why are you and Tito so smart? Anyhow, what do I have to learn before I am able to understand this? What's the prerequisite knowledge? – Frank Oct 25 '16 at 2:11
• @Frank you need to know Galois theory, its fundamental theorem and then the Kronecker-Weber theorem. Combining those two tells you how the abelian real extensions of $\Bbb Q$ are all trigonometric and what sum of cosines to pick. This was the only one ramified above only $2$ and $31$. – mercio Oct 25 '16 at 8:48
• Can you look at this question? – Tito Piezas III Nov 20 '16 at 5:22

The strategy to solve a cubic equation is first to change it to the form $x^3+px+q=0$, i.e. to eliminate the squared term.

Cardano's method works well if there is only $1$ real root ($4px^3+27q^2>0$). If there are $3$ real roots ($4px^3+27q^2<0$), you can set $x=A\cos\theta$ ($A>0$). The equation becomes $$A^3\cos^3\theta+pA\cos\theta+q=0.$$ We choose $A$ so that $A^3\cos^3\theta+pA\cos\theta$ is proportional to the expansion of $\cos 3\theta$ in function of $\cos\theta$. Remember $\cos 3\theta=4\cos^3\theta-3\cos\theta$. So we must have $$\frac{A^3}4=\frac{pA}{-3}\iff A^2=\frac{-p}3\iff A=\sqrt{\frac{-p}3}\qquad\text{(we chose A>0)}.$$ We obtain $$-\frac p3\sqrt{-\frac p3}(4\cos^3\theta-3\cos\theta)=-q\iff\cos3\theta=-\frac q{-\dfrac p3\sqrt{-\dfrac p3}}$$ There remains to solve this standard trigonometric equation.

• Isn't the last line $cos^3 \theta$ – Prasanna Jul 17 '17 at 18:12
• @Prasanna: in the l.h.d. of the last line, yes . Thanks for pointing it! – Bernard Jul 17 '17 at 18:16

Oh, right. The method used is due to Gauss, before Galois theory by about 30 years. Found it in chapter 9, section 2, of Galois Theory by David A. Cox.

I adjusted my program for quintics. Cubics with three real roots, which can be written as a sum of numbers of the form $2 \cos \left( \frac{2 k \pi}{p} \right),$ where we have a prime $p \equiv 1 \pmod 3,$ for small $p$ are:

  x^3 + x^2   - 2 x - 1   prime  7 zeta  exponents 6^k
x^3 + x^2   - 4 x + 1   prime  13 zeta  exponents 5^k
x^3 + x^2   - 6 x - 7   prime  19 zeta  exponents 8^k
x^3 + x^2   - 10 x - 8   prime  31 zeta  exponents 15^k
x^3 + x^2   - 12 x + 11   prime  37 zeta  exponents 8^k
x^3 + x^2   - 14 x + 8   prime  43 zeta  exponents 2^k
x^3 + x^2   - 20 x - 9   prime  61 zeta  exponents 8^k
x^3 + x^2   - 22 x + 5   prime  67 zeta  exponents 3^k
x^3 + x^2   - 24 x - 27   prime  73 zeta  exponents 7^k
x^3 + x^2   - 26 x + 41   prime  79 zeta  exponents 12^k
x^3 + x^2   - 32 x - 79   prime  97 zeta  exponents 19^k
x^3 + x^2   - 34 x - 61   prime  103 zeta  exponents 3^k
x^3 + x^2   - 36 x - 4   prime  109 zeta  exponents 2^k
x^3 + x^2   - 42 x + 80   prime  127 zeta  exponents 5^k
x^3 + x^2   - 46 x + 103   prime  139 zeta  exponents 8^k
x^3 + x^2   - 50 x - 123   prime  151 zeta  exponents 3^k
x^3 + x^2   - 52 x + 64   prime  157 zeta  exponents 2^k
x^3 + x^2   - 54 x - 169   prime  163 zeta  exponents 5^k
x^3 + x^2   - 60 x - 67   prime  181 zeta  exponents 6^k
x^3 + x^2   - 64 x + 143   prime  193 zeta  exponents 11^k
x^3 + x^2   - 66 x + 59   prime  199 zeta  exponents 12^k
x^3 + x^2   - 70 x - 125   prime  211 zeta  exponents 8^k
x^3 + x^2   - 74 x - 256   prime  223 zeta  exponents 13^k
x^3 + x^2   - 76 x - 212   prime  229 zeta  exponents 2^k
x^3 + x^2   - 80 x + 125   prime  241 zeta  exponents 17^k