No. of solutions of $x^a = a^x$ We need to find the number of solutions of $x^a = a^x$.
I tried using Desmos but I don't understand the solution. A friend of mine says the domain is $x>0$ & $a>0$, but I don't understand why.
Honestly speaking, I don't know, how to find the domain of a function like this. I apologize for any dumb mistake, I'm not so good at Maths.
 A: $x>0$ and $a>0$ by definition of $a^x$ (here must be $a>0$) and of $x^a$( here must be $x>0$).
Now, we can rewrite our equation in the following form.
$$\frac{\ln{x}}{x}=\frac{\ln{a}}{a}.$$ 
Now, consider $f(x)=\frac{\ln{x}}{x}.$ 
$$f'(x)=\frac{1-\ln{x}}{x^2}$$ and the rest for you.
A: Assume $x>0,a>0,a\not=1$
Then $x^a=a^x\Leftrightarrow e^{a\log{x}}=e^{x\log{a}}$. Since $e^x$ is bijective, $\frac{\log{x}}{\log{a}}=\frac{x}{a}$, thus $\log_a{x}=\frac{x}{a}$
Now fix an arbitrary $a$. The logarithm ranges over $\mathbb{R}$ and $x/a$ is real quantity, so this equation has a solution for arbitrary positive $a\in\mathbb{R}$.
Note that $a=1$ yields $x^1=1^x\Leftrightarrow x=1$, so it does provide a solution, but if $a$ could equal $1$ some of the latter manipulations wouldn't be justified.
Edit: You can also simply note that $x=a$ provides a solution for every arbitrary $a$ as long as the resulting expression is defined and this already creates infinitely many trivial solutions.
A: I assume that you are talking about real numbers. Exponetiation for complex numbers are more... well, complex.
About the domain: although some powers with negative base, like $(-2)^3$, can be defined, the function $f(x)=a^x$ is defined for every real $x$ only if $a>0$. The reason is that powers with negative base and irrational exponent, like $(-2)^{\sqrt 2}$ can't be properly defined using only real numbers. Even with rational exponents there are problems, because the usual properties of exponentiation fail. Example:
$$(-2)^{2/6}=\sqrt[6]{(-2)^2}=\sqrt[6]{4}$$
But
$$(-2)^{2/6}=\left(\sqrt[6]{-2}\right)^2=??$$
Since the equation $a^x=x^a$ has two powers, and their respective bases are $a$ and $x$, both numbers must be positive.
About the equation:
The equation has at least an obvious solution, namely $x=a$. So the point is to see if there are more.
Let $a>0$. For every $x>0$ define
$$f(x)=\ln\frac{a^x}{x^a}=x\ln a-a\ln x$$
Note that the zeroes of $f$ are precisely the solutions of the equation $x^a=a^x$.
Then
$$f'(x)=\ln a-\frac ax$$
If $0<a<1$ then $\ln a<0$ and $f$ is strictly decreasing. So the equation has only one solution in this case.
If $a=1$ the only solution is obviously $x=1$.
If $a>1$, the derivative is zero only if $x=\frac a{\ln a}$, and the minimum of $f$ is at this point. And
$$f\left(\frac a{\ln a}\right)=a(1-\ln a+\ln\ln a)=a\ln\left(\frac{e\ln a}a\right)\stackrel *< a\ln\left(\frac ee\right)=0$$
Since $f$ is decreasing in $(0,a/\ln a]$ and increasing in $[a/\ln a,\infty)$, and $\lim_{x\to 0}f(x)=\lim_{x\to\infty} f(x)=\infty$, there are exactly two solutions in this case.

(*) To show this inequality, consider $g(x)=\frac{\ln x}x$ for $x>0$. Then
$$g'(x)=\frac{1-\ln x}{x^2}$$
so $g$ reaches a maximum at $x=e$. Then
$$g(a)\le g(e)=\frac 1e$$
Remark: If you see the equation $x^a=a^x$ as a Diophantine equation, you can choose the domain for $x$ and $a$ as $\Bbb Z$ instead of $(0,\infty)$, because powers with negative base and integer exponent are defined. This could give more solutions. I think that this is not what you are looking for, though.
