Constant derivative of a function implies is an affine map. I am trying to prove the next:
Let $f :\Omega\subset\mathbb{R}^n\rightarrow\mathbb{R}^m$ be differentiable, where $\Omega$ is an open
connected subset of $\mathbb{R}^n$. Suppose $D_{f}(x)$ is constant on $\Omega$, that is,$D_{f}(x) = T$
for all $x\in\Omega.$ Show that $f$ is the restriction to $\Omega$ of an affine transformation.
I was trying to prove that the set $A=\{x\in\Omega: f(x) = f(a) + T(x-a)\},$ where $a\in\Omega$ is fixed, is an open and closed subset of $\mathbb{R}^n,$ then for connected of $\Omega$ implies $\Omega = A$ and the proposition is true, but it seems quite hard to prove that; I was thinking about the definition of differentaiblity of $f$ in $a,$ however the best that we get of such definition is an inequality.
I saw a proof of this using gradient theorem but I do not know yet integration; this proposition appears in the section of differential calculus only, hence it must be possible prove it without integration.
Any kind of help is thanked in advanced.
 A: By considering $f-T$ we can reduce the proof to the case when $D_f(x)=0$ for all $x$. (In this case we prove that $f$ is a constant $c$. In general we get $f(x)=c+Tx$).
Let $x \in \Omega$ and consider a disk $B(x,r) $ contained in $\Omega$. Define $g$ on $[0,1]$ by $g(t)=f(tx+(1-t)y)$. Using Chain Rule show that $g'(t)=0$ for all $t$. It follows that $g$ is constant. Hence $f(x)=g(1)=g(0)=f(y)$. We have proved that each point of $\Omega$ has neighborhood in which $f$ is a constant. Now prove that for any fixed $x_0 \in \Omega$ $\{x \in \Omega: f(x)=f(x_0)\}$ is open and closed in $\Omega$ to finish the proof (using connectedness).
A: Hint
Proving that $A$ is open and closed is a good idea.
The fact that it is closed is trivial as $A$ is the inverse image of $\{0\}$ under the continuous map $g(x)=f(x)-f(a)-T(x-a)$. All linear maps are continuous in a finite dimensional space.
To prove that is is open, take $b \in A$ and prove that   $A$ contains a small open ball centered on $b$. For this use Mean Value Theorem on line segments.
