# Test exact radical output vs not exact radical output for Sin[i]

FunctionExpand[Sin[3 Degree]] outputs exact radical result, while FunctionExpand[Sin[1 Degree]] does not.

How can I write a test function that will take as argument this output result and return true if it's a radical expression and false if it's not?

Map[{i, f} , Table[ FunctionExpand[Sin[i Degree]] ,{i,0,90}]]

returns {{1, False}, ...,{3, True}..}

• f = FreeQ[Sin] should do for you. Dec 4 '16 at 5:44
• Only multiples of 3 Degree give a numerical result. Dec 4 '16 at 10:19
• Do you want to test if Mathematica expands it in terms of radicals or whether it is at all possible to expand it in terms of radicals? It appears that Sin[Pi p/q] can always be written in terms of radials for any rational p/q (I didn't know this before today, hence my long and now deleted answer about trying to figure out what p/q allows such expansion). Dec 4 '16 at 12:21
• Here's some more on how you might solve in terms of radicals: maplesoft.com/applications/view.aspx?SID=7067&view=html Dec 5 '16 at 20:03
• A related question. Try this: ToRadicals[RootReduce[FunctionExpand[Sin[1 °]]]] Dec 13 '16 at 15:42

It is not clear how you want integer and rational values handled.

test1 = FreeQ[#, _Sin | _Cos] &;

test2 = ! FreeQ[#, _Power] &;

(test1Result =
Select[{# Degree, FullSimplify[FunctionExpand[Sin[# Degree]]]} & /@
Range[0, 90], test1]) // Length

(*  31  *)

(test2Result =
Select[{# Degree, FullSimplify[FunctionExpand[Sin[# Degree]]]} & /@
Range[0, 90], test2]) // Length

(*  28  *)

Complement[test1Result, test2Result]

(*  {{0, 0}, {30 °, 1/2}, {90 °, 1}}  *)


More like a comment.

Mathematica gives a numerical result, in form of a radical, for multiples of 3 Degree, which looks like this:

Partition[#, 2] &@
Table[{i Degree, FunctionExpand[Sin[i Degree]]}, {i, 3, 90, 3}] //
TableForm[#, TableDepth -> 2] & Others remain unevaluated.

Let's denote

sin3 = FunctionExpand[Sin[3 Degree]]


Then one can use the identity

$$\sin(3 x)=3\sin x-4 \sin^3 x$$

to solve for $\sin x$ = sin1:

sin1 = s1 /. Solve[sin3 == 3 s1 - 4 s1^3, s1][] // Simplify Despite

sin1 // N // Chop


0.0174524

and

Sin[1. Degree]


0.0174524

agree, we see that there are imaginary units in sin1; I guess this is a case of casus irreducibilis.

One can formally obtain sin2 via

$$\sin(2 x)=2\sin x\cos x=2\sin x\sqrt{1-\sin^2 x}$$

sin2 = 2 sin1 Sqrt[1 - sin1^2] // Simplify See also this answer to another question for how to remove the imaginary unit I from sin1 and sin2.