Sum and difference formulas for sine and cosine