I've seen sources that apply the $\ln$ function before the power in $\ln(x-1)^2$ for example and others where it is applied after the power. Which is correct?
1 Answers
If all functions were written with parentheses always, then it would be clear that $f(x)^2$ means $(f(x))^2$, but with functions such as $\ln$ and $\sin$ that are sometimes written with parenteses but often without, $\sin x^2$ is interpreted as $\sin(x^2)$, and $\sin (x+y)^2$ potentially becomes ambiguous.
There is of course the notation $\sin^2 (x+y)$ which can be used for writing $(\sin(x+y))^2$ in a cleaner way, so I think that almost all mathematicians would interpret $\sin (x+y)^2$ as having the other possible meaning, namely $\sin((x+y)^2)$, and similarly for your logarithm example. But I would still recommend being careful with using that way of writing, just because it may not be 100% obvious how it should be interpreted. If you want to minimize the risk of your readers misunderstanding you, put in a pair of extra brackets to be on the safe side.
(If you're writing program code meant to be read by a computer, then there are precisely defined syntax rules which say exactly how every expression is supposed to be interpreted in that particular programming language. But writing math for communication between humans isn't quite like that.)
Edit: There is also the subtle question about spacing. The TeX code \sin(x+y)^2 renders as $\sin(x+y)^2$, with no space between the function name and the left parenthesis, just like when writing $\sin(x)$. But \sin x gives $\sin x$ with a space in between. So if we mean $\sin( (x+y)^2 )$, one could argue that we should write \sin \, (x+y)^2 to get such a small space: $\sin \, (x+y)^2$. And then maybe $\sin(x+y)^2$ without a space should mean $(\sin(x+y))^2$? But the question is, would the readers notice the difference? And can the majority of mathematicians be trained to adhere to that convention? (Answer: No!) And do we want to attach a difference in meaning to such a small typographical detail?
- 53,395
-
Cool! Thank you very much! – Omar Zayed Mar 31 '23 at 09:47