Local inertial frames, and locally flat geometry, taylor expanding metric coefficients In general relativity, if there is a line element of the form $$ds^2 = [f(u, v)]du^2 + [h(u, v)]dvdu + [w(u, v)]dv^2$$ which I believe corresponds to metric coefficients $$g_{00} = f(u, v)$$ $$g_{01} = \frac{1}{2}h(u, v)$$ $$g_{10} = \frac{1}{2}h(u, v)$$ $$g_{11} = w(u, v)$$  Does one have to 'guess' a coordinate transformation which diagonalizes this matrix and then rescale it to a Minkowski metric to show we are in a locally flat spacetime, around a given point $P$? Is there not a more systematic way than just guessing a transformation? Is it necessary to work through and find the eigenvalues and eigenvectors?
I have also seen some answers which refer to Taylor-expanding the metric around a given point $P$ w.r.t some coordinate transformation such as $$g_{ij} = g_{ij}(P) + \frac{\partial g_{ij}(P)}{\partial x^k} + \frac{1}{2}\frac{\partial \partial g_{ij}}{\partial x^l \partial x^k} + ...$$ where I'm assuming $x^k$ is another coordinate, but again this seems to require guessing the correct transformation and hoping for the best, which seems like it could take a long time if you have nasty functions in your metric.
Does the Taylor expansion need to be with respect to another coordinate by using some transformation or do we just expand each component in the metric around a given point?
 A: You need to find coordinates, for which metric is diagonal up to $o(x'^2).$ So using taylor expansion:
$$g'_{ij} = g'_{ij}(x'_0) +  \left.\frac{\partial g'_{ij}(x')}{\partial x'^k}\right|_{x'_0}x'^k + \left.\frac{1}{2}\frac{\partial^2 g'_{ij}(x')}{\partial x'^l \partial x'^k}\right|_{x'_0}x'^lx'^k + ...$$ you want:
$$g'_{ij}(x'_0)=\eta_{ij}$$
$$\left.\frac{\partial g'_{ij}(x')}{\partial x'^k}\right|_{x'_0}=0$$
Under coordinate transformation, the metric transforms like this
$$g'_{ij}=\frac{\partial x'^i}{\partial x^k}\frac{\partial x'^j}{\partial x^l} g_{kl},$$
so our conditions wrt original coordiantes are:
$$\frac{\partial x'^i}{\partial x^k}\frac{\partial x'^j}{\partial x^l} g_{kl}(x_0)=\eta_{ij}$$
$$0=\left.\frac{\partial }{\partial x'^m}\left(\frac{\partial x'^i}{\partial x^k}\frac{\partial x'^j}{\partial x^l} g_{kl}\right)\right|_{x'_0}=\left.\frac{\partial x^h}{\partial x'^m}\frac{\partial }{\partial x^h}\left(\frac{\partial x'^i}{\partial x^k}\frac{\partial x'^j}{\partial x^l} g_{kl}\right)\right|_{x'_0}$$
You can also expand coordinate transformation $x'^k(x)$ with taylor series. The first condition are then (quadratic) equations for the coefficients in second (linear) order terms of the expansion  of coordinate transformation (the constant terms are arbitrary - they only tell you the location of origin of coordinate system). The second condition are (cubic) equations for coefficients in third (quadratic) and second (linear) order terms in coordinate transformation. The remaining, higher order coefficients might be chosen arbitrary and it will keep the metric in manifestly locally flat form.
All this means, that you can seek the new coordinates in the form
$$u'=au+bv+cuv+du^2+ev^2$$
$$v'=fu+gv+huv+iu^2+jv^2$$
getting bunch of cubic equations for unknown coefficients {a,..,j}.
A: your line element is:
$$ds^2=f \left( u,v \right) {{\it du}}^{2}+h \left( u,v \right) {\it dv}\,{
\it du}+w \left( u,v \right) {{\it dv}}^{2}\tag 1
$$
this give you the metric:
$$G=\left[ \begin {array}{cc} f \left( u,v \right) &\frac 12\,h \left( u,v
 \right) \\ \frac 12\,h \left( u,v \right) &w \left( u,v
 \right) \end {array} \right] 
$$
we are looking for the transformation matrix  $~\boldsymbol J~$ with the result that
$$ \boldsymbol J^T\,G\,\boldsymbol J=\boldsymbol I_2$$
how to obtain this transformation matrix:
Step I
completing the square out of the line element Eq. (1)
$\Rightarrow$
$$ds^2\mapsto  f \left( u,v \right)  \left( {\it du}+1/2\,{\frac {h \left( u,v
 \right) {\it dv}}{f \left( u,v \right) }} \right) ^{2}
+\left( w \left( u,v \right) -1/4\,{\frac { \left( h \left( u,v
 \right)  \right) ^{2}}{f \left( u,v \right) }} \right) {{\it dv}}^{2}
\tag 2$$
Step II
from Eq. (2) you get two equations:
$$\boldsymbol E_q=\left[ \begin {array}{c} \sqrt {f \left( u,v \right) } \left( {\it du
}+1/2\,{\frac {h \left( u,v \right) {\it dv}}{f \left( u,v \right) }}
 \right)  \\ \frac 12\,\sqrt {4\,w \left( u,v
 \right) -{\frac { \left( h \left( u,v \right)  \right) ^{2}}{f
 \left( u,v \right) }}}{\it dv} \end {array} \right] 
=\begin{bmatrix}
   d\xi\\
   d\eta\\
\end{bmatrix}$$
where $~d\xi\,,d\eta~$ are the Minkowski coordinates
solve those equations for the
$$du=du(d\xi\,,d\eta)~,dv=dv(d\xi\,,d\eta)~$$
Step III
obtain the Jacobi-Matrix $$~\boldsymbol J=\frac{\partial \boldsymbol R}{\partial \boldsymbol q}~$$
where :
$$\boldsymbol R=\begin{bmatrix}
   du(d\xi\,,d\eta)\\
   dv(d\xi\,,d\eta)\\
\end{bmatrix}$$
and
$$\boldsymbol q=\begin{bmatrix}
   d\xi\\
   d\eta\\
\end{bmatrix}$$
$$J= \left[ \begin {array}{cc} {\frac {1}{\sqrt {f \left( u,v \right) }}}&
-h \left( u,v \right)  \left( f \left( u,v \right)  \right) ^{-1}{
\frac {1}{\sqrt {{\frac {4\,w \left( u,v \right) f \left( u,v \right) 
- \left( h \left( u,v \right)  \right) ^{2}}{f \left( u,v \right) }}}}
}\\ 0&2\,{\frac {1}{\sqrt {{\frac {4\,w \left( u,v
 \right) f \left( u,v \right) - \left( h \left( u,v \right)  \right) ^
{2}}{f \left( u,v \right) }}}}}\end {array} \right] 
$$
$$\begin{bmatrix}
   du\\
   dv\\
\end{bmatrix}=\boldsymbol J\,\begin{bmatrix}
   d\xi\\
   d\eta\\
\end{bmatrix}$$
the  transformed line element is :
$$ds^2\mapsto d\xi^2+d\eta^2$$
