Solving electromagnetic vector field using the Lagrangian Given an action of the form 
\begin{equation}S=-\frac{1}{4}\int d^4x\eta^{\mu\nu}\eta^{\lambda\rho}F_{\mu\lambda}F_{\nu\rho}\end{equation}
where $F_{\mu\nu}=\partial_{\mu}A_{\nu}-\partial_{\nu}A_{\mu}$, $\eta_{\mu\nu}=g_{\mu\nu}/a^2(\eta)$, where $g_{\mu\nu}$ is given by the line element:
\begin{equation}ds^2=a^2(\eta)[d\eta^2-(dx^i)^2]\end{equation}
I would like to solve for $A_{\mu}$, and standard solution is 
\begin{equation}A_{\mu}^{(\alpha)}=e_{\mu}^{(\alpha)}e^{ik_\nu x^\nu}.\end{equation} 
I am interested in knowing how to derive this result.
My approach is first write the Lagrangian from action and use EL eq
\begin{equation}\frac{\partial \mathcal{L}}{\partial A_{\mu}}-\frac{d}{d x^{\nu}}\frac{\partial \mathcal{L}}{\partial(\partial_{\nu}A_{\mu})}=0\end{equation}
My main problem is mathematical difficulty in evaluating the EL eq. Can anyone please help me on this? 
 A: The action for an electromagnetic field in curved space is given by,
$$S=-\frac{1}{4}\int \mathrm{d}^4 x \, \sqrt{|g|} \, F_{\mu\nu}g^{\mu\lambda}g^{\sigma \nu}F_{\lambda \sigma}$$
for a generic metric, $g_{\mu\nu}$ - notice the correct volume element is with $\sqrt{|g|}$. The equations of motion or equivalently Euler-Lagrange equations are,
$$\partial_\nu \left( \sqrt{|g|}F^{\mu\nu}\right)=0$$
in vacuum, where we have chosen to hide the additional factors of the metric by raising the index of the field-strength tensor. In your question, your solution is a plane wave, for $g_{\mu\nu}=\eta_{\mu\nu}$. If you wanted to work in the spacetime background you provided,
$$\mathrm{d}s^2 = a(t)^2 \left[ \mathrm{d}t^2-\mathrm{d}x^2-\mathrm{d}y^2-\mathrm{d}z^2\right]$$
you must raise tensors with that metric, and include the volume factor. In your case the action becomes,
$$S = -\frac{1}{4}\int \mathrm{d}^4x \, \, a(t)^4 \, F_{\mu\nu}g^{\mu\lambda}g^{\sigma \nu}F_{\lambda \sigma}$$
$$\partial_\nu \left( a(t)^4 F^{\mu\nu}\right)=0 \quad \implies \partial_i F^{\mu i}=-\left(\partial_0+\frac{4\dot{a}(t)}{a(t)} \right)F^{\mu 0}$$
where $F^{\mu\nu}$ is raised with your curved metric.
