Solution (source code)

= Solution

For the centrally condensed point-source model, $M_r=M$, $L_r=L$, and gas pressure dominates. The equations are
$$
\frac{dP}{dr}=-\frac{GM\rho}{r^2},\qquad
\frac{dT}{dr}=-\frac{3\kappa_0\rho^2L}
{16\pi a_{\rm rad}cr^2T^{13/2}},
\qquad
P=\mathcal R\rho T,
$$
where $\mathcal R=k_B/(\mu H)$. Dividing the first equation by the second and eliminating $\rho=P/(\mathcal RT)$ gives
$$
P\frac{dP}{dT}
=\frac{16\pi a_{\rm rad}cGM\mathcal R}
{3\kappa_0L}T^{15/2}.
$$
The surface conditions $P=T=0$ then yield
$$
\boxed{
P=\left(\frac{64\pi a_{\rm rad}cGM\mathcal R}
{51\kappa_0L}\right)^{1/2}T^{17/4}},
$$
$$
\boxed{
\rho=\frac1{\mathcal R}
\left(\frac{64\pi a_{\rm rad}cGM\mathcal R}
{51\kappa_0L}\right)^{1/2}T^{13/4}}.
$$
Substitution into hydrostatic equilibrium cancels the common power of $T$ and gives
$$
\frac{dT}{dr}=-\frac{4GM}{17\mathcal Rr^2}.
$$
Using $T(R)=0$,
$$
\boxed{T(r)=\frac{4GM}{17\mathcal R}
\left(\frac1r-\frac1R\right)}.
$$