Some usefull trigonometry stuff:
Functions of half of the angle:
where:
,
,
,
Sum of functions:
Multiplication of functions:
Power of functions:
Functions of doubled angle: