Tan half angle formula proof, Formulas for the sin and cos of half angles