Concept:
To find the maximum of a function involving a variable in both base and exponent, we take logarithm and then differentiate.
Step 1: Take logarithm.
Given:
\[
y = \left(\frac{1}{x}\right)^x
\]
Take natural logarithm:
\[
\ln y = x \ln\left(\frac{1}{x}\right)
\]
\[
= x (-\ln x) = -x \ln x
\]
Step 2: Differentiate.
Differentiate both sides w.r.t. \(x\):
\[
\frac{1}{y}\frac{dy}{dx} = -\left(\ln x + 1\right)
\]
(Using product rule: \( \frac{d}{dx}(x\ln x) = \ln x + 1 \))
\[
\Rightarrow \frac{dy}{dx} = y(-\ln x - 1)
\]
Step 3: Find critical point.
For maxima/minima:
\[
\frac{dy}{dx} = 0
\]
Since \(y \neq 0\), we get:
\[
-\ln x - 1 = 0
\Rightarrow \ln x = -1
\Rightarrow x = e^{-1} = \frac{1}{e}
\]
Step 4: Check maximum.
Second derivative (or sign change):
\[
\frac{dy}{dx} \text{ changes from positive to negative at } x=\frac{1}{e}
\]
Hence, this gives maximum.
Step 5: Find maximum value.
\[
y = \left(\frac{1}{x}\right)^x
= \left(e\right)^{1/e}
\]