curl-free vector field on 3-torus Let $U$ be an open and simply-connected subset of $ \mathbb{R}^3$. Then for every curl-free vector field $v \: \colon U \to \mathbb{R}^3$ there is a potential $\phi \in C^{\infty}(U; \mathbb{R})$ such that $v = \nabla \phi$ in $U$. This well-known result is a consequence of Poincare's lemma stating that $H_{\textrm{dR}}^1(U) = 0$. Here, $H_{\textrm{dR}}^1(U)$ denotes the first de Rham cohomology group of $U$.
Let us now consider the 3-torus $T^3$ and a smooth curl-free vector field $v \: \colon T^3 \to \mathbb{R}^3$. Now, $T^3$ is neither simply connected nor is its first de Rham cohomology group $H_{\textrm{dR}}^1(T^3)$ trivial. In fact, $H_{\textrm{dR}}^1(T^3) = \mathbb{R}^3$. As I am not a geometer by training, excuse my (probably simple) question:

Is it true that there exist a potential $\phi \in C^{\infty}(T^3, \mathbb{R})$ and curl-free functions $u_1, u_2, u_3\: \colon T^3 \to \mathbb{R^3}$ such that $v = \nabla \phi + u_1 + u_2 + u_3$?
Moreover, if we additionally require that $\int_{T^3} v = 0$ does this imply that $v = \nabla \phi$ for some suitable function $\phi$?

 A: Your first question is trivial as written: just take $\phi = 0$, $u_1 = v$, $u_2=u_3=0$. Perhaps you meant for the $u_i$ to be independent of $v$? In this case it's almost true, but you need to allow arbitrary linear combinations of the $u_i$:

There are three curl-free, divergence-free vector fields $u_i$ on $\mathbb T^3$ such that for every curl-free vector field $v$ there is some potential $\phi$ and some coefficients $c_i \in \mathbb R$ such that $$v = \nabla \phi + c_1 u_1 + c_2 u_2 + c_3 u_3.$$

This is a special case of the Hodge decomposition for differential forms: the (Hodge dual of the) $u_i$ are a basis for the space of harmonic one-forms on $\mathbb T^3$, which in particular represent every de Rham cohomology class. If you're considering the usual flat torus $\mathbb T^3 = \mathbb R^3 / \mathbb Z^3$ then the standard unit vector fields work for $u_i$.
Your suggestion for eliminating the $u_i$ is not quite right - we instead require $\int_{\gamma_i} v = 0$ for $\gamma_i$ a basis of the first homology group. The intuition here is that each $u_i$ represents circulation around a "hole", so if we don't want any of these components we need to check that $v$ has zero circulation around each hole.
A: I think you had the following in mind: The three cycles
$$\sigma_i:\quad t\mapsto t e_i\qquad(0\leq t\leq1)$$
form a basis of $H^1(T^3)$. Compute the periods of $v$ along the $\sigma_i$, i.e., the numbers
$$\alpha_i:=\int_{\sigma_i}v\cdot dx\ .$$
Use these to define the constant field
$$u:=(\alpha_1,\alpha_2,\alpha_3)\ .$$
Then there is a potential $\phi:\>T^3\to{\mathbb R}$ such that
$$v=\nabla\phi + u\ .$$
