# Prove multi-dimensional Mean Value Theorem

I've been asked to prove multi-dimensional Mean Value Theorem. I'd be grateful if someone could give me feedback if it is okay.

Proof of Mean Value Theorem:

Let $f: [a,b]\rightarrow \mathbb{R}$ be a continuous on $[a,b]$ and differentiable on $(a,b)$. Consider the function:

$$g(x)=f(x)-f(a)-\frac{f(b)-f(a)}{b-a}(x-a) \mbox{.}$$

This function is continuous on $[a,b]$, differentiable on $(a,b)$ and $g(a)=g(b)$. Thus there is $c\in (a,b)$ such that $g'(c)=0$. But this means that there is $c\in (a,b)$ such that

$$f'(c)=\frac{f(b)-f(a)}{b-a}\mbox{.}$$

Proof of multi-dimensional Mean Value Theorem:

Let $f:U\rightarrow\mathbb{R}$ be a differentiable function ($U$ is an open subset of $\mathbb{R}^n)$. Let $\mathbf{a}$ and $\mathbf{b}$ be points in $U$ such that the entire line segment between them is contained in $U$. Define $h:[0,1]\rightarrow U$ in the following way:

$$h(t)=(a_1+(b_1-a_1)t,\ldots,a_n+(b_n-a_n)t) \mbox{.}$$

This function is differentiable on $(0,1)$ and continuous on $[0,1]$, so is $f \circ h$. If we apply Mean Value Theorem to $f\circ h$ we get

$$(f \circ h )'(c)=(f \circ h )(1)-(f \circ h )(0)$$

where $c\in (0,1)$ and

$$f '(h(c))(\mathbf{b}-\mathbf{a})=f(\mathbf{b})-f(\mathbf{a}) \mbox{.}$$

If we set $\zeta=h(c)$ we get

$$f '(\zeta)=\frac{f(\mathbf{b})-f(\mathbf{a})}{\mathbf{b}-\mathbf{a}} \mbox{.}$$

(Obviously $f '(\zeta)$ is a gradient vector.)

Everything is fine, except the last formula: You cannot divide by a vector. Leave it at $$f({\bf b})-f({\bf a})=\nabla f({\bf z})\cdot({\bf b}-{\bf a})$$ for some ${\bf z}\in[{\bf a},{\bf b}]$.