3

I am stuck in an elementary problem which somehow makes me confused.

If it is written $$\cos(n\pi)^2$$ What does this mean?

Is it $(\cos{(n\pi)}) \cdot (\cos{(n\pi)})$, or $\cos{(n^2\pi^2)}$ ???

Because if it is $(\cos{(n\pi)}) \cdot (\cos{(n\pi)})$, I usually write it as $\cos^2{(n\pi)}$.

How to write it internationally?

I am confused, please help. And how to internationally write the other one?

Thank you in advance

Blue
  • 75,673
Kadal
  • 113
  • 4
    It is ambiguous. Usually, $\sin(x) \times \sin(x)$ is written as $\sin^2(x)$. However, $\sin(x)^2$ can reasonably be interpreted as either $\sin[(x)^2]$ or $[\sin(x)]^2.$ Because of the common use of the syntax $\sin^2(x)$, the most likely guess is that the syntax of $\sin(x)^2$ carelessly intends $\sin[(x)^2]$. However, there is no agreed convention that I know of. Often, you can use the surrounding context to make an educated guess as to the intent of the writer. – user2661923 Aug 27 '21 at 13:34
  • As an isolated expression this is ambiguous/confusing. The best way to understand the author's meaning is to look at the surrounding context. In mathematics you can use any notation provided you tell Readers how you define it. The way you "usually write it" is very common and would be understood here by consensus. – hardmath Aug 27 '21 at 13:37
  • 3
    For what it's worth, I intepret it as $\cos^2(n\pi)$. If I wanted the other interpretation, I'd write $\cos((n\pi)^2)$. – Jason DeVito - on hiatus Aug 27 '21 at 13:48
  • 2
    @user2661923: I think it's equally likely that $\sin(x)^2$ "carelessly intends" (good way to put it) $[\sin(x)]^2$, especially in informal settings (like here on Math.SE) or with neophyte writers (like here on Math.SE) or where "proper" formatting can be a hassle. As you suggest, context is key. It's worth noting that, for instance, Mathematica and GeoGebra other "programming" environments don't have support for the $\sin^2x$ convention, so one writes Sin[x]^2 or sin(x)^2 for "the square of the sine of $x$". – Blue Aug 27 '21 at 13:53
  • 1
    From my limited experience I've only seen $\cos(x) ^2=(\cos(x))^2$, the rationale is that $\cos$ doesn't behave nicely with squares i.e we have no way to simplify $\cos(x^2)$. Also $\cos(n^2\pi^2)$ is not nice unlike $(\cos(n\pi)) ^2=1$ assuming $n$ is integer. – kingW3 Aug 27 '21 at 14:03

2 Answers2

3

I agree with JasonDeVito and disagree with RyanG. I say function application binds more tightly than exponents or products. Thus $f(x)^2$ means $\big(f(x)\big)^2$, even though $2(x)^2$ means $2\big((x)^2\big)$.

Trig functions and logs have some legacy notational rules---such as writing $\sin x$ for $\sin(x)$, or writing $\sin^2(x)$ for $\sin(x)^2$. Expecting your readers to know those legacy rules should be discouraged.

GEdgar
  • 111,679
  • To be clear: my answer represented two opposing interpretations and advocated neither (only that one be aware of both). – ryang Aug 27 '21 at 15:18
0
  • My knee-jerk reading of $$\cos(nx)^2$$ is $$\cos\big((nx)^2\big)$$ instead of $$\big(\cos(nx)\big)^2,$$ just like how everyone reads $$\cos x^2$$ as $$\cos (x^2)$$ instead of as $$(\cos x)^2.$$
  • However, a common opposing position is that since cosine as a function, its input is specified entirely within the parenthesis, and thus the function input in the expression $$\cos(nx)^2$$ is simply $\:nx\:,$ and thus $$\cos(nx)^2$$ is to be interpreted as $$\big(\cos(nx)\big)^2.$$

So the short answer is, one must rely on context to disambiguate $\cos(nx)^2.$ Of course, the writer is best to always stick to $\cos^2(nx)$ and $\cos\big((nx)^2\big).$

(Because $\big(\cos(x)\big)^2$ occurs too frequently to be worth this clunkiness, just as displaying the curly brackets in $P\big(\{HHT,HTH,HHH\}\big)$ isn't worth the hassle.)

Let's not get started on disambiguating $\cos^2(nx)$ between squaring the function and composing the function (in the vein of “does $\cos^{-1}(x)$ mean the multiplicative inverse $\big(\cos(x)\big)^{-1}$ or the inverse function $\arccos(x)?$”).

ryang
  • 38,879
  • 14
  • 81
  • 179