Solution (source code)

= Solution

The radiative-pressure equation is
$$
\frac{dP_{\rm rad}}{dr}
=-\frac{\kappa\rho L_r}{4\pi cr^2}.
$$
Dividing by hydrostatic equilibrium and substituting
$\kappa=\kappa_0(M_r/L_r)(L/M)$ gives
$$
\frac{dP_{\rm rad}}{dP}
=\frac{\kappa_0L}{4\pi cGM},
$$
a constant. Since both pressures vanish at the surface,
$P_{\rm rad}=(1-\beta)P$ and $\beta$ is constant throughout the star. Part i therefore has
$$
\boxed{P=K\rho^{4/3},\qquad n=3},
$$
with spatially constant $K$.

Writing $\rho=\rho_c\theta^3$ and
$$
\alpha^2=\frac{K}{\pi G}\rho_c^{-2/3},
\qquad r=\alpha\xi,
$$
gives the $n=3$ <Lane-Emden equation>
$$
\boxed{\frac1{\xi^2}\frac d{d\xi}
\left(\xi^2\frac{d\theta}{d\xi}\right)=-\theta^3},
\qquad
\theta(0)=1,\quad\theta'(0)=0.
$$
The surface is the first zero $\theta(\xi_1)=0$. The $n=3$ equation has no elementary closed-form solution; among nonnegative indices, the standard analytic cases are $n=0,1,5$. This <Eddington standard model> approximates chemically homogeneous massive main-sequence stars with substantial radiation pressure.