How to compare these numbers How to compare $ 3^{\pi}$ and $\pi^{3}$ 
I think this can be done by taking the function $f(x)=x^{\frac{1}{x}}$ where $x>0$, on taking first derivative i got $f^1(x)=\frac{x^{\frac{1}{x}}}{x^2}({1+log(x)})$
when $f^1(x)$ equated with zero i got $x=\frac{1}{e}$.
what i do want to know is whether the function $f(x)$ is increasing or decreasing over the interval $ x \in (e^{-1},\infty)$ 
when i tried twice first i got decreasing then i got increasing.which one is right?

You choose the proper function for this study but I think that you made a small mistake sincd the derivative of  $f(x)=x^{\frac{1}{x}}$ is $$f'(x)=x^{\frac{1}{x}} \left(\frac{1}{x^2}-\frac{\log (x)}{x^2}\right)$$ (to obtain this result, logarithmic differentiation makes life much easier).
So, the derivative cancels at $x=e$ and this point corresponds to a maximum (second derivative test) since $$f''(x)=x^{\frac{1}{x}} \left(\frac{2 \log (x)}{x^3}-\frac{3}{x^3}\right)+x^{\frac{1}{x}}
   \left(\frac{1}{x^2}-\frac{\log (x)}{x^2}\right)^2$$ which makes $$f''(e)=-e^{\frac{1}{e}-3}$$ So, the function increases up to $x=e$, goes though the maximum and then decreases.
So, since $e<3<\pi$, then $\cdots$
