TITLE: Evaluate the limit with exponents using L'Hôpital's rule or series expansion
QUESTION [5 upvotes]: Evaluate the limit$$\lim_{x\to 0}\dfrac{\left(\frac{a^x+b^x}{2}\right)^{\frac{1}{x}}
-\sqrt{ab}}{x}$$ It is known that $a>0,b>0$
My Attempt:
I could only fathom that  $$\lim_{x\to 0}\left(\frac{a^x+b^x}{2}\right)^{\frac{1}{x}}=\sqrt{ab}$$

REPLY [5 votes]: Using the series expansion for $\log(1+x)$, we get
$$
\frac1x\,\log\left(1+mx+nx^2+O\!\left(x^3\right)\right)
=m+\left(n-\frac{m^2}2\right)x+O\!\left(x^2\right)
$$
Using the series expansion for $e^x$, we get
$$
\left(1+mx+nx^2+O\!\left(x^3\right)\right)^{1/x}
=e^m\left(1+\left(n-\frac{m^2}2\right)x+O\!\left(x^2\right)\right)
$$
Therefore, writing $a^x=e^{x\log(a)}$ and $b^x=e^{x\log(b)}$ and using the series expansion for $e^x$, we get
$$
\begin{align}
\frac{\left(\frac{a^x+b^x}2\right)^{1/x}-\sqrt{ab}}x
&=\frac{\scriptsize\left(1+\frac x2(\log(a)+\log(b))+\frac{x^2}4\left(\log(a)^2+\log(b)^2\right)+O\!\left(x^3\right)\right)^{1/x}-\sqrt{ab}}x\\
&=\frac{\sqrt{ab}\left(1+\frac{\log(a)^2+\log(b)^2-2\log(a)\log(b)}8x+O\!\left(x^2\right)\right)-\sqrt{ab}}x\\[9pt]
&=\frac18\sqrt{ab}\,(\log(a)-\log(b))^2+O(x)
\end{align}
$$
Thus,
$$
\lim_{x\to0}\frac{\left(\frac{a^x+b^x}2\right)^{1/x}-\sqrt{ab}}x
=\frac18\sqrt{ab}\,(\log(a)-\log(b))^2
$$