  We propose a new formulation of quadratic optimization problems. The
objective function $F(f(x),g(x))$ is given as composition of a quadratic
function $F(z)$ with two $n$-variate quadratic functions $z_1=f(x)$ and
$z_2=g(x).$ In addition, it incorporates with a set of linear inequality
constraints in $z=(z_1,z_2)^T,$ while having an implicit constraint that $z$
belongs to the joint numerical range of $(f,g).$ The formulation is very
general in the sense that it covers quadratic programming with a single
quadratic constraint of all types, including the inequality-type, the
equality-type, and the interval-type. Even more, the composition of "quadratic
with quadratics" as well as the joint numerical range constraint all together
allow us to formulate existing unsolved (or not solved efficiently) problems
into the new model. In this paper, we solve the quadratic hypersurfaces
intersection problem (QSIC) proposed by P$\acute{{\rm o}}$lik and Terlaky; and
the problem (AQP) to minimize the absolute value of a quadratic function over a
quadratic constraint proposed by Ye and Zhang. We show that, when $F(z)$ and
the joint numerical range constraint are both convex, the optimal value of the
convex optimization problem can be obtained by solving an SDP followed from a
new development of the $\mathcal{S}$-procedure. The optimal solution can be
approximated by conducting a bisection method on $[0,2\pi].$ On the other hand,
if the joint numerical range of $f(x)$ and $g(x)$ is non-convex, the respective
quadratic matrices of $f(x)$ and $g(x)$ must be linearly dependent. The linear
dependence property enables us to solve (QSIC) and (AQP) accordingly by
elementary analysis.
