Show that for \(x>0\), \(x^{1/x}\) has its greatest value when \(x=e\).

so \[\frac{dy}{dx}=\frac{y(1-\ln x)}{x^2}=\frac{x^{1/x}(1-\ln x)}{x^2}.\] Turning points occur when \(\dfrac{dy}{dx}=0\), which is precisely when \[1-\ln x=0,\] as \(x^{1/x}\) is never zero for \(x>0\). So \(\ln x=1\), and the only stationary point is at \(x=e\).

Alternatively we can say, let \(x^{1/x} = e^{f(x)}.\) Taking natural logs shows that \(f(x) = \dfrac{\ln x}{x}\).

We can now differentiate \(y = e^{f(x)}\) using the chain and quotient rules.

To determine the nature of the stationary point, we’ll look at the value of \(y\) or \(\dfrac{dy}{dx}\) either side of \(x=e\).

We have \(\dfrac{dy}{dx}=\dfrac{x^{1/x}(1-\ln x)}{x^2},\) and since \(x^{1/x}\) and \(x^2\) are always positive for \(x>0\), the sign of the derivative is determined by the sign of \(1-\ln x\).

So when \(x<e\), \(\dfrac{dy}{dx}>0\) and the function is increasing; when \(x>e\), \(\dfrac{dy}{dx}<0\) and the function is decreasing.

Therefore the function has a maximum at \(x=e\), and this is the global maximum of the function.

Hence, or otherwise, but without use of a calculator, determine which is the greater of \(e^{\pi}\) and \(\pi^e\).

From our argument above, we must have \(\pi^{1/\pi} < e^{1/e}\).

Raising both sides to the power \(e \pi\) gives \(\pi^e<e^{\pi}\) (this step is valid, since the function \(f(x)=x^{e \pi}\) is strictly increasing for \(x > 0\)).

So \(e^{\pi}\) is larger.