TITLE: Place of functions in order of operations?
QUESTION [5 upvotes]: So I came upon something that I thought was interesting, and my google search didn't come up with a good answer.
Say you have some function $f(x)$.  Where does evaluating $f(x)$ come in the order of operations? PEMDAS says that things in Parenthesis come first, so in $(3+2)-6 \times 8$, $(3+2)$ would be evaluated first, but what about for our function $f$? if $f(x) = x\times 8$, and we inserted it into our example as $(3+2)-f(6)$, does PEMDAS still hold? What is evaluated first?
I've also seen other functions like $\sin$ written both as $\sin(\theta)$ and $\sin \theta$. In this case, is $\sin \theta $ evaluated after $(3+2)$? Or is $\sin(\theta) \equiv \sin \theta$?

REPLY [5 votes]: Your function $f(x)$ is only representing another equation, and in your example $x = 6$. So in that case I would imagine that nothing special is happening. Just replace wherever you see your function with what it actually represents.
So, $(3 + 2) - f(6)$ is equivalent to $(3 + 2) - (6 * 8)$, and since they are both in parenthesis it does not matter which is evaluated first, but convention would probably be to do it left to right. I do not believe you should ever have reason to change the order of PEMDAS unless your function were inverse, $f^{-1}(x)$ in which case whatever that function represents would evaluate itself in the opposite order, SADMEP.
In the case of sin, it is merely another function and not including parenthesis is simply a matter of syntax, just like $sin^2 x \equiv(sin(x))^2$

REPLY [3 votes]: There are only two ways to interpret the expression
$$ (3+2) - f(6). $$
The wrong way is
$$ ((3+2) - f)(6) $$
and the right way is
$$ (3+2) - (f(6)). $$