I am working on the following problem from the L’Hôpital’s Rule section of Stewart Calculus, and I would appreciate feedback on whether my approach is sound, as well as clarification on a few things.
Let $$f(x)= \begin{cases} |x|^x \, \text{ if } x \neq 0 \\ 1 \, \text{ if } x = 0 \end{cases}$$ (a) Show that $f$ is continuous at $0$.
(b) Investigate graphically whether $f$ is differentiable at $0$ by zooming in several times toward the point $(0,1)$ on the graph of $f$.
(c) Show that $f$ is not differentiable at $0$. How can you reconcile this fact with the appearance of the graphs in part (b)?
Part (a): Continuity
To show $f$ is continuous at $0$, we would like to show $\lim_{x \to 0}f(x) = f(0)$.
First we note that $f(0) = 1$, by definition.
To check $\lim_{x \to 0}f(x)$, we could consider left and right hand limits separately so remove absolute value signs, but I believe we can do it in one go if we use the result $\frac{d}{dx}|x| = \frac{x}{|x|}$. To that end, $$\begin{align} \lim_{x \to 0}f(x) &= \lim_{x \to 0} |x|^x \tag{indeterminate form of $0^0$}\\ &= \lim_{x \to 0} e^{x\ln|x|}\\ &= e^{\lim_{x \to 0} x\ln|x|} \tag{by continuity of $e^x$}\\ &= e^0 \tag{limit work show after}\\ &=1 \end{align}$$
Indeterminate Product Limit work: $$ \begin{align} \lim_{x \to 0} x\ln|x| &= \lim_{x \to 0} \frac{\ln|x|}{\frac{1}{x}} \tag{converting to indeterminate $\frac{-\infty}{\infty}$}\\ &= \lim_{x \to 0} \frac{\frac{1}{|x|}\cdot\frac{x}{|x|}}{-\frac{1}{x^2}} \tag{LH Rule}\\ &= \lim_{x \to 0} \frac{x}{|x|^2} \cdot \frac{x^2}{-1}\\ &= \lim_{x \to 0} -x \tag{since $|x|^2 = x^2$}\\ &=0 \end{align} $$ Hence, $\lim_{x \to 0}f(x) = 1 = f(0)$, completing part (a).
Questions about part (a):
- My main question here is if I am allowed to do the limit in one go as I did here instead of considering the left and right hand limits separately. The reason for this is because technically the indeterminate product limit is not $\frac{-\infty}{\infty}$ since $\lim_{x \to 0} \frac{1}{x}$ DNE so maybe L’Hôpital’s Rule does not apply?
Part (b): Graph
On Desmos it seems the graph behaves quite nicely at $x=0$:
$y=|x|^x$" />
Part (c): Differentiability
We consider the limit $$\lim_{h \to 0} \frac{|h|^h-1}{h}$$
From part a) we know $\lim_{x \to 0}|x|^x = 1$, hence $\lim_{h \to 0} |h|^h - 1 = 0$ and the denominator also approaches $0$, so can I apply L’Hôpital’s Rule here?
Using logarithmic differentiation I found $\frac{d}{dx} |x|^x = |x|^x(\ln|x|+1)$, so $$ \begin{align} \lim_{h \to 0} \frac{|h|^h-1}{h} &= \lim_{h \to 0} \frac{|h|^h(\ln|h|+1)-0}{1} \tag{LH Rule?}\\ &= \lim_{h \to 0}|h|^h(\ln|h|+1)\\ &= -\infty \end{align} $$ For the last step, I cannot apply the basic limit laws (since one of the components doesn't exist), but can I still say the limit is $-\infty$? How do we justify that?
Moreover, I don't know how I can reconcile the fact $f'(0)$ DNE with the appearance of the graph in part (b)? Why does the graph look differentiable at $x=0$?