Why $\Delta f-|\nabla f|^2 =0$ ,$f$ is a function on compact manifold. There is a explain in the below picture ,but I don't know how to compute the 1.1.17. And how to compute the integrate of 1.1.16 ?

 A: For (1.1.17), the first equality follows from Stokes's Theorem or integration by parts. In general, when $M$ is a compact manifold with boundary $\partial M$, then 
$$\tag{1}\int_M\Delta F dV=\int_{\partial M}\frac{\partial F}{\partial\nu}dA$$
where $\displaystyle\frac{\partial F}{\partial\nu}$ is the normal derivative. 
For a compact manifold $M$ without boundary, i.e. $\partial M$ is empty, the right hand side of $(1)$ is zero. This gives you the equality in (1.1.17). 
For the second equality in (1.1.17), it is nothing but chain rule and product rule in differentiation. For the usual Laplacian, we have 
$$\tag{2}\Delta(e^{-f})=\sum_{i}\frac{\partial^2}{\partial x_i^2}(e^{-f})=-\sum_{i}\frac{\partial}{\partial x_i}(e^{-f}\frac{\partial f}{\partial x_i})=
-\sum_{i}\left[e^{-f}\frac{\partial^2 f}{\partial x_i^2}-e^{-f}(\frac{\partial f}{\partial x_i})^2\right]=e^{-f}(-\Delta f-|\nabla f|^2).$$  But $(2)$ is still true on a Riemannian manifold, since we can compute the Laplacian of a function in normal coordinates at a  point. 
Therefore, this, gives the second equality in (1.1.17). 
