Action in curved space I am reading Carroll's book on GR and am confused about the generalization of the action principle to curved space. Please refer to the snippet from the book below.
After writing equation 4.47, we realize that since $d^nx$ is a tensor density, it must be multiplied by $\sqrt{-g}$ so that it transforms properly.
But the book redefines $L$ (which we know to be a scalar) as some $\sqrt{-g}  \ \hat{L}$ and calls $\hat{L}$ the scalar instead.  
So I am confused about two things: why is  $\hat{L}$ the scalar and where did the $\sqrt{-g}$ contribution from  $d^nx$  go?

 A: Carroll define $\mathcal{L}$ to be quantity that appears as the integrand in the action integral 
$$ S = \int \mathcal{L}\;d^nx $$,
In order for this integral to make sense $\mathcal{L}\;d^nx$ has to be a (pseudo)scalar (or more to the point an $n$-form), a totally anti-symmetric rank $n$ tensor). Since as you know $d^nx$ is not a tensor, but a tensor density, $\mathcal{L}$ also cannot be a tensor. From the previous discussion about $d^nx$, we know that to make $d^nx$ into an $n$-form it needs to be multiplied with $\sqrt{-g}$. Consequently, it follows that in order for $\mathcal{L}\;d^nx$ to be an  $n$-form, $\mathcal{L}$ must be of the particular form
$$ \mathcal{L} = \sqrt{-g}  \hat{\mathcal{L}} $$
where $\hat{\mathcal{L}}$ is a scalar field.
This answers the first part of your question: "Why is  $\hat{\mathcal{L}}$ a scalar?" 
No lets move on to the second part: "Where did the $\sqrt{-g}$ contribution from $d^nx$ go?" The factor $\sqrt{-g}$ from the volume form was absorbed into the Lagrangian density $\mathcal{L}$. It might help to realize that action integral can also be written
$$ S= \int \hat{\mathcal{L}} \sqrt{-g}\, d^nx,$$
which may be the form you would have expected.
This leaves the implicit question that you did not ask: "Why is $\mathcal{L}$ the Lagrangian density and not $\hat{\mathcal{L}}$?" The short answer is: Because this the quantity that will show up in your Euler-Lagrange equations for obtaining the equations of motion.   
