Inward Pressure of Gravity We are looking at White Dwarfs in Quantum and specifically how they are stabilized between gravitation pressure inwards balanced by the Fermi pressure due to electrons. 

To start the problem off we are asked to calculate the inward pressure due to gravity in terms of the total gravitational energy. We are examining a white dwarf with the mass of our Sun (ignoring where this is probable/possible). 

If we take the total gravitation energy to be $U_g$ then I figured $U_g=PV$ and that the inward pressure due to gravity would be $P=\frac{U_g}{V}$ where $V={4 \over 3}\pi r_{sun}^3$.
However when I use this later on to calculate the radius of a white dwarf with mass equal to our sun I get an obscenely small number. While I understand the densities of white dwarfs are enormous I think I made a mistake in the inward pressure due to gravity part. Should it be that $V={4\over 3}\pi K f^3$ and then...? Not sure where to go or what I did wrong. Ideas?
 A: The usual way to tackle these things is to use a form of the virial theorem.
The one I would usually use here is (in your notation)
$$ U_g =  -3 \int P\, dV $$
I'm not really clear where you get $U_g = PV$ from, it cannot be correct, not least because gravitational potential energy is negative in this case.
To make further progress (on the back of an envelope) you can assume constant density, and then in a degenerate star where $P = A \rho^{\alpha}$ ($A$ is a constant, $\rho$ is the density and $\alpha=5/3$ for non-relativistic degeneracy or 4/3 for relativistic degeneracy), you can simplify to
$$ -\frac{3GM^2}{5R} = -3 A \rho^{\alpha-1} \int dM\, , $$
$$ \frac{GM}{5R} = A \rho^{\alpha-1}\, ,$$
where $dV = dM/\rho$, $-3GM^2/5R$ is the G.P.E. of a uniform sphere and
$\rho = 3M/4\pi R^3$. From this, you can eliminate $\rho$ and derive the mass-radius relationship or eliminate $R$ and get the relationship between average density and mass.
If you want to abandon the assumption of a uniform density (which changes the answers by about 30 per cent), you'll need to do some numerical computation or use polytropes and the Lane-Emden equation.
