I read a problem a while ago which was to find a differential form on the circle which is not the differential of any function. Being a hapless physicist, this puzzled me for a while. I've found an answer in Spivak's Calculus on Manifolds, but I need a little help in following his reasoning. He argues that the form [tex]d\theta[/tex] is such a form, and shows that if it is the differential of a function [tex]f[/tex] then [tex]f = \theta + constant[/tex]. I am OK up to this point, but I fail to see how such an [tex]f[/tex] can't exist, like he argues.
The function [tex]f(\theta) = \theta[/tex] is not single-valued on the circle. Note that every closed form can be written as d of something locally; that is, over some finite region of the manifold. But only exact forms can be written as d of something globally. Here is an example on the circle of a form that is closed but not exact. Another example that you might look up is the Dirac monopole. It can be written as [itex]\vec B = \vec \nabla \times \vec A[/itex] over some region of space, but not globally. There is always a topological defect (the Dirac string) on which [itex]\vec A[/itex] is not defined.
dtheta is dual to the unit length tangent vector to the circle. It's integral over the circle is therefore the length of the circle. If if were the differential of a function then its integral over the circle would be zero. Spivak's argument is correct but you need to see that the integral of dx on a line segment is just the integral of the 1 form that is dual to the unit tangent vector to the segment. The angle function ,theta, is discontinuous and so does not have a derivative everywhere. Where it is continuous though, its differential equals dtheta.
[itex]\theta= 0[/itex] and [itex]\theta= 2\pi[/itex] refer to the same point on the circle. You cannot have a function that assigns, to the same point 0 and [itex]2\pi[/itex] (not to mention [itex]2n\pi[/itex] for every integer n.