Given a basis of $T_pM (e_i)$. Extend this base to a local orthonormal frame $(E_i)$ with $\nabla E_i (p) = 0 $ I have been working this problem almost 3 days, I would appreciate any help or idea:
Let (M,h) be a Riemannian manifold. For every $ p \in M $ and $ (e_1 , ... , e_n)$ basis of $T_pM$. There exists an orthonormal frame in an neighborhood of p $(E_1, ... , E_n)$ , with $E_i (p) = e_i$ and $\nabla E_i (p) = 0 $
Hint: Fix an orthonormal frame $(\overline E_i)$ near p with $\overline E_i (p) = e_i$ and define $E_i = \alpha_i^j\overline E_i $ with $(\alpha_i^j(x))_{ij} \in SO(n)$ and $\alpha_i^j(p)= \delta_i^j$.
What I have got:
The construction of an orthonormal frame $(\overline E_i)$ near p with $\overline E_i (p) = e_i$. Follows from Gram-Schmidt process with no problem.
Defining $E_i= \sum_j \alpha_i^j\overline E_i$ the frame is still orthonormal, that follows from a direct calculation and the fact that  $(\alpha_i^j(x))_{ij} \in SO(n)$ and $\overline E_i (p) = e_i$ because $\alpha_i^j(p)= \delta_i^j$.
Since $h(E_i,E_j)= \delta_i^j$ then: $h(\nabla_X E_i, E_j) + h(E_i,\nabla_X E_j) = 0 $.
So all I have to see is that: 
$h(\nabla_X E_i, E_j) = h(E_i,\nabla_X E_j) $ 
Writing the above equation with the koszul formula and doing the calculations, Using the antisymmetry of Lie bracket and the fact that the inner product is commutative:
$h(\nabla_X E_i, E_j) - h(E_i,\nabla_X E_j) = -h([E_i,E_j],X) $ 
So all at have to see is that in p: $[E_i,E_j](p) = 0$
That the Lie bracket its 0 at p for the basis constructed in this way! I have been trying to justify this from lie bracket proprieties with no luck
 A: Choose a coordinate system $\varphi = (x^1, \dots, x^n)$ around $p$ with $p$ corresponding to $(0,\dots,0)$ and define the Christoffel symbols of the frame $\overline{E}_j$ with respect to the frame $\frac{\partial}{\partial x^i}$ by
$$ \nabla_i \overline{E}_j = \nabla_{\frac{\partial}{\partial x^i}} \overline{E}_j = \Gamma_{ij}^k \overline{E}_k $$
(summation convention is in place). We want to define a new frame $E_i = \alpha_i^j \overline{E}_j$ so that the following conditions hold:


*

*The frame $E_i$ is an orthonormal frame.

*$E_i(p) = \overline{E}_i(p)$.

*$(\nabla_i E_j)(p) = \left( \nabla_{\frac{\partial}{\partial x^i}} E_j \right)(p) = 0$ for all $1 \leq i, j \leq n$.


Let us write explicitly the conditions on the matrix $\alpha = (\alpha_i^j)_{i,j=1}^n$ must satisfy for each of the following conditions to hold:


*

*The matrix $\alpha(q) = (\alpha_i^j(q))_{i,j=1}^n$ must be an orthonormal matrix for each $q \in U$ (where $U$ is the relevant neighborhood of $p \in M$).

*$\alpha(p) = I_n$ (the identity matrix).

*We must have
$$ (\nabla_i E_j)(p) = (\nabla_i (\alpha_j^k \overline{E}_k))(p) = \left( \frac{\partial \alpha_{j}^k}{\partial x^i} \overline{E}_k + \alpha_j^k \Gamma_{ik}^l \overline{E}_l \right)(p)  = \\ \left( \frac{\partial \alpha_j^l}{\partial x^i}(p) + \alpha_j^k(p) \Gamma_{ik}^l(p) \right) \overline{E}_l(p) = 0$$
which implies that 
$$ \frac{\partial \alpha_j^l}{\partial x^i}(p) + \alpha_j^k(p) \Gamma_{ik}^l(p) = \frac{\partial \alpha_j^l}{\partial x^i}(p) + \delta_j^k \Gamma_{ik}^l(p) = \frac{\partial \alpha_j^l}{\partial x^i}(p) +  \Gamma_{ij}^l(p) = 0 $$
for $ 1 \leq i,j,l \leq n$. If we set $\Gamma_i = (\Gamma_{ij}^k)_{j,k=1}^n$, this can be written as
$$ \frac{\partial \alpha}{\partial x^i}(p) = -\Gamma_i(p) $$
for $1 \leq i \leq n$.


Note that the matrix $\Gamma_i := (\Gamma_{ij}^k)_{j,k=1}^n$ is anti-symmetric (since our connection is metric).  
If we set
$$ \alpha(\varphi^{-1}(x^1, \dots, x^n)) := e^{-x^i \Gamma_i(p)} $$
then since the exponential of an anti-symmetric matrix is orthogonal, we have $(1)$ and by direct calculation we also have $(2)$ and $(3)$.
A: Hint: The actual task is to show that you can choose the functions $\alpha^i_j$ in such a way that the conditions are satisfied, which mainly amounts to fixing the derivatives at $x$ without destroying the fact that the matrix $(\alpha^i_j)$ is orthogonal.
My preferred way to solve the problem would not be by choosing an orthonormal frame and then adapting via the $\alpha^i_j$ but rather use parallel transport to directly construct an appropriate frame.  
A: Here's a different approach (related to Andreas Cap's suggestion).
Take a normal neighbourhood $U$ of $p$. We define $E_i$ in the following way: for $q\in U$, let $v:=\exp_p^{-1}(q)$ and $\gamma_v$ be the geodesic such that $\gamma_v(0)=p$ and $\gamma_v'(0)=v$. Define $E_i(q)$ to be the parallel transport of $e_i$ through $\gamma_v$ from $t=0$ to $t=1$.
By definition of parallel transport, we have $E_i(p)=e_i$ and $(\nabla_{\gamma_v'(t)}E_i)(\gamma_v(t))=0$. In particular for $t=0$, $\nabla_vE_i(p)=0$ for any $v\in \exp_p^{-1}(U)$. Using the $\mathbb{R}$-linearity of $\nabla$, we may rescale $v$ to conclude $\nabla_X E_i(p)=0$ for any $X\in T_pM$.
Furthermore, if $\{e_1,...,e_n\}$ is orthonormal, we have $\langle E_i(q),E_j(q)\rangle=\langle e_i,e_j\rangle=\delta_{ij}$, since parallel transport preserves the inner product, so $\{E_1,...,E_n\}$ is orthonormal in $U$. 
*Obs.: Parallel transport involves solving an ODE. The smoothness of $E_i$ is guaranteed by the theorem of smooth dependence on the initial conditions.
