Using a negative space \! to differentiate between functions and products

Arguably the function form ought to be \mathop{{}f}(x) although this renders the same way.

In MathML (and so now in Unicode) we faced the same problem and have invisible operators FUNCTION APPLICATION (U+2061) (InvisibleApplication in Mathematica) and INVISIBLE TIMES (U+2062) (InvisibleTimes in Mathematica). As their names suggest, by default these have no affect on visual rendering but in aural renderings (and when generating code from markup) they help to distinguish these cases with f⁡(x) usually being read as f of x and f⁢(x) being read as f times x.

Whether you should distinguish these in traditional print form is really an open question, usually a reader can distinguish by context and if you vary too much from the traditional layout the reader is more distracted by the novel display than helped by the distinguished notation. (I think this is the case with the Mathematica [] convention which would be fatally distracting if used in general mathematical context rather than explicitly discussing Mathematica code.)

So... It is good to have different markup for the two cases even if you make them render the same way, as that makes the expressions distinguishable in other contexts, and also of course allows you to easily experiment with different typeset renderings affecting the whole document, by changing the definitions of your function application and invisible times commands.


The problem you face is due to commath. I can't recommend using this package under any circumstance. Examples:

\documentclass{article}
\usepackage[charter]{mathdesign}
\usepackage{amsmath}
\usepackage{commath}
\begin{document}
With \texttt{commath}
\begin{gather}
\dif(f\wedge g) \\
\left(\pd{f}{x}\right) \\
f\del{x}
\end{gather}
Without \texttt{commath}
\begin{gather}
\mathrm{d}(f\wedge g) \\
\left(\frac{\partial f}{\partial x}\right) \\
f(x)
\end{gather}
\end{document}

enter image description here

As you can see, the result in lines 1 and 2 is completely wrong; in line 3 an additional space is inserted.