# Cosine(A/3) Figure 1: Graph of $\cos(3A)=4\cos ^{3}(A)-3\cos(A)$ This formula and/or graph are usually used to calculate $\cos(A)$ if $\cos(3A)$ is given. The cosine triple angle formula is: $\cos(3\theta )=4\cos ^{3}\theta -3\cos \theta .$ This formula, of form $y=4x^{3}-3x$ , permits $\cos(3\theta )$ to be calculated if $\cos \theta$ is known. If $\cos(3\theta )$ is known and the value of $\cos \theta$ is desired, this identity becomes: $4\cos ^{3}\theta -3\cos \theta -\cos(3\theta )=0.$ $\cos \theta$ is the solution of this cubic equation. In fact this equation has three solutions, the other two being $\cos(\theta \pm 120^{\circ }).$ $\cos(3(\theta \pm 120^{\circ }))=\cos(3\theta \pm 360^{\circ })=\cos(3\theta ).$ Perhaps the simplest solution of the cubic equation with three real roots depends on the calculation of $\cos {\frac {A}{3}}.$ The two are mutually dependent. This page contains a method for calculating $\cos \theta$ from $\cos(3\theta )$ that is not dependent on: the solution of a cubic equation, or either value of $\theta$ or $3\theta .$ The value ${\frac {1}{3}}$ can be approximated by the sequence ${\frac {1}{4}}+{\frac {1}{4^{2}}}+{\frac {1}{4^{3}}}+{\frac {1}{4^{4}}}+\cdots$ For example ${\frac {1}{4}}+{\frac {1}{4^{2}}}+{\frac {1}{4^{3}}}+\cdots +{\frac {1}{4^{20}}}$ equals $0.33333333333303017\cdots$ $\cos {\frac {A}{3}}=\cos(A({\frac {1}{4}}+{\frac {1}{4^{2}}}+{\frac {1}{4^{3}}}+{\frac {1}{4^{4}}}+\cdots ))$ $=\cos({\frac {A}{4}}+{\frac {A}{4^{2}}}+{\frac {A}{4^{3}}}+{\frac {A}{4^{4}}}+\cdots )$ # python code from decimal import * getcontext().prec = 100 def cosQuarterAngle (cos4A) : cos4A = Decimal(str(cos4A)) cos2A = ((cos4A+1)/2).sqrt() return ((cos2A+1)/2).sqrt() def cosAplusB (cosA,cosB) : cosA,cosB = [ Decimal(str(v)) for v in (cosA,cosB) ] sinA = (1 - cosA*cosA).sqrt() sinB = (1 - cosB*cosB).sqrt() v1 = cosA*cosB v2 = sinA*sinB return v1 - v2, v1 + v2 def cosAfrom_cos3A(cos3A) : cos3A = Decimal(str(cos3A)) if 1 >= cos3A >= -1 : pass else : print ('cosAfrom_cos3A(cos3A) : cos3A not in valid range.') return None if cos3A == 0 : # 3A = 90 , return cos30 # 3A = 90 + 360 = 450 , return cos150, 30+120 # 3A = 90 + 720 = 810 , return cos270, 30-120 = -90 cos30 = Decimal(3).sqrt()/2 return cos30, -cos30, Decimal(0) cos60 = Decimal('0.5') if cos3A == 1 : # 3A = 0 , return cos0 # 3A = 360 , return cos120, 0+120 # 3A = 720 , return cos240, 0-120 return Decimal(1), -cos60, -cos60 if cos3A == -1 : # 3A = 180 , return cos60 # 3A = 180 + 360 = 540 , return cos180, 60+120 # 3A = 180 + 720 = 900 , return cos300, 60-120 = -60 return cos60, Decimal(-1), cos60 cosA = cosQuarterAngle (cos3A) next = cosQuarterAngle (cosA) count = 0 while(next != 1): cosA = cosAplusB (cosA,next)  next = cosQuarterAngle (next) count += 1 print ('count =',count) cos120 = -cos60 return (cosA,) + cosAplusB (cosA,cos120)  Result is accurate to about half the precision. For example, if precision is set to $100,$ result is accurate to approximately $50$ places of decimals, and is achieved with about 81 passes through loop.