Using trig identities for integration