What is the domain and range of $x^{cos(x)}$? By all accounts (Wolfram, Desmos and my TI-nspire CAS calculator) the domain is apparently all x>0, but subbing in things like -$\frac{\pi}{2}$ or -$\pi$ yields a real answer, despite their being negative and thus ostensibly outside the domain. Likewise, Wolfram Alpha was "unable to determine range" and has left me very confused about the whole thing. Similar story with $x^{sin(x)}$. 
Any help would be greatly appreciated!
 A: Start with $\cos(x)$.
It's clear that $\mathcal D(\cos(x))=\Bbb R$ and $\mathcal R(\cos(x))=[-1,1]$
Carry this forward, and we are finding the domain and range of $g(x)=x^\chi, \chi\in[-1,1]$
With $x\leq 0$, we run into immediate definition problems here, but for $x>0$ this function is well defined. Hence $\mathcal D(g)=\Bbb R^+$.
Finding the range, note that $g'(x)=\chi x^{\chi-1}$ is strictly positive if $\chi>0$ and strictly negative if $\chi<0$. That is $g$ is monotone, and only bounded by $g(x)>0$. Thus $\mathcal R (g)=\Bbb R^+$ too.
A: There are different definitions for $x^y$ that usually coincide. But you are seeing an instance of where the conventions do not agree. 
In one convention, $x^y$ literally means $e^{y\ln(x)}$, because it can be easier to give solid definitions for $\ln()$ and $e^{()}$ first. In this convention alone a negative base is never permitted.
In this convention, when $y$ is a positive integer, then $x^y$ turns out to be exactly the same value as $\overbrace{x\cdot x\cdot\cdots\cdot x}^{y\text{ times}}$. That's nice. It agrees with the elementary school meaning for an exponent that is a positive integer. Some conventions then extend this and agree that $x^y=\overbrace{x\cdot x\cdot\cdots\cdot x}^{y\text{ times}}$ when $y$ is a positive integer even when $x$ is negative. So then you get things like $(-\pi)^{1}=-\pi$. But just under that extended convention. 
And then there are even more issues with conventions about having $0$ as an exponent. Just look up posts about $0^0$ on this site to get a taste. But anyway, in some of those extended conventions, there is meaning for things like $(-\pi/2)^0$.
A CAS like WolframAlpha is likely to work under the convention that $x^y=e^{y\ln(x)}$ with no extensions to that convention unless you go out of your way to let the CAS know that $y$ may be an integer. With $y$ being the transcendental function $\cos(x)$, it's no surprise if the CAS doesn't think about it as an integer.
