I have to find the Symmetric Positive Definite matrix $S\in \mathcal{M}_{m,m}$ that minimizes the function $f(S)=\mathrm{trace}(S)+\mathrm{trace}(S^{-2})$ which has been proven to be convex in the following question:Convexity of $\mathrm{trace}(S) + m^2\mathrm{trace}(S^{-2})$
Actually I would like to find $S$ using a convex optimization solver which doesn't accept the expression of $f(S)$ because somehow it always reformulate the problem in a way to have a convex equality constraint. That is, the $S^{-2}$ in the trace_inverse operator is considered to have the following form $S^{-2}=Q^{-1}=(SS)^{-1}$ hence $Q=S^2$ which is quadratic but in a convex optimization problem we could only have as constraints affine equalities or/and convex inequalities.
And so I wonder if we can write $S^{2}$ or $S^{-2}$ in terms of S in different manner such that I don't have any more the convex equality constraint.
I think that this problem could be solved by adding constraints using the schur complement inequalities.