# Convex optimization for symmetric (but not positive definite) problems?

Can one employ convex optimization for symmetric but not positive definite problems? I tried using MATLAB's quadprog() function to solve this problem:

$\mathrm{min}\frac{1}{2}\mathbf{x}^T\mathbf{H}\mathbf{x}+\mathbf{x}^{T}\mathbf{g}$

$\mathrm{s.t.} \mathbf{Ax}=\mathbf{b}$

Where $\mathbf{H}$ is a symmetric but not positive definite. I am attempting to solve Darcy's equation based on the Variational Multi-Scale (VMS) formulation. I could rewrite the weak form such that the linear operator is symmetric, but even so quadprog will not work.

However, if I "normalized" the minimization functional:

$\mathrm{min}\frac{1}{2}\mathbf{x}^T\mathbf{H}^{T}\mathbf{H}\mathbf{x}+\mathbf{x}^{T}\mathbf{H}^T\mathbf{g}$

$\mathrm{s.t.} \mathbf{Ax}=\mathbf{b}$

I ensure that my Hessian is symmetric and positive definite, and quadprog does what i want it to. Why is this the case?