Consider the local representation of the Laplace Beltrami operator on a Riemannian n - dimensional manifold $(M,g)$: \begin{equation} \triangle_g = \frac{1}{\sqrt{\text{det}(g)}} \sum^n_{i,j = 1} \frac{\partial}{\partial x^i} g^{ij} \sqrt{\text{det}(g)}\frac{\partial}{\partial x^j} \end{equation}
Some time ago I read in some textbook that one can, locally at any point $p \in M$, choose a small enough neigborhood $U \subset M$ so that by a linear transformation of the coordinates the matrix representation of $g$ in $U$ is $g_{ij} = \delta_{ij}$.
But wouldn't this imply that the above expression always simplifies to the expression \begin{equation} \triangle_g = \sum^n_{i = 1} \frac{\partial^2}{\partial (x^i)^2} \quad ? \end{equation}
Alternatively I would think that even though the metric evaluates to the Kronecker delta that doesn't mean that its derivatives are zero. So do we actually then have
\begin{equation} \triangle_g = \sum^n_{j = 1} \frac{\partial^2}{\partial (x^j)^2} + \sum_{j = 1}^n ( \frac{\partial}{\partial x^j} \sqrt{\text{det}(g)} + \sum_{i = 1}^n \frac{\partial}{\partial x^i} g^{ij})\frac{\partial}{\partial x^j} \end{equation}
I am sure at least one my impression is false, if anybody could help pointing out what I got wrong, or refer to a reference where I could read about diagonalization of metrics that would be so helpful, many thanks !