Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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$?

share|improve this question
    
(Co)Sine is sort of a special case. If you write a sum, say $\sin(x+y)$, the parenthesis are a must, as $\sin x+y=(\sin x)+y$ (unless the latter meaning is obviously non-sensical for reasons of dimension or some such). But the exception with sine is that $\sin 2x$ is the same as $\sin (2x)$. The reason is that nobody ever wants to compute $(\sin 2)x$, so the parentheses have been judged unnecessary. Yes, these are conventions. Perhaps beyond school usage, but the weight of history is overwhelming here. And if you understand the context of the problem, it is nearly impossible to go wrong! –  Jyrki Lahtonen Aug 31 '12 at 12:56
add comment

2 Answers 2

up vote 3 down vote accepted

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$

share|improve this answer
add comment

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)). $$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.