Is $(x^2)^x$ differentiable at $0$? Have to grade a midterm where one of the true/false questions boils down to whether or not $f(x)=(x^2)^x$ is differentiable at 0.  I'm not sure of the answer.
For one thing, the continuity of $f(x)$ is author-dependent since it hinges on what $0^0$ is taken to be.  Let's assume $0^0$ is defined as 1, so that $f(x)$ is continuous at $0$.
For all $x\not=0$, $f'(x)=(\ln(x^2)+2)(x^2)^x$.  Thus, $\lim_{x\to 0}f'(x)=-\infty$.  Can we somehow deduce that $f'(0)$ is nonexistent from this, e.g., some kind of result of the form "wherever f is differentiable, it is continuously differentiable"?
 A: More direct approach can be made. Let assume we removed the discontinuity at $x=0$ by letting $f(0)=1$. Then near $x=0$, $x \log|x| = o(1)$ and hence
$$ (x^2)^x = \exp(2x\log|x|) = 1 + 2x\log|x| + O(x^2 \log^2 |x|).$$
Thus we have
$$ \frac{(x^2)^x - 1}{x} = 2\log |x| + O(x \log^2 |x|) = 2\log|x| + o(1).$$
This implies that $f$ is still non-differentiable at $x=0$ even after the continuation.
A: "...some kind of result of the form "wherever $f$ is differentiable, it is continuously differentiable"?"

THEOREM Suppose that $f$ is continuous at $x=a$ and that $f'$ is defined for every $x$ on some neighborhood of $a$, except possibly at $x=a$. Suppose that $\lim\limits_{x\to a}f'(x)$ exists. Then $f'(a)$ exists and $f'(a)=\lim\limits_{x\to a}f'(x)$.

Here, "exists" strictly means the limit is a real number. 
A: We use the fact that $\lim_{h\to0} \exp(h \ln(h^2)) = 1$ below, which you may show by showing $\lim_{h \to 0^+} h \ln(h) = 0$.
$$\begin{align*}
\lim_{h\to0^+} \frac{f(h) - f(0)}{h}
&= \lim_{h\to0^+} \frac{(h^{2})^h - 1}{h}
\\&= \lim_{h\to0^+} \frac{\exp(h \ln(h^2)) - 1}{h}
\\&= \lim_{h\to0^+} \frac{\exp(h \ln(h^2)) \cdot \bigl[ \ln(h^2) + h \cdot\tfrac{1}{h^2}\cdot 2h\bigr] - 0}{1} \tag{L'Hospital}
\\&= \lim_{h\to0^+} \exp(h \ln(h^2)) \cdot \bigl[ 2 \ln|h| + 2\bigr]  \;\longrightarrow\; -\infty
\\[2em]
\lim_{h\to0^-} \frac{f(h) - f(0)}{h}
&= \lim_{h\to0^-} \frac{(h^{2})^h - 1}{h}
\\&= \lim_{h\to0^-} \frac{\exp(h \ln(h^2)) - 1}{h}
\\&= \lim_{h\to0^+} \frac{\exp(-h \ln(h^2)) - 1}{-h}
\\&= \lim_{h\to0^+} \frac{\exp(-h \ln(h^2)) \cdot \bigl[ -\ln(h^2) - h \cdot\tfrac{1}{h^2}\cdot 2h\bigr] - 0}{-1} \tag{L'Hospital}
\\&= \lim_{h\to0^+} \exp(-h \ln(h^2)) \cdot \bigl[ 2 \ln|h| + 2\bigr]  \;\longrightarrow\; -\infty
\end{align*}$$
We find that both the limit from below and above fail to exist, though they are consistent (the curve is continuous without a cusp, having infinite negative slope at zero).
