Consider the simple problem of maximum likelihood estimation of the variance of a mean zero normal distribution. The expression to be minimised is: $$N \log{v}+\frac{1}{v}\sum_{n=1}^N{b_n^2},$$ where $v$ is the unknown variance, and $b_1,\dots,b_N$ are the known observations.
Obviously, this problem is trivial, but similar expressions appear in non-trivial problems, such as estimating the variance of shocks in a linear-Gaussian state space model. And in those other problems substituting in the optimal $v$ is less feasible.
Simplifying even further, the question is the following:
Is there a global optimizer (ideally supported by YALMIP) capable of finding the global minimum ($1$) of the function:
$$\log{v}+\frac{1}{v}$$
for $v\in [c,d]$, where $c\in(0,1)$ and $d\in(1,2)$, to ensure convexity. (Of course, any local optimizer like fmincon will happily find the optimum, but while we know it is the global optimum in this trivial problem, in less trivial problems we do not.)
Perhaps there is a trick for rewriting the problem?
Update: I have moved the multivariate version of this question to here.
For the record, here is YALMIP's output on the original simple problem:
>> v=sdpvar(1,1);
>> optimize([v>=0.9,v<=1.1],log(v)+1/v,sdpsettings('solver','mosek','verbose',1))
Warning: Solver not applicable (mosek does not support exponential cones)
Of course Mosek does support exponential cones, so this error message is wrong! I expect it's just the convexity issue. There's no problem with my install. yalmiptest produces:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Test| Status| Solver|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Core functionalities| Success| |
| Linear programming (LP)| Success| MOSEK|
| Quadratic programming (QP)| Success| MOSEK|
| Second-order cone programming (SOCP)| Success| MOSEK|
| Semidefinite programming (SDP)| Success| MOSEK|
| Geometric programming (GP)| Success| MOSEK|
| Nonlinear programming (NLP)| Success| FMINCON|
| Nonlinear SDP (NLSDP)| Success| FMINCON|
| Exponential cone programming (ECP)| Success| MOSEK|
| Mixed-integer LP (MIQP)| Success| MOSEK|
| Mixed-integer QP (MIQP)| Success| MOSEK|
| Mixed-integer SOCP (MISOCP)| Success| MOSEK|
| Global nonconvex quadratic programming| Success| BMIBNB|
| Global nonconvex programming| Success| BMIBNB|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
f.*f.*exp(-u)is neither convex nor concave, if expressed correctly,log(sum(detA2.*detD))would be Disciplined Concave, but certainly not convex. So your YALMIP code for "But this does not seem to work in practice:" is nowhere close to being a convex problem which Mosek could handle. – Mark L. Stone Jan 26 '24 at 15:29