Second covariant derivative

In the math branches of differential geometry and vector calculus, the second covariant derivative, or the second order covariant derivative, of a vector field is the derivative of its derivative with respect to another two tangent vector fields.

Definition
Formally, given a (pseudo)-Riemannian manifold (M, g) associated with a vector bundle E → M, let ∇ denote the Levi-Civita connection given by the metric g, and denote by Γ(E) the space of the smooth sections of the total space E. Denote by T*M the cotangent bundle of M. Then the second covariant derivative can be defined as the composition of the two ∇s as follows:
 * $$\Gamma(E) \stackrel{\nabla}{\longrightarrow} \Gamma(T^*M \otimes E) \stackrel{\nabla}{\longrightarrow} \Gamma(T^*M \otimes T^*M \otimes E).$$

For example, given vector fields u, v, w, a second covariant derivative can be written as
 * $$(\nabla^2_{u,v} w)^a = u^c v^b \nabla_c \nabla_b w^a$$

by using abstract index notation. It is also straightforward to verify that
 * $$(\nabla_u \nabla_v w)^a = u^c \nabla_c v^b \nabla_b w^a = u^c v^b \nabla_c \nabla_b w^a + (u^c \nabla_c v^b) \nabla_b w^a = (\nabla^2_{u,v} w)^a + (\nabla_{\nabla_u v} w)^a.$$

Thus
 * $$\nabla^2_{u,v} w = \nabla_u \nabla_v w - \nabla_{\nabla_u v} w.$$

When the torsion tensor is zero, so that $$[u,v]= \nabla_uv-\nabla_vu$$, we  may use this fact to write Riemann curvature tensor as
 * $$R(u,v) w=\nabla^2_{u,v} w - \nabla^2_{v,u} w.$$

Similarly, one may also obtain the second covariant derivative of a function f as
 * $$\nabla^2_{u,v} f = u^c v^b \nabla_c \nabla_b f = \nabla_u \nabla_v f - \nabla_{\nabla_u v} f.$$

Again, for the torsion-free    Levi-Civita connection, and   for any vector fields u and v, when we  feed the function f into  both sides of
 * $$\nabla_u v - \nabla_v u = [u, v]$$

we find
 * $$(\nabla_u v - \nabla_v u)(f) = [u, v](f) = u(v(f)) - v(u(f)).$$.

This can be rewritten as
 * $$\nabla_{\nabla_u v} f - \nabla_{\nabla_v u} f = \nabla_u \nabla_v f - \nabla_v \nabla_u f,$$

so we have
 * $$\nabla^2_{u,v} f = \nabla^2_{v,u} f.$$

That is, the value of the second covariant derivative of a function is independent on the order of taking derivatives.