Answer: B
Solution:
Let $y = f(x) = x^{1/x}$
Taking $\log$ on both sides, we get:
$\log y = \log(x^{1/x}) \implies \log y = \frac{1}{x}\log x $
Differentiating above w.r.t. x, we get:
$\frac{1}{y}\frac{dy}{dx} = \frac{1}{x^2} - \frac{1}{x^2}\log x = 0$
Now,
$\frac{dy}{dx} = y \underbrace{ \Bigg(\frac{1}{x^2} - \frac{1}{x^2}\log x \Bigg)}_{\text = 0}= 0 \implies \frac{dy}{dx} = y\frac{1}{x^2}(1-\log x)$
Here, $\frac{1}{x^2}$ can't be zero.
So,$1-\log x = 0 \implies \log x = 1 \implies e ^1 = x \implies x = e$
$\therefore$ The function has a maximum at $x = e$
Hence, B is the correct option.