How to compare $a^b $and $ b^a $ ( for Eg. $ (\sqrt 2 )^{e} $ and $ e^{\sqrt2}$ ) such that $a \leq e \leq b$ and $a,b\geq 0 $ I have seen answer to similar question but it was about $ 3^{\pi}$ & $ { \pi }^3 $.
And they have done that through defining a function $f(x)=x^{\frac{1}{x}} $ also this function attains maximum at $'e'$ That can be shown easily .
My question is about How to compare two numbers $ a , b $ such that $a \leq e \leq b$ , what will we do there?
Any Help to overcome this problem is appreciable..!! 

The function $x^{\frac{1}{x}}$ is decreasing for $x > e$. So if $ e<a<b $ then $a^{\frac{1}{a} } > b^{\frac{1}{b}}$ . In your case $ \color{red}{3^{\pi} > \pi^{3}}$.
EDIT:
In order to solve the problem when $a < e < b$ we need to invert the equation $ \frac{ln(b')}{b'}= \frac{ln(b)}{b}$ where $b'<e<b$. This can be done using the Lambert $W$ function. Given $b$, $b'$ can be calculated using 
\begin{eqnarray*}
b'= \exp( -W_0(-\frac{ln(b)}{b})).
\end{eqnarray*}
You can use Wolfie to do this calculation Eg $b=4$ https://www.wolframalpha.com/input/?i=e%5E(-productlog(-ln(b)%2Fb)),b%3D4
Then compare the returned value $b'$ with $a$. We are now in the increasing part of the function so if $a<b'$ then $a^{b'} < (b')^a$.
