Mean value theorem in higher dimension 
Let $U$ be an open set of $\mathbb{R}^n$ en $f:U\rightarrow\mathbb{R}$
  be differentiable. Let $a, b\in U$ and suppose that
  $L(a,b):=\{a+t(b-a)|t\in[0,1]\}$ lies in $U$. We define
  $g(t):=f(a+t(b-a))$.

I need to show that there is a $t\in (0,1)$ such that $g(1)-g(0)=g'(t)$. Also, I need to show that \begin{equation}f(b)-f(a)=\langle \textrm{grad}\ f(a+t(b-a)),b-a\rangle\end{equation} and that \begin{equation}|f(b)-f(a)|\leqslant ||\textrm{grad}\ f(a+t(b-a))||\ ||b-a||.\end{equation}
I saw that $g$ is differentiable, because $f$ is. So we can apply the mean value theorem on $[0,1]$. So there exists a $t\in [0,1]$ such that $g(1)-g(0)=f(b)-f(a)=g'(t)$. But I don't see how this will help me. Also, I don't quite understand what $\textrm{grad}\ f(a+t(b-a))$ is. 
 A: I assume that you would like to prove the existence of a $t_0 \in [0,1]$ such that
\begin{equation}
\lvert f(b) - f(a) \rvert \leq \big\lvert \nabla f\big(a+t_0(b-a)\big) \big\lvert  \cdot \lvert b-a \lvert \, .\quad (1)
\end{equation}
To prove $(1)$ you already defined an auxiliary function $g \colon [0,1] \to \mathbb{R}$ as $g(t) := f(a + t(b-a))$. As $f$ and the function $h \colon [0,1] \to U$, $h(t):= a+ t (b-a)$ are differentiable so is $g = f \circ h$ in $(0,1)$. The derivative of $g$ can we compute via the chain rule, 
\begin{equation}
g^{\prime}(t) = \big\langle\nabla f(h(t)), h^{\prime}(t) \big\rangle = \big\langle f \big( a+ t (b-a) \big), b-a \big\rangle \, . \quad (2) 
\end{equation} 
Ok, where to go from here? Well, you already had the right idea. The function $g$ is continuous on $[0,1]$ and differentiable in $(0,1)$ and hence, by the one-dimensional mean value theorem, there is a $t_0 \in [0,1]$ such that 
\begin{equation}
g(1) - g(0) = g^{\prime}(t_0)\, . \quad (3)
\end{equation}
But, by definition of $g$, we have that $f(b) - f(a) = g(1) - g(0)$. Let us now put things together: 
\begin{equation}
 f(b) - f(a) = g(1) - g(0) \stackrel{(3)}{=} g^{\prime}(t_0) \stackrel{(2)}{=}  \big\langle f \big( a+ t_0 (b-a) \big), b-a \big\rangle \, .
\end{equation}
Equation $(1)$ follows by applying the Cauchy-Schwarz inequality.
