A conformally-flat metric is also Ricci-flat? If I have a conformally-flat metric like this one:
$g_{\mu\nu}=e^{2\phi(x)}\eta_{\mu\nu}$
Where $\phi (x)$ is a scalar function of the coordinates.
Shouldn't this metric be Ricci-flat? This means that:
$R_{\mu\nu} = 0$
I think this might be logic but I can't prove it.
What I got is that the Ricci tensor is equal to:
$R_{\mu\nu}= \partial_\mu\phi\partial_\nu\phi-\partial_\mu\partial_\nu\phi-( \partial_\lambda\phi\partial^\lambda\phi-\partial_\lambda\partial^\lambda\phi)\eta_{\mu\nu}$
Is there something that I'm missing or is it that my assumption that it should be Ricci-flat is wrong?
 A: No, a conformally-flat metric doesn't imply the vanishing of the Ricci tensor.  As a very simple example, the flat space FLRW metric
$$\tag{1}
ds^2 = dt^2 - a^2(t) (dx^2 + dy^2 + dz^2),
$$
is conformally-flat.  Just use the conformal time: $d\eta = \frac{1}{a(t)} \, dt$, to get the following metric:
$$\tag{2}
ds^2 = a^2 (d\eta^2 - dx^2 - dy^2 - dz^2).
$$
This metric is obviously conformal to the Minkowski metric, so it is "conformally-flat", and yet the associated Ricci tensor is not 0.  This metric is a cosmological solution to the Einstein equation with a perfect fluid as matter source, and may even include a cosmological constant:
$$\tag{3}
R_{\mu \nu} - \frac{1}{2} \, g_{\mu \nu} \, R + \Lambda \, g_{\mu \nu} = -\, \kappa \, T_{\mu \nu}.
$$
If $R_{\mu \nu} = 0$, then $R \equiv g^{\mu \nu} \, R_{\mu \nu} = 0$, so (3) would reduces to
$$\tag{5}
\Lambda \, g_{\mu \nu} = -\, \kappa \, T_{\mu \nu},
$$
which is not true for a general perfect fluid tensor.
Conformally flat means that the Weyl conformal tensor vanishes: $C^{\lambda}_{\: \kappa \mu \nu} = 0$.
The conclusion to your question is that your assumption that your metric should be Ricci-flat is just wrong.
EDIT: By the way, for a proper choice of function $\phi(x)$, your metric is the de Sitter metric in some cartesian coordinates system, with any cosmological constant $\Lambda$.  In that case, you get
$$\tag{6}
R_{\mu \nu} - \frac{1}{2} \, g_{\mu \nu} \, R + \Lambda \, g_{\mu \nu} = 0 \qquad \Rightarrow \qquad R_{\mu \nu} = \Lambda \, g_{\mu \nu}.
$$
A: The transformations of the curvature tensors under a conformal transformation can be found in Wald's General Relativity, Appendix C.  Specifically, he shows that if two metrics are conformally related by $\tilde{g}_{ab} = e^{2 \phi} g_{ab}$, then we have
$$
\tilde{R}_{ab} = R_{ab} - (n-2) \nabla_a \nabla_b \phi - g_{ab} g^{cd} \nabla_c \nabla_d \phi + (n-2) \nabla_a \phi \nabla_b \phi - (n - 2) g_{ab} g^{cd} \nabla_c \phi \nabla_d \phi
$$
where $n$ is the number of dimensions of the spacetime.
Your result, with $g_{ab} = \eta_{ab}$ (and so $R_{ab} = 0$) contains many of the same terms, but the coefficients are different from Wald's result.  Perhaps you made an algebra error or two;  but even so, you should not expect to find that the conformally rescaled metric is Ricci-flat.
