using trigonometric identities