Equations of motion for Lagrangean Density dependent of Curvature tensor

I am trying to find the equations of motion for the following Lagrangean

$$\mathscr{L} = \epsilon_{\mu \nu \alpha \beta} R_{\delta \gamma}^{}{}^{\mu \nu} R^{\delta \gamma \alpha \beta}$$

Where R is the Riemann Curvature tensor. To apply the action principle I must find the variation of the Lagrangean, right? I know that $S = \int \mathscr{L} \sqrt{-g} d^{4}x$ and the principle is $\delta S = 0$. I am having trouble to know wether I am doing this right or not. I first have to put the Riemann tensor in the original form so

$$\delta S = \delta \int [ \epsilon_{\mu \nu \alpha \beta} \ g_{\delta \phi} g^ {\lambda \mu} g^{\theta \nu} R^{\phi}{}_{\gamma \lambda \theta} g^{\omega \gamma} g^{\tau \alpha} g^{\kappa \beta} R^{\delta}{}_{\omega \tau \kappa} \sqrt{-g} ] d^{4}x = 0$$

And now do the variation of this function, but I'm not sure if this is right because I can see that this is gonna be complicated. And after variation calculated I have no idea how to go on with the solution.

I guess you assume the Riemann curvature is dependent on the metric g, that is, the connection, $\Gamma$, is the Levi-Civita connection. So, first of all, you can use the index symmetries of the Riemann curvature tensor to get it a bit simpler, since there is anti-symmetric tensor, $\epsilon_{\mu\nu\alpha\beta}$.
For the main solution, you need to variate the action without considering at first to expand the Riemann curvature, so that you could have the variation in terms of $\delta R^{a}_{bcd}$. Since the action is actually quadratic in Riemann tensor, you will have your variation of the action in a form like $$\delta S \simeq \epsilon \; R \;\delta R$$ where I omitted the indices. So, you can to calculate $\delta R$ separately in terms of $\delta g$ (or first in terms of $\Gamma$'s and then $g$'s if you like), then plug it in the variation of the action.
• You will need to use only one of them and only once when you consider the indices of $\epsilon$ can be raised and lowered. I suggest you to first focus on the variation of the Riemann tensor. – Oktay Doğangün May 2 '18 at 21:50