Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Integral of divergence is zero in a compact manifold without boundary. Our manifold is not necessarily compact. Examples of such vector fields can be constructed in 1- dimensional case.
Thank you professor Brayant for your nice answer. I need such vector field to apply in space-time manifold. As you noticed this problem is not easy in dimensions greater than 1.