What is the domain of $x^{2x}$

What is the domain of $$f(x)=x^{2x}$$?

If $$f(x)=(x^2)^x$$then $$f$$ is defined for every real number but if $$f(x)=(x^x)^2$$ then $$f$$ is only defined and "nice" (excluding the negative $$-p/q$$ fractions) for positive real numbers.

Should we say $$f(x)=e^{2x\log(x)}$$ is only defined for positive $$x$$?

Thanks

• For $f(x)=(x^x)^2$, the function is defined for all real numbers except 0. And for $f(x) = e^{2xlog(x)}$, the domain is only positive numbers. – harshit54 Nov 17 '18 at 13:36
• @harshit54 Really? What is $f(x)=(x^x)^2$ for $x=-\frac14$? – Servaes Nov 17 '18 at 13:38
• @Servaes Okay, sorry. So it's defined for all positive reals, and negative integers. – harshit54 Nov 17 '18 at 14:02

I would say that it's defined only for positive numbers. Let's look at a simpler problem: what is the domain of $$x^\frac12$$? I can say "I could always write it as $$(x^2)^\frac14$$." The issue is order of operations. Unless you have parantheses, you need to calculate the exponent first. See for example https://en.wikipedia.org/wiki/Order_of_operations#Serial_exponentiation