Can I define an optimization problem like this to save some space? $$\min_x f(x)=x^2+1-log(x)\\s.t. ~x>0,$$ or i have to write it as $$\min_x f(x)\\s.t. ~x>0,$$ where $f(x)=x^2+1-log(x)$?
Update: In fact, in the real problem, I have a set of constraints like $\{g_i(x)\ge 0\}_{i=1}^k$, and I need to define them in separate lines or with "," in between, but not as the underset of "$\min$".
My two pence:
$$\min_{x>0}f(x), f(x):=x^2+1-\log x$$
or just
$$\min_{x>0}(x^2+1-\log x)$$
in case you don't need the function elsewhere (or let it be $f(x)$ implicitly).