TITLE: Calculating the absolute value of sum of rational numbers
QUESTION [0 upvotes]: If $\sqrt{9-8\cos40}=a+b\sec40$, and $a$ and $b$ are rational numbers, then $\lvert a+b\rvert =\,{}$?

REPLY [2 votes]: The key is showing that if $c=\cos40^o=\cos\frac{2\pi}{9}$, then we have $8c^3-6c+1=0$.
Suppose for a moment that is true. Squaring the equation in the question we have $9-8c=a^2+2ab/c+b^2/c^2$ or $8c^3+(a^2-9)c^2+2abc+b^2=0$. So evidently we need $a=\pm3,b=\pm1$. Obviously $\frac{1}{2}<c<1$, so $\sqrt{9-8c}$ is between 1 and 2.3, whilst $\frac{1}{c}$ is between 1 and 2. So we must pick $a=3,b=-1$, and hence $|a+b|=2$.
Returning to the claimed equation, we have $-\frac{1}{2}=\cos\frac{6\pi}{9}=4c^3-3c$ using the familiar formula $\cos3x=4\cos^3x-3\cos x$. Hence $8c^3-6c+1=0$ as claimed.
{"set_name": "stack_exchange", "score": 0, "question_id": 1801236}