Trigonometry Angles

Author

Eric W. Weisstein
October 28, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Trigonometry/TrigonometryAngles.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/TrigonometryAngles.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Products

(∏_k^n)sin(((π k)/n))==0

Product[Sin[π k/n],{k,n}]

FullSimplify[Table[Product[Sin[π k/n],{k,n}],{n,10}]]

(∏_k^(Floor[n/2]))sin(((π k)/n))==(Sqrt[(n/(2^(n-1)))])

Product[Sin[π k/n],{k,Floor[n/2]}]

Product[Sin[π k/n],{k,Floor[n/2]},Assumptions->Mod[n,2]==1]

Table[(Sqrt[(n/(2^(n-1)))])-Product[Sin[π k/n],{k,1,Floor[n/2]}],{n,1,10}]//FullSimplify

Table[Product[Sin[π k/n],{k,Floor[n/2]}],{n,10}]//FullSimplify

FullSimplify[(Sqrt[n/2^(n-1)])]

Table[(Sqrt[n/2^(n-1)]),{n,10}]

l=RootReduce[Simplify[TrigToExp[Simplify[Table[Times@@(Sin[# Pi/n]&/@Range[n/2]),{n,14}]]]]]^2

A000265

Numerator[l]

Denominator[l]

Table[2^(n-1)/2^IntegerExponent[n,2],{n,14}]

Table[2^n/2^IntegerExponent[n,2],{n,14}]

(∏_k^n)cos(((π k)/n))==(2^(-n-1)) (e^((1/2) i π (n+1))) (QPochhammer[-1, (e^(-((2 i π)/n))), n+1])==(Piecewise[{{((((-1))^((n+1)/2))/(2^(n-1))), (Mod[n, 2])==1}, {0, True}}])

Even

Product[Cos[π k/n],{k,n},Assumptions->Mod[n,2]==0]

Table[(2^(-1-n)) (E^((1/2) I (1+n) π)) QPochhammer[-1,(E^(-((2 I π)/n))),1+n],{n,2,10,2}]//FullSimplify

Odd

Product[Cos[π k/n],{k,n},Assumptions->Mod[n,2]==1]

Table[((((-1))^((n+1)/2))/(2^(n-1)))-(2^(-1-n)) (E^((1/2) I (1+n) π)) QPochhammer[-1,(E^(-((2 I π)/n))),1+n],{n,1,10,2}]//FunctionExpand//FullSimplify

All

FullSimplify[Table[Product[Cos[π k/n],{k,n}],{n,10}]]

FullSimplify[Product[Cos[π k/n],{k,n }],n∈Integers&&n>0]

Table[(2^(-1-n)) (E^((1/2) I (1+n) π)) QPochhammer[-1,(E^(-((2 I π)/n))),1+n],{n,10}]//FunctionExpand//FullSimplify

Table[Piecewise[{{(((-1))^((n+1)/2))(2^(-n+1)),Mod[n,2]==1}},0],{n,10}]

FunctionExpand@Refine[(2^(-1-n)) (E^((1/2) I (1+n) π)) QPochhammer[-1,(E^(-((2 I π)/n))),1+n],Mod[n,2]==0&&n>0]

FunctionExpand@Refine[(2^(-1-n)) (E^((1/2) I (1+n) π)) QPochhammer[-1,(E^(-((2 I π)/n))),1+n],Mod[n,2]==1&&n>0]

RootReduce[Simplify[TrigToExp[Simplify[Table[Times@@(Cos[# Pi/n]&/@Range[2n]),{n,10}]]]]]

l=RootReduce[Simplify[TrigToExp[Simplify[Table[Times@@(Cos[# Pi/n]&/@Range[n/2]),{n,14}]]]]]

Table[Mod[n,2]/2^((n-1)/2),{n,14}]

A000265

Numerator[l]

Denominator[l]

(∏_k^(Floor[n/2]))cos(((π k)/n))==(2^(-(Floor[(n/2)])-1)) (e^((i π (Floor[(n/2)]) ((Floor[(n/2)])+1))/(2 n))) (QPochhammer[-1, (e^(-((2 i π)/n))), (Floor[n/2])+1])==(Piecewise[{{(2^((1-n)/2)), (Mod[n, 2])==1}, {0, True}}])

Even

Product[Cos[π k/n],{k,Floor[n/2]},Assumptions->Mod[n,2]==0]

Table[(2^(-1-Floor[(n/2)])) (E^((I π Floor[(n/2)] (1+Floor[(n/2)]))/(2 n))) QPochhammer[-1,(E^(-((2 I π)/n))),1+Floor[(n/2)]],{n,2,10,2}]//FunctionExpand//FullSimplify

Table[Product[Cos[π k/n],{k,Floor[n/2]}],{n,2,10,2}]

Odd

Product[Cos[π k/n],{k,Floor[n/2]},Assumptions->Mod[n,2]==1]

Table[(2^(-1-Floor[(n/2)])) (E^((I π Floor[(n/2)] (1+Floor[(n/2)]))/(2 n))) QPochhammer[-1,(E^(-((2 I π)/n))),1+Floor[(n/2)]],{n,1,10,2}]//FunctionExpand//FullSimplify

Table[Product[Cos[π k/n],{k,Floor[n/2]}],{n,1,10,2}]//FullSimplify

Table[(1/(2^((n-1)/2))),{n,1,10,2}]

Both

Product[Cos[π k/n],{k,Floor[n/2]}]

FullSimplify[%,n∈Integers&&n>0]

Refine[(2^(-1-Floor[(n/2)])) (E^((I π Floor[(n/2)] (1+Floor[(n/2)]))/(2 n))) QPochhammer[-1,(E^(-((2 I π)/n))),1+Floor[(n/2)]],Mod[n,2]==0]//FullSimplify

Table[(2^(-1-(n/2))) (E^((1/8) I (2+n) π)) QPochhammer[-1,(E^(-((2 I π)/n))),1+(n/2)],{n,2,10,2}]//FullSimplify

Refine[(2^(-1-Floor[(n/2)])) (E^((I π Floor[(n/2)] (1+Floor[(n/2)]))/(2 n))) QPochhammer[-1,(E^(-((2 I π)/n))),1+Floor[(n/2)]],Mod[n,2]==1]//FullSimplify

Table[(2^(-(1/2)-(n/2))) (E^((I (-1+(n^2)) π)/(8 n))) QPochhammer[-1,(E^(-((2 I π)/n))),((1+n)/2)],{n,1,10,2}]//FunctionExpand//FullSimplify

Table[Piecewise[{{(2^((1-n)/2)),Mod[n,2]==1}},0],{n,10}]

Table[%,{n,10}]//FunctionExpand//FullSimplify

FullSimplify[Table[Product[Cos[π k/n],{k,Floor[n/2]}],{n,10}]]

Sums

(∑_(k=0)^((p-1)/2))(((-1))^k) (x^(2 k)) (Binomial[p, 2 k+1]) (((1-(x^2)))^(((p-1)/2)-k))==(Subscript[S, p])(x)

Beslin and Angelis (2004)

Sum[(-1)^k Binomial[p,2k+1](1-x^2)^((p-1)/2-k)x^(2k),{k,0,(p-1)/2}]

FullSimplify[%,p∈Primes]

Table[(((Sqrt[1-(x^2)]) ((((((1-(x^2)+(Sqrt[(x^2) (-1+(x^2))]))/(Sqrt[1-(x^2)]))))^p)-(((-((-1+(x^2)+(Sqrt[(x^2) (-1+(x^2))]))/(Sqrt[1-(x^2)]))))^p)))/(2 (Sqrt[(x^2) (-1+(x^2))])))/.p->Prime[n],{n,2,4}]//Expand//FullSimplify//Factor

S[p_,x_]:=Sum[(-1)^k Binomial[p,2k+1](1-x^2)^((p-1)/2-k)x^(2k),{k,0,(p-1)/2}]

c[p_,x_]:=S[p,Sqrt[(1-x)/2]]

S[#,x]&/@Prime[Range[2,5]]//Expand//ColumnForm//TraditionalForm

S[#,x]&/@Range[2,5]//Expand//ColumnForm//TraditionalForm

Holds only for primes

Sin[2Pi/4]

FullSimplify[4 (Sqrt[1-(x^2)])-8 (x^2) (Sqrt[1-(x^2)])]

S[p_,x_]:=Sum[(-1)^k Binomial[p,2k+1](1-x^2)^((p-1)/2-k)x^(2k),{k,0,(p-1)/2}]

c[p_,x_]:=S[p,Sqrt[(1-x)/2]]

c[#,x]&/@Prime[Range[2,5]]//Expand//ColumnForm//TraditionalForm

Surowski and Combs (2003)

sigma[n_Integer?EvenQ,s_]:=Module[{k=n/2}, (-1)^k Binomial[s-k,k]]
sigma[n_Integer?OddQ,s_]:=Module[{k=(n+1)/2},(-1)^k  Binomial[s-k,k-1]]

MinimalPolynomial2[p_Integer?PrimeQ,x_]:=Module[{i,s=(p-1)/2},
Plus@@Table[(-1)^i sigma[i,s]x^(s-i),{i,0,s}]
]

MinimalPolynomial[p_Integer?PrimeQ,x_]:=Module[{i,s=(p-1)/2},
MinimalPolynomial2[p,2x]
]

{#,MinimalPolynomial[#,x]}&/@Prime[Range[2,10]]//ColumnForm

{#,RootReduce[Simplify[TrigToExp[Cos[2Pi/#]]]]}&/@Prime[Range[2,10]]//ColumnForm

Mathematica

ToRadicals[Cos[(π/23)]]

RootReduce[%]

Rational Arguments

sin((π/n))

Table[{n,FunctionExpand[Sin[Pi/n]]},{n,10}]//ColumnForm//TraditionalForm

Timing[sin=Table[RootReduce[Simplify[TrigToExp[Sin[Pi/n]]]],{n,20}]]

Switch[#,
_Root,Exponent[#[[1]][x],x],
_Integer,1,
_Rational,1,
_,2
]&/@sin

A055035

Table[If[n==2,1,EulerPhi[n]/{1,1,2,1}[[Mod[n,4]+1]]],{n,20}]

Table[Piecewise[{{1,n==2},{EulerPhi[n],Mod[n,4]≠2},{EulerPhi[n]/2,Mod[n,4]==2}}],{n,50}]

FindSequenceFunction[%,n]

sin(((2π)/n))

Orders

Switch[#,
_Root,Exponent[#[[1]][x],x],
_Integer,1,
_Rational,1,
_,2
]&/@RootReduce[Table[FunctionExpand[Sin[2Pi/n]],{n,15}]]//Timing

Table[If[n==4,1,
EulerPhi[n]/Switch[IntegerExponent[n,2],
0|1,1,
2,4,
_?(#≥3&),2,
_,Indeterminate]
],
{n,20}]

Table

Table[FunctionExpand[Sin[2Pi/Prime[n]]],{n,2,4}]//RootReduce//Timing

cos((π/n))

Table[{n,FunctionExpand[Cos[Pi/n]]},{n,10}]//RootReduce//ColumnForm//TraditionalForm

Using TrigToExp

Timing[cos=Table[RootReduce[Simplify[TrigToExp[Cos[Pi/n]]]],{n,20}];]

MapIndexed[Flatten[{#2,#1}]&,cos]//ColumnForm

cos(((2π)/n))

Table[FunctionExpand[Cos[2Pi/n]],{n,10}]//RootReduce

Using FunctionExpand

Switch[#,
_Root,Exponent[#[[1]][x],x],
_Integer,1,
_Rational,1,
_,2
]&/@RootReduce[Table[FunctionExpand[Cos[2Pi/n]],{n,15}]]//Timing

Table[EulerPhi[n]/2,{n,20}]

cos(((2 π)/p)) for p prime

Table[FunctionExpand[Cos[2Pi/Prime[n]]],{n,2,4}]//RootReduce//Timing

Table[FunctionExpand[Sin[2Pi/Prime[n]]],{n,2,4}]//RootReduce//Timing

Beslin and Angelis (2004)

List of Orders

Switch[#,
_Root,Exponent[#[[1]][x],x],
_Integer,1,
_Rational,1,
_,2
]&/@cos

A055034

Table[If[n==1,1,EulerPhi[n]/{1,2}[[Mod[n,2]+1]]],{n,20}]

Table[EulerPhi[2n]/2,{n,20}]

Identities

Watkins and Zeitlin Identity

id[n_Integer?OddQ,x_]:=Module[{s=(n-1)/2},
{ChebyshevT[s+1,x]-ChebyshevT[s,x],RootReduce[2^s Times@@(Cos[2Pi/#]&/@Divisors[n])]}
]

id[n_Integer?EvenQ,x_]:=Module[{s=n/2},
{ChebyshevT[s+1,x]-ChebyshevT[s-1,x],RootReduce[2^s Times@@(Cos[2Pi/#]&/@Divisors[n])]}
]

Needs a little fixing up...

ChebyshevT[5,x]-ChebyshevT[4,x]

RootReduce[Simplify[TrigToExp[Cos[2Pi/#]]]]&/@{1,3,9}

Expand[(x-1)(2x+1)(1-6x+8x^3)]

Constructible Angles

ps=Take[Divisors[2^35Times@@FermatPrimes],150]

Algebraic degrees of Constructible Angles

cos(((2π)/n))

AlgebraicDegree/@FunctionExpand[Cos[2π/Take[ps,30]]]//Timing

AlgebraicDegree[Cos[2π/#]]&/@ps

cos((π/n))

AlgebraicDegree/@FunctionExpand[Cos[π/Take[ps,21]]]//Timing

l=AlgebraicDegree[Cos[π/#]]&/@ps

FoldList[Plus,0,Length/@Split[l]]

Totient Function

Select[f,!IntegerQ[Log[2,EulerPhi[#]]]&]

t=Position[Log[2,#]&/@Table[EulerPhi[n],{n,100000}],_Integer,{1}]//Flatten

Complement[t,f]