Squaring the argument of a logarithm with parentheses

18 Views Asked by At

I have come across an usual convention for writing the square of the logarithm. It is $\log(x)^2$, which I would simply interpret as $\log(x^2)$. Now, the poster insists that $\log(x)^2$ is the same as $\log^2(x)$, and I am aware that this is at least correct in some programming language (I tried Python). Can anyone confirm this?

Edit: This question has been marked as duplicate based on similar questions asked around trigonometric functions, and those seem to confirm $\log(x)^2=(\log(x))^2$. As a follow up question, does that imply that $\log(1+x)^2=(\log(1+x))^2$?