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?
-
12$\begingroup$ When it's not confusing, write $\sin x$. When it might confusing, write $\sin(x)$. When you're not sure, write $\sin(x)$. $\endgroup$– Asaf Karagila ♦Commented Oct 13, 2012 at 17:28
-
$\begingroup$ 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)$. $\endgroup$– Patrick Da SilvaCommented Oct 13, 2012 at 17:33
-
1$\begingroup$ $\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. $\endgroup$– Martin UedingCommented Oct 13, 2012 at 17:35
-
$\begingroup$ @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}$. $\endgroup$– hmakholm left over MonicaCommented Oct 13, 2012 at 17:44
-
$\begingroup$ @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... $\endgroup$– N. S.Commented Oct 13, 2012 at 18:05
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.
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.
-
$\begingroup$ 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. $\endgroup$ Commented Oct 13, 2012 at 17:59
-
3
-
$\begingroup$ In addition to clarity for human readers, parentheses may also be required for computers. Who has tried sin x for Wolfram Alpha? $\endgroup$– GEdgarCommented Oct 13, 2012 at 18:37
-
1$\begingroup$ I think $\sin xy$ is quite clearly $\sin(xy)$. The latter just looks ugly. $\endgroup$ Commented Jan 22, 2018 at 5:46
-
$\begingroup$ @Friedrich -- Слава Україні Please do not make cosmetic edits to old questions and answers. That puts them on the active question queue for no good reason. $\endgroup$ Commented Feb 27, 2023 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)$.