I was working on problem 10.6 of the book "Problem Book in Relativity and Gravitation by A. Lightman, R. H. Price" where we derive the following equation for killing vectors:
$$\xi^{\nu;\lambda}_{\space\space\space\space\space\space;\lambda}+R^{\nu}_{\space\space\sigma}\xi^{\sigma}=0 \space\space\space\space\space\space\space\space\space\space\space(1)$$
They say that the following Lagrangian density reproduces equation (1) by varying the action or using the Euler Lagrange equations:
$$\quad\mathfrak{L}=\xi^{}_{\mu;\nu}\xi^{\mu;\nu}-\frac{1}{2}R_{\mu\nu}\xi^{\mu}\xi^{\nu}$$
but I'm having trouble getting there. I tried using the Euler Lagrange equations but I get confused when trying to compute the derivative of the Lagrangian with respect to the covariant derivative of $\xi^{\mu}$. I think for the derivative with respect to just $\xi^{\mu}$ I just have to use the chain rule on the second term and add them up to cancel the factor of 1/2 but then one of the indices of the Ricci tensor are out of place. Any help would be appreciated