$(\log^2(n))$ and $(\log(n)^2)$, are both same?

114 Views Asked by At

I have two functions, $\log^2 (n)$ and $(\log(n))^2$, is both the functions are same?

Can anyone help me on this?

Edit 1: Is $\log(log( (n))$ is same as $\log^2 (n)$ ?

1

There are 1 best solutions below

0
On

I must say that for some functions, like logarithm or trigonometric functions, it is traditional to use $f^2(x)$ to mean $f(x)^2$.

But in any other context where you have a function (or any map from a set to itself), $f^2(x)$ means $f(f(x))$, which is not the same that $f(x)^2$.

So the answer is: $\log^2(x)=\log(x)^2$, but $f^2(x)=f(f(x))\ne f(x)^2$ if $f$ is any "general" function. Quite confusing, isn't it?