I'm confused about how the absolute value appears in the following formula (**) in Serge Lang's "Multivariable Calculus of Several Variables".
Context: He has already defined the single-variable derivative as the limit of the difference quotient. He proceeds to define the following function for a fixed x:
$g(h) = \frac{f(x+h)-f(x)}{h} -f'(x)$
This is then rewritten as:
$f(x+h)-f(x) = f'(x)h + hg(h)$
After a comment on how this is defined for all values of $h$, since the definition works for $h\not = 0$ and we specifically define $g(0) = 0$, we get this paragraph:
"Furthermore, we can replace $h$ by $-h$ if we replace $g$ by $-g$. Thus we have shown that if $f$ is differentiable, there exists a function $g$ such that:
(**) $f(x+h)-f(x) = f'(x)h + |h|g(h)$
$\lim_{h\rightarrow 0} g(h) = 0$
Question: Where does the absolute value come from? Also, is what the point of replacing $h$ and $g$ with their negatives.
I've tried calculating $-g(h)$ from the original formula, and I get:
$-g(h) = \frac{f(x+h)-f(x)}{-h} +f'(x)$
which leads back to the original rewrite:
$f(x+h)-f(x) = f'(x)h + hg(h)$
So I get that a change to $-g$ corresponds with a change to $-h$.
But the right-hand side of (**) is: $f'(x)h + |h|g(h)$
Why is there absolute value in the second term, but not the first?
By definition of $g$, relationship
$$ f(x+h)-f(x) = f'(x)h + {hg(h)}$$
holds for any $h$.
Replacing $h$ by $-h$, we also have:
$$ f(x-h)-f(x) = f'(x)(-h) + (-h)g(-h),$$
which is equivalent to
$$ f(x-h)-f(x) = f'(x)(-h) + h(-g)(-h).$$
The function that exists and respects Lang's relationship is $\alpha$ defined as
$\alpha(h)=g(h)$ if $h$ is positive, $\alpha(h)=(-g)(h)$ if $h$ is negative, and $\alpha(0)=0$. Its limit at $0$ is $0$ because both $g$ and $-g$ have limits $0$ at $0$.
It is this new function (not original $g$) that gives:
$$ f(x+h)-f(x) = f'(x)h + |h|\alpha(h)$$
for any $h$.
Note that for any non-zero $h$, we simply have:
$$ \alpha(h)=\frac{hg(h)}{|h|}.$$