Ricci Scalar of a given diagonal metric Given that $$ds² = c²dt² - A(r)dr² - r²(d \theta ² + \sin²({\theta})d \phi ²).$$
I can easily find the metric for this particular situation.
But the question is: how do you find the Ricci scalar for this given metric?
Intuitively I would think the Ricci scalar is zero (like in the Schwarzschild Metric), but I'm not even sure if this is correct.
I think there should be a really easy way to calculate this, but all I can find is writing the Ricci tensor with Christoffel symbols. But writing this out seems very long... Any ideas?
 A: It is pretty straightforward to write some simple Mathematica code for this. And it would in any case be useful for you if you have to do this kind of calculation more than once. In any case, this would be the result
$$R=-\frac{2 \left(r a'+a^2-a\right)}{r^2 a^2}$$
A: The metric being diagonal (in some co-ordinates) doesn't sound like enough to take any sort of shortcut. But maximally symmetric spaces (like dS, AdS or their Riemannian counterparts) satisfy
$$
R_{abcd} = g_{ad}g_{bc} - g_{ac}g_{bd}.
$$
Another useful fact is that Ricci scalars add for direct product manifolds.
A: Assuming stress-energy tensor ${\rm{T}}_{\mu}^{\nu}\equiv {\rm{diag}}~\{\varepsilon,-p,-p,-p\}$ and taking trace from both sides of Einstein field equations (EFE) one obtains the relation
\begin{equation}
-R=\kappa~(\varepsilon-3 p). \tag{1}
\end{equation}
If you know your metric component $g_{rr}$, and $g_{00}$ is constant, you can easily calculate the energy density and pressure from equations
\begin{equation}\label{pressure}
\kappa~ p=-\frac{1-{A}^{-1}}{r^2}~,\tag{2}
\end{equation}
\begin{equation}
\label{density}
\kappa~\varepsilon=\frac{1-{A}^{-1}}{r^2}-\frac{1}{r}~\frac{{\rm d}{A}^{-1}}{{\rm d}r}~,\tag{3}
\end{equation}
and insert them into equation (1).
For more detailed answer, see https://physics.stackexchange.com/a/679431/281096 (be aware of other notation there).
However, the assumption that $g_{00}$ is constant implies (Einstein field equations) that \begin{equation}
\label{em2l}
A(r)=\frac{1}{1-b r^{2}},\tag{4}
\end{equation}
where $b$ is some constant of dimension $L^{-2}$. As result of the equations (1),(2) and (3), the scalar Ricci curvature, pressure and energy density are constant too:
\begin{equation}
\varepsilon=3~b,~~~p=-b,~~~R=-6~b.\tag{5}
\end{equation}
Your metric describes homogeneous, static and isotropic solution derived by Einstein in 1917 called later Einstein's universe, see https://mpra.ub.uni-muenchen.de/83001/ .
