I read a previous question here but it seems incomplete for me (missing references).
Given a generic function, $ f $ :
1. is true that $ f^2 $ means $ f^2(x) = (f \circ f)(x) = f(f(x)) $ ?
2. or is true that $ f^2 $ means $ f^2(x) = (f(x))^2 $ ?
With your answers can you write also some references?
Anyway if (2) holds, then is $ (f \circ f)(x) $ the only way to write $ f(f(x)) $ ?
Instead, if (1) holds, then why do some books write $ \ln^2(x) = (\ln(x))^2 $ or the trigonometric identity $ \sin^2(x)+\cos^2(x) = 1 $ ?
Thanks for answers.