Transforming trigonometric functions