Solution (source code)

= Solution

Use the uniform-density configuration as a trial configuration for the <white dwarf>. Write $P=C_F h^2n^{5/3}/m_e$, with $C_F>0$ the numerical coefficient suppressed by the approximate equation of state. Its particle density is $n=3M/(4\pi m_pR^3)$, and the nonrelativistic <degeneracy pressure> has kinetic-energy density $3P/2$. Hence
$$
E_{\mathrm{kin}}=\frac{\alpha}{R^2},\qquad
\alpha=\frac32 C_F\frac{h^2}{m_e}\left(\frac3{4\pi}\right)^{2/3}\left(\frac{M}{m_p}\right)^{5/3}.
$$
For uniform density $m(r)=M(r/R)^3$, so integration of the shell energy gives
$$
E_{\mathrm{grav}}=-\frac{\beta}{R},\qquad \beta=\frac35GM^2.
$$
Both constants are positive and independent of $R$. Differentiating $E=\alpha/R^2-\beta/R$ gives its unique stationary radius $R=2\alpha/\beta$. The second derivative there is $2\alpha/R^4>0$, and this is the global minimum since $E\to+\infty$ at zero and $E\to0^-$ at infinity. Thus
$$
\boxed{R_{\mathrm{WD}}=5C_F\left(\frac3{4\pi}\right)^{2/3}\frac{h^2M^{-1/3}}{Gm_e m_p^{5/3}}\ \sim\ \frac{h^2M^{-1/3}}{Gm_e m_p^{5/3}}.}
$$
The uniform-density approximation is used for this energy estimate; it does not require a spatially constant pressure to satisfy the exact <hydrostatic equilibrium> equation.