Limit of $f(x)=|\log x|$ My textbook solved this problem:
Find $f'(1^{-})$ if
$$f(x)=|\log x|$$
for the interval $x>0$
The textbook solved it by using the method described below:
$$f'(1^{-})=\lim\limits_{x\to 1^{-}} \frac{f(x)-f(1)}{x-1}$$
Which becomes:
$$f'(1^{-})=\lim\limits_{x\to 1^{-}} \frac{|\log x|-|\log 1|}{x-1}$$
They substituted $x=1-h$
$$f'(1^{-})=\lim\limits_{h\to 0^{+}} \frac{|\log (1-h)|-|\log 1|}{-h}$$
Now they claimed the answer to this is $-1$
I really don't understand how they arrived at that answer. Could it be a typo on their part?
 A: $$f'(1^{-})=\lim\limits_{h\to 0^+} \frac{|\log (1-h)|-|\log 1|}{-h}$$
$$f'(1^{-})=\lim\limits_{h\to 0^+} \frac{|\log (1-h)|-0}{-h}$$
$$f'(1^{-})=\lim\limits_{h\to 0^+} \frac{|\log (1-h)|}{-h}$$
As $h\rightarrow0^+$, we have $1-h\lt1$, and $|\log (1-h)|=-\log (1-h)$.
$$f'(1^{-})=\lim\limits_{h\to 0^+} \frac{-\log (1-h)}{-h}$$
$$f'(1^{-})=\lim\limits_{h\to 0^+} \frac{\log (1-h)}{h}$$
Using L'Hospital's rule,
$$f'(1^-)=-1$$
To solve without L'Hospital's rule, using the Taylor expansion,
$$f'(1^-)=\lim\limits_{h\to 0^+} \frac{-h+\frac{h^2}{2!}-O(h^3)}{h}=-1$$
A: Without l'hopital
0 < 1-h < 1
So $\log(1-h) < 0$
So $\lim_{h\rightarrow 0}\frac {|\log(1-h)| - |\log 1|}{-h} =$
$ \lim_{h\rightarrow 0}\frac {-\log(1-h) -\log 1}{-h} =$
$ \lim_{h\rightarrow 0}\frac {\log(1-h)}{h} =$
$ \lim_{h\rightarrow 0}\log(1-h)^{\frac 1h}  =$
$ \lim_{h\rightarrow 0}\log 1/e  =$
$-1$
A: An alternative answer which does not require Taylor series or the knowledge of the derivative of $\text{log}$ is to use the limit definition for $\frac{1}{e}$:
$$\frac{1}{e} = \lim_{n\rightarrow \infty} \left( 1- \frac{1}{n} \right)^n = \lim_{m\rightarrow 0} \left( 1- m \right)^{1/m} $$
So that:
$$ -\lim_{h\rightarrow 0} \frac{\left| \text{log}(1-h) \right|}{h}=-\lim_{h\rightarrow 0} \left| \text{log}(1-h)^{1/h} \right| = - \left| \text{log} \left( \lim_{h\rightarrow 0} (1-h)^{(1/h)} \right) \right| $$
$$ = -\left| \text{log} \left(1/e \right) \right| = - \left| -1 \right|=-1 $$
