33

What is it used for and why doesn't it equal $\log{x^2}$?

David G
  • 4,277
  • 4
    It's shorthand for $(\log x)^2$. The problem is that $\log (x^2)=2\log x$ by the power rule for logarithms, and in general $y^2\ne 2y$ (here with $y=\log x$). – anon May 27 '12 at 23:25

2 Answers2

40

It is convention to write

$$\log ^2 x$$

in place of

$$(\log x)^2=\log x \times \log x$$

just in the same manner as we write $\sin^2 x = (\sin x)^2$ or any other "named" function's square. In general, you will see $(f(x))^n$ for the $n$th power of a function, and $f^n (x)$ in place of the $n$ times composition of $f$, i.e. $f^3(x)=f \circ f \circ f(x)$. However, for the $\log$ and trigonometric functions, we break this convention.

Note that $\log(x^2)=2 \log x \neq \log x \cdot \log x$

Pedro
  • 122,002
  • 1
    Great answer. This cleared up everything and taught me a bit too! :) – David G May 27 '12 at 23:27
  • 3
    Barring special cases like $\sin$, $f^n(x)$ is rather rare notation for this, presumably because the more precise $f(x)^n$ is convenient with parenthesized evaluation. –  May 28 '12 at 01:15
  • 2
    Similar to @Hurkyl, in my experience it is most common for $f^n(x)$ to mean the $n$-times application of $f$ , and the interpretation of raising $f(x)$ to the $n$th power is only used for trigonometric functions and $\log$. – Chris Taylor May 28 '12 at 09:50
  • I have seen most of the times the notation $f^{(n)}(x)$ for the $n$ times composition. I guess it is because the notation $f^n(x)$ is reserved for $(f(x))^n$ by convention. But I would suggest using $f^{(n)}(x)$ for $n$ times composition (assuming that is well-understood) and $(f(x))^n$ for the latter instead of the ambiguous one $f^n(x)$. – Cyriac Antony Oct 26 '18 at 07:07
  • Actually it's way more common to see $f^n(x)$ being used for $n$ times composition while $f^{(n)}(x)$ represents the $n$-th derivative. – Pedro Nov 06 '20 at 00:08
4

Already "log" is ambiguous, implying respectively base 10, e, or 2 in elementary applied mathematics, general mathematics, and information theory or theoretical computer science. In the second case, particularly in number theory and theoretical statistics, the iterated logarithm arises naturally, and some authors mean $\log \log x$ by $\log^2 x$. The squared logarithm isn't seen much outside school calculus textbooks. The reverse is true for trigonometric functions: the squared functions are ubiquitous, while the iterated functions are mostly confined to examples and exercises for students. The notation $\sin^2 x$ is illogical (Gauss, in particular, complained about it), but so convenient and established by tradition that we are probably stuck with it.

John Bentin
  • 18,454
  • 3
    Both squared and iterated logarithms arise naturally in algorithmic complexity, and there the notation $\log^2 n$ for $(\log n)^2$ is ubiquitous. Iterated logarithms are notated $\log \log n$. – hmakholm left over Monica Apr 06 '15 at 05:22