A smooth function f satisfies $\left|\operatorname{ grad}\ f \right|=1$ ,then the integral curves of $\operatorname{grad}\ f$ are geodesics $M$ is riemannian manifold, if a smooth function $f$ satisfies $\left| \operatorname{grad}\ f \right|=1,$ then prove the integral curves of $\operatorname{grad}\ f$ are geodesics.

Well $\text{grad}(f)$ is a vector such that $g(\text{grad}(f),-)=df$, therefore  integral curves satisfy
$$
\gamma'=\text{grad}(f)\Rightarrow
g(\gamma',X)=df(X)=X(f)
$$
Now let $X,Y$ be a vector fields
$$
XYf=Xg(\text{grad}(f),Y)=
g(\nabla_X\text{grad}(f),Y)+g(\text{grad}(f),\nabla_XY)=
g(\nabla_X\text{grad}(f),Y)+\nabla_XY(f)
$$
and
$$
YXf=Yg(\text{grad}(f),X)=
g(\nabla_Y\text{grad}(f),X)+g(\text{grad}(f),\nabla_YX)=
g(\nabla_Y\text{grad}(f),X)+\nabla_YX(f)
$$
which gives after subtraction and vanishing torsion
$$
[X,Y]f-\nabla_XY(f)+\nabla_YX(f)=0=g(\nabla_X\text{grad}(f),Y)-g(\nabla_Y\text{grad}(f),X)
$$
It follows that
$$
g(\nabla_X\text{grad}(f),Y)=g(\nabla_Y\text{grad}(f),X)
$$
Now the easy part, substitute $X=\text{grad}(f)$ and conclude that for every $Y$
$$
g(\nabla_{\text{grad}(f)}\text{grad}(f),Y)=g(\nabla_Y\text{grad}(f),\text{grad}(f))=0
$$
The last one because $g(\text{grad}(f),\text{grad}(f))=1$ is constant, so
$$
0=Yg(\text{grad}(f),\text{grad}(f))=2g(\nabla_Y\text{grad}(f),\text{grad}(f))
$$
