using the identity sec^2 theta = 1 + tan^2 theta.