10

When a trigonometric function has an exponent does that mean multiply itself or apply itself to the result recursively?

For example, does $\sin(x)^2$ denote $\sin(x)\sin(x)$ or does it denote $\sin(\sin(x))$? What about $\sin^2x$?

Celeritas
  • 2,743
  • In editing this question yesterday, I tried very hard to preserve the original intention of the question, while adjusting it to work as a general abstract duplicate target. The edits to change the inline expressions to displayed expressions, in my opinion, made it harder to read this question, and the inclusion of the question "Does $\sin(x)^2$ denote $\sin(\sin(x))$ really muddied the waters. I have rolled back the edits. – Xander Henderson Mar 21 '23 at 22:06

4 Answers4

16

The notation is a mess, and we’re stuck with it for purely historical reasons. As everybody has noted, $\sin^2x$ means $(\sin(x))^2$. But nobody pointed out that $\sin^{-1}x$ does not mean the reciprocal of the sine function, but rather its inverse with respect to composition. That is, for the right range of inputs, $\sin\bigl(\sin^{-1}(x)\bigr)=x$ and $\sin^{-1}\bigl(\sin(x)\bigr)=x$.

(In my own work, I have to refer to the $n$-fold composition of $f$ with itself, and (less often) the $n$-th power of $f$. I’ve chosen to write $f^{\circ n}$ for the multiple composition, and $f^n$ for the product of $f$ with itself $n$ times, but this is nonstandard. I still don’t know, when people in analytic number theory write $\log^2(x)$, which they mean.)

Lubin
  • 62,818
  • 1
    I guess $\sin^{-1}(x)$ deserves to be a name for a particular function which is quite useful. As for $\sin^2(x)$, one of its properties is $\sin^2(x) + \cos^2(x) = 1$. So from that similar point of view. $\sin^2(x)$ deserves to be a name for another particular function. – Stats Cruncher Mar 27 '23 at 07:53
2
  1. The currently accepted answer claims that $$ \color{blue}{\sin(x)^2} := \sin(x^2), \tag{1}$$ but in fact, possibly the most common interpretation is that $$\color{blue}{\sin(x)^2} := \left[\sin(x)\right]^2 \tag{2}$$ (the standard argument being that it is silly to move the exponent out of the parenthesis if one actually means $\sin(x^2)$).

  2. However, I avoid writing $\text“\color{blue}{\sin(x)^2}\text”$ altogether, as I instinctively parse it as $(1)$ rather than $(2).$

    For $\left[\sin(x)\right]^2,$ I prefer to write $\text“\color{violet}{\sin^2(x)}\text”,$ knowing that this is the most conventional choice, is unlikely to be interpreted as the rarely occurring function composition $\sin\left(\sin(x)\right),$ and is at least less potentially controversial than $\text“\sin^{-1}(x)\text”,$ which can be clearly and compactly rewritten as $\arcsin(x)$ or $\operatorname{cosec}(x),$ depending on the intended meaning (most likely the former).


Addendum to restore the OP's Accepted (green-ticked) Answer by PObdr (referenced above; to be clear: I disagree with its tone of definitiveness), which, together with the comments under it, have been deleted by the community:

$$ \color{blue}{\sin(x)^2} = \sin((x)^2) = \sin(x^2)\\ \color{violet}{\sin^2(x)} = (\sin(x))^2 = \sin(x)\sin(x)\\ \sin(\sin(x)) \text{ is forever alone and never simplified} $$

  • Xander Henderson: $\quad$ This is simply not the way that most of the mathematical community interprets $\color{blue}{\sin(x)^2}$—indeed, I only see this interpretation when grading student work, and I mark it down. This answer is simply incorrect.

  • me: $\quad$ @XanderHenderson Unless your required interpretation has been stressed in class, it's unfair to mark students down for being unaware that a significant subset of the mathematical community opts to understand $\text“\color{blue}{\sin(x)^2}\text”$ as the square of a function output.

    After all, reading $\text“\color{blue}{\sin(x)^2}\text”$ as $\sin(x^2)$ is neither nonsensical (reading it as $\sin\cdot\sin\cdot xx$) nor outre (reading it as $\sin(\sin(x))$ ) nor more unnatural than reading $\text“t(p)^2\text”$ as $t(p^2)$ instead of $(tp)^2.$

    Since $\text“\color{violet}{\sin^2(x)}\text”$ is by far the most prevalent expression for $[\sin(x)]^2,$ and since reading $\text“\color{blue}{\sin(x)^2}\text”$ as $[\sin(x)]^2$ is not clearly more logically/mathematically valid than as $\sin(x^2)$ (for example, no precedence convention says whether function application or exponentiation binds stronger), $\text“\boldsymbol{\color{blue}{\sin(x)^2}}\text”$ is actually more ambiguous than $\text“\color{violet}{\sin^2(x)}\text”.$ Certainly, there is no firm convention for interpreting $\text“\color{blue}{\sin(x)^2}\text”;$ for example, see the discussions here and here and here.

ryang
  • 38,879
  • 14
  • 81
  • 179
  • 3
    Since the “currently accepted answer” might chanbe, here’s a link to the mentioned answer for future reference: https://math.stackexchange.com/a/1172767. – The Amplitwist Mar 19 '23 at 18:48
  • You claim that it would not be unnatural to read $t(p)^2$ as $t(p^2)$ (where, presumably, $t$ is a function). Can you give examples in published literature of this being done? Can you give examples in published literature of $\sin(x)^2$ denoting $\sin(x^2)$? – Xander Henderson Mar 21 '23 at 13:20
  • @XanderHenderson "(where, presumably, $t$ is a function)" No: that example deliberately has nothing to do with functions. $\tag{}$ Basically, Michael Hardy & JonathanZsupportsMonicaC (the first two linked discussions that I provided above) & I are making a simple point: the interpretation of $\color{violet}{\sin^2(x)}:=[\sin(x)]^2$ is so* widespread that even those of us who disagree with it (for being illogical or whatever) accept and understand it, whereas $\color{blue}{\sin(x)^2}$ seems unnecessarily ambiguous; as proven by the spirited arguments by users on this site – ryang Mar 21 '23 at 17:04
  • over its meaning! Asking for a literature survey misses the point of my deleted comment (restored in the above Addendum), which is precisely that your students are not expected to have have done so, and are unaware that some or even many mathematicians understand $\color{blue}{\sin(x)^2}$ to mean the square of a trig function (I certainly do, even as I'm not a fan of this notation, nor am I strongly opposed to it), and might not unreasonably believe that $\color{blue}{\sin(x)^2}$ carries a different meaning from $\color{violet}{\sin^2(x)},$ – ryang Mar 21 '23 at 18:08
  • so it's unfair to penalise them for not knowing what essentially is a convention/agreement (unless of course this requirement/agreement has been emphasised in class) as if they have commited a mathematical egregiousness; after all, as noted by Lubin above, this notation is quite a mess! – ryang Mar 21 '23 at 18:12
  • @ryang You are attacking a straw man. Yes, I would mark down $\sin(x)^2 = \sin(x^2)$. I am comfortable marking this down in a precalc class because I spend two or three lectures talking about (1) notation for functions and combinations of functions and (2) the special notation for trigonometric functions. I am comfortable marking it down in a calculus class because I spend time in review recalling the things from the precalculus class. – Xander Henderson Mar 21 '23 at 20:26
  • Moreover, if a student has written something like $\sin(x)^2 = \sin(x^2)$, it is nigh certain that their subsequent computations are wrong, and that they have ultimately arrived at a wrong answer, hence in any other class, it is reasonable to mark them down. – Xander Henderson Mar 21 '23 at 20:26
  • But your comment seems to assert that Xander is marking down students out of the blue for something that they have no idea could be a problem. So, again, you are attacking a straw man. – Xander Henderson Mar 21 '23 at 20:26
  • @XanderHenderson When I wrote "Unless your required interpretation has been stressed in class, it's unfair to...", that clause/qualification was sincerely intended (to give benefit of doubt, as opposed to me rather assuming away, thereby misrepresenting). Notice that your original comment "This is simply not the way....This answer is simply incorrect" did not exactly suggest a backstory or encourage a nuanced reading, anyway. – ryang Mar 21 '23 at 21:57
  • It is straightforward to clarify (as you have just done) that you do indeed emphasise blah blah and nigh certain blah blah, which is fair enough! These are after all conversational Comments, where to-and-fro clarifications when called for are par for the course. $\quad$ My goal in responding to your original snippet comment was to offer an alternate perspective: "hey, here are why $\sin(x)^2$ is not as clear-cut as you'd originally believed," and "hey, reading $\sin(x)^2$ as $\sin(x^2),$ per se, is not really flagrant, and here's why." – ryang Mar 21 '23 at 21:57
  • I find this thread (starting from Comment #2) distracting and quite unfit for the main site. If you agree that they add no value, please do go ahead and delete them. – ryang Mar 21 '23 at 21:57
  • If you want the comment thread deleted, please start by deleting your out-of-context quote in the body of your answer. – Xander Henderson Mar 21 '23 at 22:00
  • @XanderHenderson I quoted you in full; there was no additional/surrounding context framing your opinionatedly-phrased comment. If this comment thread in fact offers a clarification as to your actual (or current) position, then I guess it does add value after all, in which case I'm happy to leave it be. – ryang Mar 21 '23 at 22:40
  • How about the intuitive meaning of $\sin^2 (x^2)^2$ for the mathematical community to which each user belongs? – Stats Cruncher Mar 27 '23 at 05:21
  • @StatsCruncher Gosh, the possibilities; I’d just ask the author to clarify. – ryang Mar 27 '23 at 05:49
  • @ryang If I were a mathematician, I would be advised to follow convention and to avoid ambiguity (ambiguous formulas, expressions, etc.). In fact, I am not a mathematician and I have been advised to follow convention and to avoid ambiguity. – Stats Cruncher Mar 27 '23 at 07:39
  • 1
    @StatsCruncher Definitely. And being sensitive to the existence of or potential for differing conventions (this is not uncommon) means that one can take steps to mitigate potential ambiguity (e.g., declaring your choice in a preface). – ryang Mar 27 '23 at 08:50
1

$\sin(x)^2$ means it multiplies itself, although I always thought that was weird since $(\sin(x))^5$ is already easy to write, although writing $\sin(\sin(\sin(\sin(\sin(x)))))$ is a lot harder. I remember it because I think it is weird.

ryang
  • 38,879
  • 14
  • 81
  • 179
Asinomás
  • 105,651
  • You know, $(\sin(x))^5$ actually appears in real applications, but $\sin(\sin(\sin(\sin(\sin(x)))))$ never has and probably never will. – GEdgar Mar 03 '15 at 01:33
  • I know that, I still think the notation $\sin^5 (x)$ is useless. – Asinomás Mar 03 '15 at 01:34
  • @TheEmperorofIceCream But the meaning of $\sin^5(x)$ is actually $\sin(x)\times\sin(x)\times\sin(x)\times\sin(x)\times\sin(x)$ – PObdr Mar 03 '15 at 01:42
  • yeah, that's exactly what $(\sin(x))^5$ means. Notice this makes sense since $sin(x)$ is a number – Asinomás Mar 03 '15 at 01:44
1

Discussion

The notation here is confusing and ambiguous, because the different notations developed at different times, and have strange overlaps that can cause confusion.

  • If $f$ is a function, then $f^n(x)$ typically means the $n$-fold composition of $f$ with itself, i.e $$ f^n(x) = \underbrace{f\circ f\circ \dotsb \circ f}_{\text{$n$ times}} =(x), $$ while $f(x)^n$ usually means the $n$-fold product of $f(x)$ with itself, i.e. $$ f(x)^n = \underbrace{f(x) \cdot f(x) \cdot \dotsb \cdot f(x)}_{\text{$n$ times}}. $$ The former notation is consistent with the understanding that a function is (or can be thought of as) an element of an algebra of functions (or something similar). For example, if $T : \mathbb{R}^n \to \mathbb{R}^n$, then $T$ can be represented by an $n\times n$ matrix, and the composition of $T$ with itself ($T\circ T$) is represented by the matrix product of $T$ with itself ($T^n$).

    For the later notation, it might be helpful to think of "$f($" and "$)$" as opening and closing symbols for grouping. Then, in the G/E/MD/AS mnemonic, evaluating a function happens at the priority of grouping: $$ \color{red}{f\bigl(} \sqrt{x+1} - x \color{red}{\bigr)}^3 $$ means "evaluate $\sqrt{x+1}-x$, then apply $f$ to that, and then cube the result". This is also the way in which most programming languages can computer algebra systems interpret the notation. For example, if fib(n) is a function in a program which returns the $n$-th Fibonacci number, then the syntax fib(4)^2 usually (depending on language) means "evaluate the Fibonacci function with an input of $4$, and then square the result.

  • Trigonometric and logarithmic functions have a slightly different history. These functions were commonly used and understood before the modern understanding of "function" was introduced, and before the modern notation for functions started to be used. The notation $\sin x$ developed as a shorthand for a phrase which would typically be written in English (or Latin, or whatever) as "the sine of the angle $x$". Because this notation developed independently, the notation $\sin^2 x$ for "the square of the sine of $x$" developed relatively early on. Thus the standard interpretation is that, for example, $$ \sin^2 x = [\sin x]^2 \qquad\text{and}\qquad \log^2 x = [\log x]^2. $$ Because of this, the notation $\sin^n(x)$ (for positive $n$) is rarely, if ever, ambiguous: it means the square of the output of the sine function, when applied to $x$.

    However (editorializing a bit here), that does not make it good notation.

  • When writing trigonometric and logarithmic functions in a way that is consistent with modern usage, i.e. with parentheses enclosing the argument of the function, the default assumption should be that the function is applied to whatever is in the parentheses, and anything outside of those parentheses is evaluated later. For example, $\log(x) + 1$ unambiguously means "add one to the logarithm of $x$", and $\sin(x)x$ means "multiply $x$ by the sine of $x$" (though $x\sin(x)$ would be better notation).

    Again, the function name plus parenthesis acts as an opening grouping symbol, and the closing parenthesis acts as a closing grouping symbol. As such, the default interpretation is that $\sin(x)^2$ should mean the same thing as $[\sin(x)]^2$. Note that this is consistent with the way that most computer algebra systems and programming languages work:

    • the input sin(x)^2 is interpreted by GeoGebra to mean $\sin^2(x)$;
    • the input sin(x)^2 is interpreted by WolframAlpha as $\sin^2(x)$;
    • the input sin(x)^2 is interpreted by Desmos as $\sin(x)^2 = [\sin(x)]^2$;
    • the search string sin(x)^2 is interpreted by Google's math engine as $\sin(x)^2 = [\sin(x)]^2$, though it is interesting to note that Google returns many results about $\sin(x^2)$.
  • The notation for inverses is consistent with the use of $f^n$ to denote composition: let $\operatorname{id}$ denote the identity function, i.e. $\operatorname{id}(x) = x$ for all $x$ in the domain of $\operatorname{id}$; if $f$ and $g$ are functions such that $$ f\circ g = \operatorname{id} = g \circ f \qquad\text{that is, $(f\circ g)(x) = f(g(x)) = x$)}, $$ then $g$ is the compositional inverse of $f$; the usual notation is to write $$ g = f^{-1}. $$ Trigonometric functions sometimes use this notation for inverses, e.g. $\sin^{-1}$ is the inverse sine function, not the reciprocal of the sine function. Note, however, that alternative notation exists for inverse trigonometric functions, e.g. the inverse of the sine function is $\arcsin$ (the arcsine function).

Summary (and editorializing)

In short:

  1. The notation $\operatorname{trig}^n x$ for positive integers $n$ unambiguously means $[\operatorname{trig}(x)]^n$. In my opinion, this is bad notation (both for pedagogy and for clarity), but it exists and persists for historic reasons.

  2. The notation $\operatorname{trig}^{-1} x$ unambiguously means the inverse of the given trigonometric function, applied to $x$ in the appropriate domain, but it would probably be more clear to use $\operatorname{arctrig}(x)$.

  3. The notation $\operatorname{trig}(x)^n$ almost certainly means (and should be interpreted as, unless otherwise noted) $[\operatorname{trig}(x)]^n$. However, as noted in this discussion, there are folk who might be confused by this notation.

  4. The most clear and unambiguous notation requires using more grouping symbols. It is almost certainly best to write $$ [\operatorname{trig}(x)]^n $$ to denote the $n$-fold product of $\operatorname{trig}(x)$ with itself.

  5. G-d help you if you need notation for $$ \operatorname{trig}( \operatorname{trig}( \dotsb \operatorname{trig}(x) \dotsb )). $$ Fortunately, the $n$-fold composition of trigonometric functions rarely comes up, except in a few esoteric branches of mathematics (e.g. maybe dynamical systems? fractal geometry?).

  • This complete and thoughtful answer deserves more approbation than it has so far received. – Lubin Oct 10 '23 at 21:01