Coordinate transformation to system with vanishing metric tensor Let $u,v,a \in \{1,2,3,4\} $
so $x^1,x^2,x^3,x^4$ are components of the coordinate system $x$
similarly $x^{'1},x^{'2},x^{'3},x^{'4}$ are components of the coordinate system $x^{'}$
In a Pseudo Riemann manifold $(M,g)$ , consider the following coordinate transformation from $x$  to $x^{'}$ 
$x^{'u}=P_{u \alpha}x^{\alpha}+b^{u}_{\alpha \beta}x^{\alpha}x^{\beta}$   where Einstein notation for summation has been used.
Given a metric tensor $g_{uv}$ in the coordinate system $x$ . How can we choose $P_{u \alpha},b^{u}_{\alpha \beta}$  such that $\frac{\partial g^{'}_{uv}}{\partial x^{'a}}=0 $ , and $g^{'}_{uv}$ diagonal at a point $p$ . Where $g^{'}_{uv}$ is the metric tensor in coordinate system $x'$
Comment: I know it is true that $g_{uv}^{'}=\frac{\partial x^a}{\partial x^{'u}}\frac{\partial x^b}{\partial x^{'v}}g_{ab}$
 A: I was only able to show that for $ p=0$ by defining $b^{u}_{i j}=\frac{1}{2}P_{uc} \Gamma^c _{i j}|_{x=0}$  where is $\Gamma^c _{i j}$ isthe Christoffel symbol of the second kind.
Let $x=\{x^1,x^2,x^3,x^4\}$
equation 1 :   $x^{'u}=P_{u \alpha}x^{\alpha}+b^{u}_{\alpha \beta}x^{\alpha}x^{\beta}$
$ P_{u i}=\frac {\partial x^{`u}}{\partial x^{i}}|_{x=0}$
$b^{u}_{i j} =\frac {\partial^2 x^{`u}}{\partial x^{i} \partial x^{j}}|_{x=0}$
The matrix $P$ formed from components $P_{u \alpha}$. $P$ is an invertible matrix with inverse $P^{-1}=A$ such that $\sum_j \sum_kg_{jk}|_{x=0}A_{ij}A_{nk}=C_i\delta_i^n$.This can be done by taking a non singular $ 4 \times 4$ matrix $T$  and the rows of $T$ interpreted as vectors, adding a multiple of one row to another(this doesnt change $|det(T)|$) ensuring that $\sum_j \sum_kg_{jk}|_{x=0}T_{ij}T_{ik} \neq 0$  and using Gram Schmidt orthogonalization process to obtain $A$.Re labeling $A_{ij}$ as $A_i^j$ we can write inner product $<A_i^j,A_n^k>=g_{jk}|_{x=0}A_i^jA_n^k=C_i\delta_i^n$  .The mapping $x^u \to x^{'u}$ is invertible in the neighborhood of $x=0$ and according to inverse function theorem has continuous partial derivatives.
Taking the partial derivative  $\frac {\partial^2 }{\partial x^{'i} \partial x^{'j}}|_{x=0}$ of both sides of equation 1 at $x=0$:
$P_{u\alpha}\frac {\partial^2 x^{\alpha}}{\partial x^{'i} \partial x^{'j}}|_{x=0}=-2b^{u}_{nk}\frac {\partial x^{n}}{\partial x^{'i}}\frac {\partial x^{k}}{\partial x^{'j}}|_{x=0}=-P_{uc}\Gamma^c _{n k}\frac {\partial x^{n}}{\partial x^{'i}}\frac {\partial x^{k}}{\partial x^{'j}}|_{x=0}$
Note $\sum_uA_{bu}P_{uc}=\delta_b^c$
This implies :$ \frac {\partial^2 x^{b}}{\partial x^{'i} \partial x^{'j}}|_{x=0}=-\sum_uA_{bu}P_{uc}\Gamma^c _{n k}\frac {\partial x^{n}}{\partial x^{'i}}\frac {\partial x^{k}}{\partial x^{'j}}|_{x=0}=-\Gamma^b _{n k}\frac {\partial x^{n}}{\partial x^{'i}}\frac {\partial x^{k}}{\partial x^{'j}}|_{x=0}$
Now the Christoffel symbol transforms as:
$ \Gamma^{'u}_{\nu\kappa} = {\partial  x^{'u} \over \partial x^\alpha} \left [ \Gamma^\alpha_{\beta \gamma}{\partial x^\beta \over \partial  x^{'\nu}}{\partial x^\gamma \over \partial  x^{'\kappa}} + {\partial ^2 x^\alpha \over \partial  x^{'\nu} \partial  x^{'\kappa}} \right ]$
$ \Gamma^{'u}_{\nu\kappa} = {\partial  x^{'u} \over \partial x^\alpha} \left [ \Gamma^\alpha_{\beta \gamma}{\partial x^\beta \over \partial  x^{'\nu}}{\partial x^\gamma \over \partial  x^{'\kappa}}|_{x=0}  + {\partial ^2 x^\alpha \over \partial  x^{'\nu} \partial  x^{'\kappa}}|_{x=0}  \right ]=0$
since covariant derivative of $g'_{uv}$ is $0$, this implies $\frac {\partial g'_{uv}}{\partial x^{'i}}|_{x=0}=0$
Also $g_{uv}$ transforms as :
$g_{uv}^{'}=\frac {\partial x^i}{\partial x^{'u}}\frac {\partial x^j}{\partial x^{'v}}g_{ij}$
$g_{uv}^{'}=A_u^iA_v^jg_{ij}|_{x=0}$
$g_{uv}^{'}|_{x=0}=<A_u^i,A_v^j>=C_{u}\delta_u^v$  implying that $g_{uv}^{'}|_{x=0}$ is diagonal
