The question reads as follows:
Let $f(x) = x^{\frac{1}{x}}$ for $x>0$
Calculate $\lim_{x\to0^+} f(x)$ and $\lim_{x\to\infty} f(x)$
My attempt:
First rewrite the function to a form where we can apply L'Hospital's Rule:
$x^{\frac{1}{x}} = e^{\ln(x)^{\frac{1}{x}}} = e^{\frac{\ln(x)}{x}}$
Then take the limit of the power:
$\lim_{x\to\infty} {\frac{\ln(x)}{x}}$, by L'Hospital's Rule we have:
$\lim_{x\to\infty} {\frac{\frac{1}{x}}{1}} = \frac{0}{1} = 0$
This means that:
$\lim_{x\to\infty} x^{\frac{1}{x}} = e^{\lim_{x\to\infty}{\frac{\ln(x)}{x}}} = e^0 = 1$.
For the other limit (this is where I am struggling):
Again we can rewrite the function to a form where we can apply L'Hospital's Rule:
$x^{\frac{1}{x}} = e^{\ln(x)^{\frac{1}{x}}} = e^{\frac{\ln(x)}{x}}$
Then, again, take the limit of the power:
$\lim_{x\to0^+} {\frac{\ln(x)}{x}} = \lim_{x\to0^+} {\frac{\frac{1}{x}}{1}} = \frac{\infty}{1}$
Therefore we should have:
$\lim_{x\to0^+} x^{\frac{1}{x}} = e^{\lim_{x\to0^+}{\frac{\ln(x)}{x}}} = e^\infty= \infty$.
However, by looking at the graph of the function, this is clearly not the case. What am I doing wrong?
Edit: I answered my own question below.