If I somehow know that a given 1-form $\omega$ on a contractible set $U$ on a manifold $M$ is exact (there exist a 0-form $f$ such that $\omega=\rm{d}f$), then I can find $f$ from the following coordinate-independent formula: $$ f(x) = \int_{x_0}^x \omega$$ where point $x_0$ and integration path can be arbitrarily chosen, as long as they are contained in $U$.
Let as assume that $\sigma$ is a exact 2-form on a contractible set $U$ on a manifold $M$. Is there an analogous coordinate-independent formula allowing to find its potential (the 1-form $\omega$ such that $\sigma=\rm{d}\omega$)? The only ones I've seen choose a specific coordinate system, or assume that $M=\mathbb{R}^3$.
Let $F\colon U\times [0,1]$ be a (smooth) contraction, so $F(x,1)=x$ for all $x$ and $F(x,0)=x_0$ (fixed). Let $t\in [0,1]$. The pullback $F^*\sigma$ has some $dt$ terms; we can contract against $\partial/\partial t$ (this gives a $1$-form with coefficients that are functions of $x$ and $t$). It can be checked that if we set $$\omega = \int_0^1 \big(\iota_{\partial/\partial t} \sigma\big)dt,$$ then $d\omega = \sigma$.