On a manifold with local coordinates $(x_1, \ldots, x_n)$ I have a closed 1-form $\omega$ for which $d \omega = 0$ holds. This means There must be a function $f(x_1, \ldots x_n)$ for which $d f = \omega$.
My question is, how to calculate this function $f$, only given the coefficients of $\omega$.
Example $\omega = dx_1 + \sin(x_3)dx_2 + x_2 \cos(x_3)dx_3$.
Of course, this example is solvable by a sharp look, but I look for an algorithm.
(In fact I already have one but it seems to complicated.)
I believe you want to calculate $f$ locally. So take a chart whose image is a ball which contains $0$ and identify it with a neighborhood of $x\in M$ you have:
$f(x)=\int_0^t\omega_{tx}(x)dt$.