  We investigate in this paper the generalized trust region subproblem (GTRS)
of minimizing a general quadratic objective function subject to a general
quadratic inequality constraint. By applying a simultaneous block
diagonalization approach, we obtain a congruent canonical form for the
symmetric matrices in both the objective and constraint functions. By
exploiting the block separability of the canonical form, we show that all GTRSs
with an optimal value bounded from below are second order cone programming
(SOCP) representable. Our result generalizes the recent work of Ben-Tal and
Hertog (Math. Program. 143(1-2):1-29, 2014), which establishes the SOCP
representability of the GTRS under the assumption of the simultaneous
diagonalizability of the two matrices in the objective and constraint
functions. Compared with the state-of-the-art approach to reformulate the GTRS
as a semi-definite programming problem, our SOCP reformulation delivers a much
faster solution algorithm. We further extend our method to two variants of the
GTRS in which the inequality constraint is replaced by either an equality
constraint or an interval constraint. Our methods also enable us to obtain
simplified versions of the classical S-lemma, the S-lemma with equality, and
the S-lemma with interval bounds.
