Vanishing eigenvalues of Jacobian Let $f: \mathbb{R^2}\to \mathbb{R^2}$ be a Schwartz  function. If the eigenvalues of $Df$ vanish everywhere, must $f$ be constant? Does an analogous result hold when we replace $2$ by $n$?
Any properties of $f$ would be of interest. For example, clearly $\nabla \cdot f = 0$.
 A: Actually, I made a sign mistake in my original calculation of $\det(Df)$, so my original argument was not right.  Sorry.  Here is (I hope and believe) a correct one.
In fact, when $n=2$, such an $f$ must be zero.  (If it's constant, it must be zero, as Peter noted.)  
As Peter pointed out, $f = (-u_y, u_x)$ for some function $u:\mathbb{R}^2\to\mathbb{R}$.  The condition that the eigenvalues of $Df$ vanish requires, in addition, that 
$$
\det(Df) = u_{xx}u_{yy}-u_{xy}^2=0,
$$
This implies that the graph $\bigl(x,y,u(x,y)\bigr)$ is a complete flat surface in $\mathbb{R}^3$ (i.e., its Gauss curvature vanishes).  In particular, by the classic theorem on complete flat surfaces, this graph is ruled by parallel straight lines.  The projection of this ruling onto the domain plane $\mathbb{R}^2$ then gives a ruling of the plane by parallel straight lines.  By a rotation, we can assume that the rulings project to the parallels to the $x$-axis.  The parallel ruling condition on the graph then implies that $u_x$ is a constant $a$ and so $u$ must be of the form $u(x,y) = ax + h(y)$ for some function $h$ and some constant $a$.  However, this gives $f = (-h'(y),a)$, and so the requirement that $f$ be Schwartz implies that $a = h'(y) = 0$, so $f$ is zero.
N.B.: Note that the condition of $f$ being Schwartz is not used until the very end, and, in fact, it is far stronger than necessary.  Obviously, it would be enough to know merely that $\|f(x,y)\|\rightarrow0$ as $\|(x,y)\|\rightarrow\infty$ in order to conclude that $f\equiv0$.
A: For some reason, the 'edit' button didn't appear for my earlier answer, maybe because it was already accepted.  Thus, I'm adding the general $n$ argument as a separate answer.
In fact, there is a stronger result:  Suppose that $f:\mathbb{R}^n\to\mathbb{R}^n$ is smooth and has the properties that (i) the Jacobian $Df(x)$ has no negative real eigenvalues for any $x\in \mathbb{R}^n$ and (ii) there exist $\epsilon>0$
and a constant $K$ such that
$$
\bigl| f(x)\bigr| \le \frac{K}{\bigl(1+|x|\bigr)^\epsilon}
\qquad \forall x\in\mathbb{R}^n.
$$
Then $f\equiv0$.
Here is the argument:  For $t\ge 0$, 
consider the smooth mapping $\Phi_t:\mathbb{R}^n\to\mathbb{R}^n$ defined by
$$
\Phi_t(x) = x + tf(x).
$$
Of course, $\Phi_0(x) = x$.  Moreover,
$$
\det(D\Phi_t(x)) = \det\bigl(I_n + t Df(x)\bigr) > 0
$$
by the hypothesis that $Df(x)$ has no negative real eigenvalues for any $x$.
Thus, $\Phi_t:\mathbb{R}^n\to\mathbb{R}^n$ 
is a local diffeomorphism for all $t$.  In particular, all values of $\Phi_t$ are regular values.  Moreover, when $|x|=R>0$, 
$$
 \bigl|\Phi_t(x)-x\bigr|  \le \frac{tK}{(1+R)^\epsilon},
$$
and, by taking $R$ very large, 
it follows easily that $\Phi_t$ must be surjective 
(since it barely moves the sphere $|x|=R$ for $R>>0$).  Then, 
by degree theory (and the fact that $\Phi_t$ is an orientation-preserving 
local diffeomorphism), it follows that $\Phi_t$ must be injective as well.  I.e., $\Phi_t$ is a diffeomorphism of $\mathbb{R}^n$ with itself for all $t\ge 0$.
Suppose now that $f$ were not identically zero.  By translation, I can assume,
without loss of generality, that $f(0)\not=0$, 
say $\bigl|f(0)\bigr| = M > 0$.   Now, choose an $R>>0$ satisfying
$$
\frac{K}{(1+R)^\epsilon} < M,
$$
which is possible because $\epsilon>0$, and then choose $t>>0$ so that
$$
t\left(M-\frac{K}{(1+R)^\epsilon}\right) > R.
$$
Then, for all $x\in\mathbb{R}^n$ with $|x|=R$,
$$
\left|\Phi_t(x)\right| =  \left|x + tf(x)\right|
\le R + \frac{tK}{(1+R)^\epsilon} < t M.
$$
In particular, $\Phi_t$ carries the sphere $|x|=R$ 
into the ball $|x|\le R'$ for some $R' \lt tM$. 
Thus, because $\Phi_t$ is a diffeomorphism of $\mathbb{R}^n$ with itself,
it must carry the ball $|x|\le R$ into the ball $|x| \le R'$. 
On the other hand, $\left|\Phi_t(0)\right| = \left|tf(0)\right| = tM > R'$,
and this is a contradiction.
