I sometimes see $\sin x$ and sometimes $\sin(x)$. Are the parenteses needed since the sine is a function or is it more an operator that can be premultiplied to the variable? Or are people just lazy?
-
12When it's not confusing, write $\sin x$. When it might confusing, write $\sin(x)$. When you're not sure, write $\sin(x)$. – Asaf Karagila Oct 13 '12 at 17:28
-
It is definitely not "multiplying $x$". The issue maybe more when you have stuff like $\sin x^2$. It might not be clear if it is $(\sin x)^2$ or $\sin(x^2)$. Usually from the context this kind of issue is not relevant, it's clear, but if you don't feel comfortable just put the brackets. For instance, when one writes $2 \sin x \cos x = \sin 2x$, it is clear that it means $2 \sin(x) \cos(x) = \sin (2x)$. – Patrick Da Silva Oct 13 '12 at 17:33
-
1$\left(\sin(x)\right)^2$ is often denoted as $\sin^2 x$, which I would rather read as $(\sin \circ \sin)(x)$, but I guess that is another story. – Martin Ueding Oct 13 '12 at 17:35
-
@queueoverflow: There's no helping that power notation applied to function names can mean either repetition of function composition, or repetition of the pointwise multiplication operator. Both of these meanings are respectable and meaningful things to do. In the cases of positive powers of trig functions it happens that pointwise arithmetic is so much more common than repeated composition that this interpretation takes precedence, but the situation is exactly the opposite for $\sin^{-1}$. – hmakholm left over Monica Oct 13 '12 at 17:44
-
@queueoverflow So would you rather write it as $\sin x^2$ ? From my experience, (weak) students don't write brackets most of the times, and then the $\sin^2(x)$ leads to much less confusion... – N. S. Oct 13 '12 at 18:05
-
@HenningMakholm I saw that confusion often, even if I always use the arcsin notation in teaching (students still tend to use the textbook notation, so sometimes in exams they replace my arcsin by $\sin^{-1}$ and couple lines later it becomes $\frac{1}{\sin}$). The funny part though is that just a litle logic tells one that it is improbable to use $\sin^{-1}$ to denote $\frac{1}{\sin}$ since we already have a name for it: cosec.... – N. S. Oct 13 '12 at 18:08
-
@N.S.: I agree that there's a potential for confusion. I just think there's too much inertia for the notation ever to change to something less formally unambiguous, so there is no escape for learning to navigate the trantional notation, for better or worse. – hmakholm left over Monica Oct 13 '12 at 18:20
-
@N.S. Saying $\sin^{-1}$ does make sense since we have $\csc$ could also put the other way since we have $\asin$. I try to use the other names in order to avoid negative powers. – Martin Ueding Oct 14 '12 at 14:31
3 Answers
There's no mathematical difference in when to write parentheses or not, as long as there is no doubt how much of the thing that follows "$\sin$" is part of the argument.
Part of the syntactic role of parentheses is to make clear that the thing to the left of them is actually a function rather than something rather than something to be multiplied. The need for this is greater when the name of the function is just a letter ("$f$" or "$g$" could also conceivably be used as names of constants, for example), but on the other hand "$\sin$" is so unambiguously a function that we usually don't need parentheses to remind the reader that that's what it is.
... except in situations like $\sin(t+1)$ where "$\sin t + 1$" would have meant $(\sin t)+1$.
Omitting the parentheses in unambiguous cases makes the expression slightly easier to read at a glance then there are many other levels of parentheses around.
- 286,031
Parentheses make the expression clearer for expressions like $\sin (xy)$, if you write $\sin xy$, then it may mean $(\sin x) \cdot y$. But for only $\sin (x)$ it is enough to write $\sin x$. If there is some possibility of ambiguity, then it is better to use parentheses.
- 10,157
-
Hmm... if you want $(\sin x)y$, then you'd better write out those parentheses. There are too many situations where one needs to speak about things like $\sin 2\pi\nu t$ for it to make sense that the invisible function application would bind stronger than invisible multiplication. – hmakholm left over Monica Oct 13 '12 at 17:59
-
3
-
In addition to clarity for human readers, parentheses may also be required for computers. Who has tried sin x for Wolfram Alpha? – GEdgar Oct 13 '12 at 18:37
-
1I think $\sin xy$ is quite clearly $\sin(xy)$. The latter just looks ugly. – Mateen Ulhaq Jan 22 '18 at 05:46
-
@Friedrich -- Слава Україні Please do not make cosmetic edits to old questions and answers. That puts them on the active question queue for no good reason. – Ethan Bolker Feb 27 '23 at 17:27
Note the small skip after the math operators
$$\sin x$$ vs. $$\sin(x)$$ Thus parentheses are not necessarily needed, even for $\sin xy$. Similar, as the gap around the add operator $+$, this indicates that it has a higher precedence than the multiplication (cf. $a+xy$).
Sure, there is a tradeoff between ultimate safety and easy readability. For more complicated equations, one may appreciate less parentheses $$\exp(2(\cos x + i\sin xy))$$ $$\exp(2(\cos(x) + i\sin(xy)))$$
On blackboard (or bad formatted latex), parentheses are needed for clarity $$sin x$$ $$sin(x)$$
Parenthesis are also needed for custom user functions, which don't switch font or lack the small skip: $$f(x)$$ $${\rm Sin}x$$ BTW, $f(x)$ might also be interpreted as $f\cdot(x)$.