Tan2x formula derivation