Find lim as x to a (a^x-x^a)/(x-a), where a > 0
Find $\displaystyle\lim_{x\to a}\frac{a^{x}-x^{a}}{x-a}$, where $a\gt 0$.
Explanation of Method
A difference quotient in disguise.
Step 1: The form
At $x = a$ the numerator is $a^{a}-a^{a} = 0$ and the denominator is $0$: the form is $\dfrac00$.
Step 2: Apply l'Hôpital's rule
Differentiate numerator and denominator with respect to $x$, remembering that $a$ is a constant — so $a^{x}$ is an exponential and $x^{a}$ is a power: \[\frac{d}{dx}\,a^{x} = a^{x}\ln a, \qquad \frac{d}{dx}\,x^{a} = a\,x^{a-1}, \qquad \frac{d}{dx}\bigl(x-a\bigr) = 1.\]
\[ \lim_{x\to a}\frac{a^{x}-x^{a}}{x-a} = \lim_{x\to a}\frac{a^{x}\ln a - a\,x^{a-1}}{1}. \]
Step 3: Substitute $x = a$
The new expression is continuous at $x = a$, so the limit is its value there: $a^{a}\ln a - a\cdot a^{a-1} = a^{a}\ln a - a^{a} = a^{a}\bigl(\ln a - 1\bigr)$.
Step 4: Verification
\[a = 2:\ 2^{2}\bigl(\ln2-1\bigr) = 4\bigl(0.693147-1\bigr) = -1.2274113\]
\[x = 2.001:\ -1.2274502; \qquad x = 1.999:\ -1.2273720 \;\;\checkmark\]
\[a = e:\ e^{e}\bigl(\ln e - 1\bigr) = 0 \;\;\checkmark\ \text{(the two curves touch there)}\]
Result
Final answer:
\[\boxed{\,\lim_{x\to a}\frac{a^{x}-x^{a}}{x-a} = a^{a}\bigl(\ln a - 1\bigr)\,}\]
Remark
Remark. The limit is nothing but the derivative of $f(x) = a^{x}-x^{a}$ at $x = a$, since $f(a) = 0$ makes the quotient $\bigl(f(x)-f(a)\bigr)/(x-a)$. The value vanishes exactly when $a = e$: there the exponential $e^{x}$ and the power $x^{e}$ are tangent to one another, which is the classical reason $e^{\pi}\gt \pi^{e}$.