Is the space of volume-preserving maps path-connected? This is a clarification of another post of mine.
Fix $n$ a positive integer.  Let $SL(n)$ have its usual matrix representation, so that it really is the codimension-one subset of $M(n) = \mathbb R^{n^2}$ cut out by the degree-$n$ condition that the determinant is $1$.  So we have $n^2$ coordinate functions $A^i_j$ on $SL(n)$, $i,j = 1,\dots,n$.
Let $U$ be a domain in $\mathbb R^n$, with coordinates $x_1,\dots,x_n$.  Consider the set $\mathcal S$ of smooth functions $f: U \to SL(n)$ satisfying the differential equation $\frac{\partial f^i_j}{\partial x^k} = \frac{\partial f^i_k}{\partial x^j}$ for each $i,j,k = 1,\dots,n$ (of course, $f^i_j = A^i_j \circ f$ is the $(i,j)$th coordinate of $f$).
(Why would you care about $\mathcal S$?  Because a smooth map $g: U \to \mathbb R^n$ is volume-preserving if and only if $\frac{\partial g^i}{\partial x^j} \in \mathcal S$, and every element of $\mathcal S$ arises this way; indeed, $\mathcal S$ is the space of volume-preserving maps up to translations.)
Let's agree that a smooth path in $\mathcal S$ is a smooth function $F: [0,1] \times U \to SL(n)$ such that for each $t\in [0,1]$, $F(t,-) \in \mathcal S$.
Question:  Is $\mathcal S$ smooth-path-connected?  I.e. given $f_0, f_1 \in \mathcal S$, does there exist a smooth path $F$ so that $F(0,-) = f_0$ and $F(1,-) = f_1$?
If the answer is "no" in general, is it "yes" for sufficiently nice domains $U$ (contractible, say, or with compact closure and require that each $f\in \mathcal S$ extend smoothly to a neighborhood of the closure, or...)?
 A: I'd like to point out a special case where there's a particularly appealing answer -- a variant of the Alexander trick. 
Consider the space of smooth volume-preserving immersions (or embeddings) $f : D^n \to \mathbb R^n$.  $D^n$ is the unit compact disc in $\mathbb R^n$. 
This space deformation-retracts to the subspace where $f(0)=0$. So we restrict to that subspace for brevity of notation. 
Given $t \in (0,1]$ define
$$F_t : D^n \to \mathbb R^n$$
by $F_t(x) = \frac{1}{t}f(tx)$ and define $F_0(x) = Df_0(x)$. 
Provided $f$ is $C^1$, this makes $F : [0,1] \times D^n \to \mathbb R^n$ continuous. 
And $F_t$ is volume preserving for all $t$ by the chain rule -- even better $D(F_t)_p = (Df)`_`{tp}$ 
for all $p \in D^n$. Moreover, if $f$ is an embedding, $F_t$ remains an embedding for all $t$. 
Since $F_1 = f$ and $F_0 \in SL_n\mathbb R$, and $SL_n\mathbb R$ is connected, we're done. 
A: Your other question is answered by the famous paper of Moser in which he shows that a volume form on a smooth manifold is equivalent to a volume-preserving pseudogroup structure.  For this question, first, certain spaces of diffeomorphisms are not contractible when you might expect them to be.  This is closely related to Milnor's discovery of exotic smooth structures on spheres (and later other manifolds).  For instance, the group of diffeomorphisms of $\mathbb{R}^6$ that do nothing outside of a bounded region has 28 components with a $\mathbb{Z}/28$ group structure.  In this case it is the same group as the group of smooth 7-spheres.  (In $n\ge 5$ to $n+1$ dimensions, there is always an easy-to-construct group homomorphism here, but I am hazy on when it is an isomorphism.)
The right question is whether the inclusion of well-behaved volume-preserving diffeomorphisms is a homotopy equivalence with the well-behaved diffeomorphisms.  For simplicity let's take a closed manifold $M$ such as a sphere.  Then I'm fairly sure that the Moser trick does everything, that it's a deformation retraction from $\text{Diff}(M)$ to $\text{Vol-Diff}(M)$.
The Moser trick converts an infinitesimal variation in a volume form $\mu$ to a vector field flow that infinitesimally causes that variation.  It uses some fixed reference Riemannian metric on $M$ — the specific retraction depends on that metric.  Anyway, if $f$ is a diffeomorphism of $M$ and $\mu$ is a distinguished volume form, then there is first a canonical path from $f_*(\mu)$ back to $\mu$:  The ratio is a positive function $g(x)$ and the path is $g(x)^t\mu$.  The corresponding Moser flow repairs $f$ and is the deformation retraction.
A: The answer is yes, on a contractible domain $U$.  Suppose that $f^i_j$ satisfies $\partial_k f^i_j = \partial_j f^i_k = g^i_{jk}$.  Then $g$ satisfies $g^i_{jk} = g^i_{kj}$ and $g^i_{ik} = 0$.  Conversely, if $g^i_{jk} = g^i_{kj}$ and $g^i_{ik} = 0$, then since $U$ is contractible, there exists $f^i_j$ with $\partial_kf^i_j = g^i_{jk}$.  Indeed, pick a basepoint $u \in U$; then $f$ is determined by $g$ and $f(u)$.
However, the conditions on $g$ are linear.  Let $f_1,f_2$ be two matrix-valued functions with $\partial_k{f_1}^i_j = \partial_j{f_1}^i_k$ and $\partial_k{f_2}^i_j = \partial_j{f_2}^i_k$.  Then set ${g_a}^i_{jk} = \partial_k{f_a}^i_j$ for $a=1,2$.  Introduce a time variable $t$, and let $G^i_{jk}(t) = (1-t){g_1}^i_{jk} + t{g_2}^i_{jk}$.  Then for each $t$, $G(t)$ satisfies the integrability conditions that $g$ did in the previous paragraph.  For the basepoint $u\in U$, let $F(u,t)^i_j$ be any smooth path connecting the values $F(u,0) = f_1(u)$, $F(u,1) = f_2(u)$.  Then we can find extend $F(u,-)$ to $F(-,-)$ satisfying $\partial_k F(t)^i_j = G(t)^i_{jk}$.  And this does the job.
