Problem proving something from Spivak's Calculus (Ch 20, problem 17a) I am having some issues with the following problem: 
Show that if $\vert g'(x)\vert \leq M\vert x-a\vert ^n$ for $\vert x-a \vert < \delta$, then $\vert g(x)-g(a) \vert \leq \dfrac{M \vert x-a \vert ^{n+1}}{n+1}$ for $\vert x-a \vert < \delta$
Attempted proof:
So clearly $-M \vert x-a\vert ^n \leq g'(x) \leq M \vert x-a\vert ^n$.
Let's assume for the moment that $x > a$. 
We know from the hypothesis that $g'(x)$ is bounded for ALL values in our interval $[a,x]$ and since $g'$ is continuous on the interval, we can apply the Mean Value Theorem.  
This would imply that $-M \vert x-a\vert ^n \leq \dfrac{g(x)-g(a)}{x-a} \leq M \vert x-a\vert ^n$. 
Then multiplying through by $(x-a)$:  
$\rightarrow -M (x-a)^{n+1} \leq g(x)-g(a)\leq M (x-a)^{n+1}$
I don't see how to get the $n+1$ term in the denominator.  I checked the solutions and the solutions start the same way I do, and then simply say use MVT to get the result.
 A: The $n+1$ denominator should clue you to integrate--you have a derivative bound, so you don't have many choices. Write
$g(x) - g(a) = \int_a^x g'(t) \, dt.$
Then
$$|g(x) - g(a)| \leq \int_a^x |g'(t)| \, dt \leq M\int_a^x |t-a|^n \, dt,$$
and you can conclude.
A: You mention in your post that $g'$ is continuous on the interval. This is definitely not true. All you're told is that $g'$ satisfies a certain inequality (which only implies continuity at the point $a$). The other answer uses integration and the FTC, but this only works provided we know $g'$ is continuous, or at the very least, Riemann-integrable. Again, this is not necessarily true given our hypotheses.
The implication you're asking about does really follow from the mean-value theorem, and in fact this is one of the first applications of the mean-value theorem in Spivak:

Let $\phi:[a,b]\to\Bbb{R}$ be continuous on $[a,b]$, differentiable on $(a,b)$, and suppose $\phi'\geq 0$ on $(a,b)$. Then, $\phi(b)-\phi(a)\geq 0$.

In other words, if the derivative is non-negative, then the function is weakly increasing. As a simple corollary, we have the following result:

Let $f,g:[a,b]\to\Bbb{R}$ be two functions which are continuous on $[a,b]$, differentiable on $(a,b)$. If $g'\leq f'$ on $(a,b)$, then $g(b)-g(a)\leq f(b)-f(a)$.

The proof is immediate by considering $\phi=f-g$.
In your question, we first consider the case $x>a$ and consider the functions $f_{\pm}(t):=\frac{\pm M}{n+1}(t-a)^{n+1}$ defined on the interval $[a,x]$. Then, your assumption on $g$ is that $f_{-}'\leq g'\leq f_{+}'$. Thus, by the result above (which we established using the mean-value theorem), it follows that
\begin{align}
f_{-}(x)-f_{-}(a)\leq g(x)-g(a)\leq f_{+}(x)-f_{+}(a),
\end{align}
or plugging in the definitions (and noting that $f_{\pm}(a)=0$),
\begin{align}
\frac{-M(x-a)^{n+1}}{n+1}\leq g(x)-g(a)\leq \frac{M(x-a)^{n+1}}{n+1},
\end{align}
i.e $|g(x)-g(a)|\leq \frac{M|x-a|^{n+1}}{n+1}$. Next, consider the case $x\leq a$ similarly.

I should mention that the second highlighted statement is easily generalizable to the multivariable setting, where it is known as the mean-value inequality (a naive generalization of the mean-value theorem fails in higher dimensions). More precisely, the theorem is this:

Let $(V,\|\cdot\|)$ be a Banach space, and let $g:[a,b]\to V$ and $f:[a,b]\to \Bbb{R}$ be two functions which are continuous on $[a,b]$, differentiable on $(a,b)$, and such that for every $t\in (a,b)$, we have $\|g'(t)\|\leq f'(t)$. Then, we have that $\|g(b)-g(a)\|\leq f(b)-f(a)$.

Here, the significant part is that we are not assuming anything further about $f'$ and $g'$, such as continuity (if we had continuity, then we could supply a simpler proof using integration). In fact we can weaken the assumptions by requiring $\|g'(t)\|\leq f'(t)$ to hold for all $t\in (a,b)\setminus C$, where $C$ is a countable set.
Anyway, the point of all of this is to show you that whenever one has estimates on the derivatives and one wishes to obtain information about the original function, then the mean-value theorem (in single-variable) or inequality (in several variables) is going to be crucial (especially when we do not have sufficient regularity to use integration).
