Question: are cos^2x and cosx^2 the same?
Answer: No, cos^2(x) is not equal to cos(x^2). ... x is domain and cos x is range. So, here in first case domain is x and range is cos^2(x) but in second case x^2 is dimain and cos(x^2) is range.