Here's a practice prelims problem from my university:
(a) Consider the $1$-form $\alpha = \sin^2 \varphi d\varphi$ on $S^1$ ($0 \leq \varphi \leq 2\pi$). Compute $\int_{S_1}\alpha$.
(b) Prove that there does not exist a smooth function $g: S^1 \to \mathbb R$ s.t. $\alpha = dg$
(c) Prove that there exists $k \in \mathbb R$ and a smooth function $g: S^1 \to \mathbb R$ s.t. $\alpha - k d\varphi = dg$. Find all possible $k$ and $g$ with this property.
Parts (a) and (b) are easy. (b) just uses a proof by contradiction using the fundamental theorem of calculus. However, I don't know how to solve part (c): Is there a standard method for this?
$$\sin^2\varphi=\frac{1-\cos(2\varphi)}2$$ hence a solution is $$k=\frac12,\;g(\varphi)=-\frac14\sin(2\varphi).$$ It is unique (up to additive constants for $g$) because if $(c,h)$ is the difference of two solutions then $-cd\varphi=dh,$ hence $c=0$ and $h=$constant.