TITLE: If I'm given $\xi^b$, how do I calculate $\omega^{ab}$ given $\xi^b = \nabla_a \omega ^{ab}$?
QUESTION [6 upvotes]: I'm given a one-form, $\xi^b$. Then, I'm given a relation for a two-form, $\omega^{ab}$,  which says that
$$ \xi^b = \nabla_a \omega^{ab}$$
How do I calculate $\omega^{ab}$ given this relation?

REPLY [3 votes]: You can't "calculate" $\omega$ in terms of $\xi$. This is an underdetermined partial differential equation, and sometimes it has a solution and sometimes not; when it does have a solution, it often has an infinite-dimensional space of them.
Your equation can be written invariantly as $\delta\omega = \xi$, where $\delta$ is the codifferential. Since $\delta\circ\delta = 0$, a necessary condition for the existence of a solution, even locally, is $\delta\xi = 0$. 
If $\xi$ satisfies this compatibility condition, then there will be solutions, at least locally in a neighborhood of each point. But if $\omega_0$ is any solution at all, then $\omega_0 + \eta$ is also a solution whenever $\eta$ is any $2$-form satisfying $\delta\eta=0$. For example, in dimensions greater than $2$, you can take $\alpha$ to be any $3$-form at all, and take $\eta = \delta\alpha$. This gives an infinite-dimensional space of solutions to your problem. (In dimension $2$, the only possibilities for $\eta$ are locally constant multiples of the Riemannian volume form.)
If you're just interested in local solutions, then $\delta\xi=0$ is the only obstruction to the existence of solutions. 
Theorem. Suppose $\xi$ is a smooth $1$-form on a Riemannian manifold satisfying $\delta\xi=0$. Then in a neighborhood of each point, there is a smooth $2$-form $\omega$ such that $\delta\omega=-\xi$.
Proof: 
The equation we want to solve can be written in terms of the Hodge star operator as
$$
(-1)^{n+1} * d * \omega = - \xi,\tag{1}
$$ 
where $n$ is the dimension of the manifold. Since $d*\omega$ is an $(n-1)$-form, $\ast\ast(d\ast\omega) = (-1)^{n+1}d\ast\omega$, so $(1)$ is equivalent to
$$
d(*\omega) = -*\xi. \tag{2}
$$
The assumption $\delta\xi=0$ implies that $*\xi$ is closed, so $(2)$ has a solution in a neighborhood of each point by the Poincaré lemma.
$\square$
Most proofs of the Poincaré lemma give some sort of explicit formula that you might use to construct a local solution, at least in low dimensions.
If you want a global solution, the theory is most satisfactory on a compact smooth manifold (without boundary). In that case, one can prove the following.
Theorem. Suppose $(M,g)$ is a smooth compact Riemannian manifold and $\xi$ is a smooth  $1$-form on $M$.  Then there exists a smooth $2$-form $\omega$ satisfying $\delta\omega=-\xi$ if and only if $\delta\xi=0$ and $\int_M \langle \xi,\beta\rangle\,dV_g = 0$ for every harmonic $1$-form $\beta$.
I don't have a handy reference for the proof, but it's a fairly standard application of the Hodge theorem for de Rham cohomology.