Power correct notation

490 Views Asked by At

Ok, I know this may sound dumb, but I am trying to understand which is the correct (most beauty) notation for the power function ${\rm pow}(f(x),n)$.

This is the correct one: $[f(x)]^n$

From trigonometry, where I was used to write $\cos^2x$, we get: $f^n(x)$

And from Bishop's Pattern Recognition and Machine Learning I get $\mathbb{E}\,[f(x)^2]$, so: $f(x)^n$

So, is there any other 'me' out there who has already found the correct beauty and elegant way?

2

There are 2 best solutions below

3
On BEST ANSWER

The most clear notation is certainly to write $$\left(f(x)\right)^n$$

This is because the notation $f^n(x)$ will frequently refer to the composition $f \circ f \circ ... \circ f$.

1
On

The trigonometry convention is awful and should never be used, but as the other answer indicates it is fine to use that notation for composition, so $f^2(x) = f(f(x))$ which is consistent with using $f^{-1}$ to denote the inverse of $f$. The extra parentheses are unnecessary, so just write $f(x)^2$, $\cos(x)^2$, etc. It is also common to omit all the parentheses in some cases, for example $\cos x$ instead of $\cos(x)$, and I wouldn't be surprised to see $\cos{x^2}$ for $\cos(x^2)$.