Expressing trigonometric expressions in terms of sinx or cosx