Several people have told me that $\sin(x)^2 = \sin(x^2)$. However, on several computing platforms, such as the TI-84 and Wolfram|Alpha, $\sin(x)^2 = \sin^2(x)$. Can I safely conclude that the notation $\sin(x)^2$ is ambiguous and should always be avoided in favor of $\sin^2(x)$ or $\sin^2 x$? I am having trouble finding any reference through Google or in textbooks (which, I presume, avoid notation like this).
Ambiguity of notation: $\sin(x)^2$
4.6k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
If anything, $\sin^2(x)$ is the ambiguous notation. To some it might mean $\sin(\sin(x))$ (this is why $\sin^{-1}$ is sometimes used as arcsine), and to others it might mean $(\sin(x))^2$. I cannot think of a case where anyone would see $\sin(x)^2=\sin(x^2)$ (except when, say, $x=0$). However, we mathematicians avoid ambiguity; I typically use $(\sin(x))^2$ when I square my sines.
On
In mathematics, $\sin (x)^2 = \sin x^2 = \sin (x^2) $ because $\sin$ comes after exponentiation and multiplication in order of operations. The $sin^2$ construct was created to alleviate the pain of performing exponentiation on the result of $sin$.
In computer programming, however, $ \sin(x)^2 = \sin^2 x $ because $\sin$ is a function call and the expression within the parentheses is its only parameter.
Consider, for example, how redundant it would look to write $\sin (x+1)^2$ as $\sin [(x+1)^2]$.
No-one in their right mind would denote $\sin\left(x^2\right)$ as $\sin(x)^2$.
Why? Because the (round) brackets would become redundant. Brackets are used to remove ambiguity in algebraic operations. If you exclude the exponent $\quad ^2 \quad $ from the brackets, you're implicitly saying that the $\quad ^2 \quad$ belongs outside the brackets, and, therefore, we're taking the square of the sine, rather than the sine of the square.
In short, $$\sin(x)^2 \ \equiv[\sin(x)]^2 \ \equiv \ \sin^2(x) \ \neq \ \sin\left(x^2\right) \quad.$$
In some contexts, however, for a given function $f$, we have $$f^2(x) \ \equiv \ f\left[f(x)\right] \ \equiv \ f \circ f(x) \ \neq \ [f(x)]^2 \quad ,$$ so, if in doubt, explicitly define notation to remove all ambiguity.