I'm wondering if I use the \DeclareMathOperator for the wrong things.
For example I have a cost function cost(x,y) which takes two arguments. I would declare it as \DeclareMathOperator*{\cost}{cost} and use it later with $\cost(x,y) = ...$.
If this is correct, why do I never see the function f(...) typeset in roman? If it's not correct when should the \DeclareMathOperator* be used instead?
fis a "variable function", with no pre-defined meaning, contrary tolog,abs,dom,tr,sgn, etc. But the question is worth asking, to me. – Clément Jul 10 '14 at 20:39*, for such an operator. The generic “f” for functions is a variable, so it surely is in italics. – egreg Jul 10 '14 at 20:39\DeclareMathOperator(and its "starred" version,\DeclareMathOperator*): First, you wish to typeset its name in roman rather than italic -- as is customary withsin,cos,exp,log,det, etc. Second, you may wish to position the operator's argument either immediately below or in a subscript position to the right of the function name, as in\max_{x}f(x). "Generic" function names, such as f and g, probably don't satisfy either criterion. – Mico Jul 10 '14 at 20:40costis not a variable function you would say I can use the\DeclareMathOperatorcommand? – user2653422 Jul 10 '14 at 20:47