Integrate using trigonometric identities (#568)