Let $E\subseteq\mathbb{R}^n$ an open connected set and let $f:E\rightarrow \mathbb{R}$ a $k+1$ times differentiable function such that $D^kf=0$. Show that $f$ is a polynomial in $x_1,...,x_n$ at a degree of at most $k$.
For any $\pi\in\{1,...,n\}^n$ we're given that $\frac{\partial^{k+1}f}{\partial x_{\pi (1)}...\partial x_{\pi (k+1)}}=0$. Thus $\frac{\partial^{k}f}{\partial x_{\pi (1)}...\partial x_{\pi(k)}}=c_k$ and by induction $f=\partial^0 f=x_{\pi(1)}(x_{\pi(2)}(...(x_{\pi(k)}c_k+c_{k-1})...)+c_1)+c_0$ for some $c_i\in\mathbb{R}, \forall 1\leq i \leq n$. I feel that this proof doesn't hold but I don't know where is the mistake and what is the right way. Thanks
Another alternative proof (which I guess is worng as well because I don't use the fact that $E$ is open and connected):
From Taylor's formula we know that $$ \\ f(x_1,...,x_n)=\sum_{i_1=1}^\infty ...\sum_{i_n=1}^\infty \frac{(x_1-a_1)^{i_1}\cdot...\cdot(x_n-a_n)^{i_n}}{i_1!\cdot...\cdot i_n!}\cdot\frac{\partial ^{i_1+...+i_n}f}{\partial x_1^{i_1}...\partial x_n^{i_n}}(a_1,...,a_n) \ $$ Let $0\leq i_1,...,i_n\leq k$. If $\sum_{j=1}^n i_j>k$ then $\frac{\partial ^{i_1+...+i_n}f}{\partial x_1^{i_1}...\partial x_n^{i_n}}(a)=0$. Otherwise, $\frac{(x_1-a_1)^{i_1}\cdot...\cdot(x_n-a_n)^{i_n}}{i_1!\cdot...\cdot i_n!}$ is polynom of a degree at most $k$, and $\frac{\partial ^{i_1+...+i_n}f}{\partial x_1^{i_1}...\partial x_n^{i_n}}(a_1,...,a_n)$ is a constant linear tranformation. Thus $f(x_1,...,x_n)$ is a polynom of degree at most $k$.