Ambiguous Function Notation

The Problem

Say you see this:

f(x-y)

Does this mean that the function f is evaluated at x-y? Or does that mean that some f times (x-y)?

The problem is, that mathematical texts, including physical texts, are not to be interpreted by a computer. I would like this to be very clear cut and unambiguous, so I thought about a solution to this, inspired by other things I saw.

Solutions

C and other Programming Languages

The evaluation in C is writen like so:

f(x-y)

Whereas the multiplication is denoted like so:

f*(x-y)

This is fine, but has one problem. If you want to denote \omega R C, you would have to write every single multiplication sign:

omega * R * C

This is unacceptable for normal formulas, since it has way to many “\cdot” in it.

Mathematica

Mathematica has its very own solution to this. It denotes function calls with [] and multiplication with (). That way, it is clear what is meant.

Function call:

f[x-y]

Multiplication:

f(x-y)

It works great for a mathematical programming language, but it is extremely unusual to write it this way. I tried it once, in problem set physik421-10, which you can find at physik421 Theoretische Physik 3.

My Ideas

The dot

To use the unambiguous way the C language does it, without too many “\cdot” in it, I now write a “\cdot” in front of every “(” if I mean a multiplication. So the examples from “The Problem” become:

f(x-y)

f \cdot (x-y)

Brackets and parentheses

The way it is used in Mathematica is consistent with itself, but very strange for other people.

So I currently use this inverted:

f(x-y)

f[x-y]

This still has the problem that it is not obvious if you do not know the convention. Also, functional dependencies are sometimes denoted with square brackets. When I switch between Mathematica and this notation, the confusion is maximized. So far, this is the best compromise, I think.