<s>[INST] I want to calculate the limit of: $\lim_{x \to 0} \left(\frac{2^x+8^x}{2} \right)^\frac{1}{x} $ I want to calculate the limit of: $$\lim_{x \to 0} \left(\frac{2^x+8^x}{2} \right)^\frac{1}{x} $$
or prove that it does not exist. Now I know the result is $4$, but I am having trouble getting to it. Any ideas would be greatly appreciated.
 [/INST] Let $f(x) = \left(\frac{2^x+8^x}{2} \right)^\frac{1}{x} $. For $x \to 0$, We have
$$\begin{align*}
\log f(x) &= \frac{1}{x} \log \left[ \frac{1}{2}\left(e^{x \log 2} + e^{x \log 8}\right)   \right]  \\
&= \frac{1}{x}\log\left(1 + x \log 4 + o(x)\right) \\
&= \frac{1}{x}\left(x \log 4 + o(x)\right) \\
&= \log 4 + o(1). 
\end{align*}$$
Thus $f(x) \to 4$.
</s>