Accounting for signs in divergence thm. on Lorentzian manifold I am trying to learn about integration in Lorentzian manifolds (I will use signature -+++) and have some problems. Oft quoted (in books for GR) form of divergence theorem is:
$\int _U div( X )vol_M=\int _{\partial U}(N,X)vol_{\partial U}$
With remark that orientation on (nonnull) boundary should be chosen such that normal vector is pointing inside if it is timelike and outwards if it is spacelike. I don't understand that.
This is how I tried to do it (and got wrong results when confronted with made up example): choose $\omega = i_X vol _M$ and apply Stokes. We have:
$\int _U d\omega=\int _U di_XvolM=\int_Udiv(X)vol_M$
$\int _{\partial U} \omega =\int _{\partial U}(N,N)(N,X)i_Nvol_M=\int _{\partial U}(N,N)(N,X)vol_{\partial U}$
So I would think I can use equality of two integrals above no matter what orientation of boundary, as long as I make sure that basis $(N,Y_1,Y_2,Y_3)$ is positively oriented, where $Y_i$ make up the basis that I use on boundary. 
What am I doing wrong?
 A: The integral of $n$-forms is only defined on orientable manifolds and it depends (by a sign) on the choice of an orientation. A part of Stokes theorem (which is usually not spelled out in the formulation) is that one has to fix a convention for how an orientation on a manifold with boundary induces an orientation on the boundary. This involves the choice of a half-space of $\mathbb R^n$ - usually either the first or the last coordinate is assumed to be non-negative - and the choice of whether an invard or an ourtward pointing transverse vector extends a positively oriented basis for the hyperplane to a positively oriented basis for the full space. Depending on these choice you may get a factor $(-1)^n$ into Stokes' formula (you can find it in this form in some books). 
Now all that is independent of Riemannian or pseudo-Riemannian geometry. If you fix a pseudo-Riemannian metric on $M$, this on the one hand gives you a volume form on $M$. The crucial point is that this volume form involves the choice of an orientation for $M$ and it changes sign if you change the orientation. On the other hand, provided that the boundary is not null, you can take a normal along the boundary which has length $\pm 1$ and is uniquely fixed if you decide whether it is inward pointing or outward pointing. Then $i_N vol_M$ is the volume form for the induced pseudo-Riemannian metric on $\partial U$ with respect to one of the two possible orientations of $\partial U$. So the last equality in your computation of $\int_{\partial U}\omega$ is correct for one choice of $N$ and wrong by a sign for the other choice of $N$. 
What remains correct is that $\int_U div(X)vol_M=\int_{\partial U}(N,N)(N,X)i_N vol_M$. Now what you quote as the remark on the orientation of the boundary simply has the effect that you choose the orientation on $\partial U$ in such a way that $ (N,N)i_N vol_M=vol_{\partial U}$ holds in both cases for the normal vector you select in both cases.
