# Help understanding proof of derivative of log x base a

I am re-reading my calculus book and it has the following proof for the derivative of $\log_ax$:

$$(\log_ax)'=\lim_{h\to 0}\frac{{\log_a{(x+h)}}-\log_a{x}}{h}=\lim_{h\to0}\frac{\log_a{\left(\frac{x+h}{x}\right)}}{h}$$

$$=\frac{1}{x}\lim_{h\to0}{\left[\log_a{\left(1+\frac{h}{x}\right)^{\frac{x}{h}}}\right]}$$

That is all well and good, but I don't get how they make the next step:

$$=\frac{1}{x}\log_a{\left[\lim_{h\to0}{\left(1+\frac{h}{x}\right)^{\frac{x}{h}}}\right]}$$

I could only find different (and simpler) proofs online, and this question is just about how that last step was done. Thank you.

## 1 Answer

For continuous function, we can interchange the limit with the function.

That is if a function $f$ is continuous at $x_0$, then $$\lim_{x \to x_0} f(x) = f\left(\lim_{x \to x_0} x\right)=f(x_0)$$

The last move is valid as $\log_a(.)$ is a continuous function.

• +1, never knew this! Follow-up question (not OP): If $f_1, f_2, \dots, f_n: \mathbb{R} \to \mathbb{R}$ are continuous functions at $x_0$, then would $$\lim_{x\to x_0}(f_n(\dots(f_2(f_1(x)))\dots)) = f_n(\dots(f_2(f_1(\lim_{x\to x_0}x)))\dots) \text{?}$$ Would this hold for infinitely many functions, or would we get tied up in complications involving AOC? – Andrew Tawfeek Sep 4 '17 at 6:03
• composition of finitely many continuous function is continuous, hence yes. It is possible to compose a continuous function infinitely many times such that the limit exists and yet it is not continuous. – Siong Thye Goh Sep 4 '17 at 6:16
• That's interesting! Do you know where I could read up more about this? Is it something that's studied in Real Analysis? – Andrew Tawfeek Sep 4 '17 at 6:21
• Thank you very much. I will read more about this. – sempiedram Sep 4 '17 at 6:26
• @AndrewTawfeek result about finite composition is typically covered in a calculus/ analysis class. Infinite composition I guess is what I learned by spending time on this site. – Siong Thye Goh Sep 4 '17 at 18:27