# Metric inside a sphere of uniform density?

Is an exact solution to Einstein's Field Equations known for the interior of a sphere of uniform density (to approximate a star or planet, for example?)

Yes, the exact solution is known. The general spherically symmetric metric is $$g=-B(r)\mathrm{d}t^2+A(r)\mathrm{d}r^2+r^2\mathrm{d}\Omega^2.$$

The solution for $A(r)$ is $$A(r)=\left[1-\frac{2G\mathcal{M}(r)}{r}\right]^{-1},\quad\mathcal{M}(r)=\int^r \rho \,\mathrm{d}V=\int_0^r 4\pi r'^2\rho(r')\,\mathrm{d}r.$$ The solution for $B(r)$ is $$B(r)=\exp\left\{-\int_r^\infty \frac{2G}{r'^2}[\mathcal{M}(r')+4\pi r'^3 P(r')]A(r')\,\mathrm{d}r'\right\}.$$ In these equations $\rho$ is the density of the star and $P$ its pressure.

The derivation can be found in e.g.

S. Weinberg, Gravitation and Cosmology (1973), Sect. 11.1

R.M. Wald, General Relativity (1984), Sect. 6.2

N. Straumann, General Relativity (2013), Sect. 7.4

• So taking $r >> 2GM (r)$ you get the Schwarzschild solution Jun 17, 2019 at 9:01
• Weinberg p. 302 has $2G/r^2$ not $2G/r'^2$. Who is right? OK, my copy is from 1972, so maybe it has a typo? Jun 20, 2019 at 18:43