Lane-Emden variables for a stellar polytrope (source code)

= Lane-Emden variables for a stellar polytrope
{c}

Writing
$$
\rho=\rho_c\theta^n,\qquad r=\alpha\xi,\qquad
\alpha^2=\frac{(n+1)K}{4\pi G}\rho_c^{(1-n)/n}
$$
reduces Newtonian hydrostatic balance to
$$
\frac1{\xi^2}\frac d{d\xi}\left(\xi^2\theta'\right)=-\theta^n,
\qquad \theta(0)=1,\quad\theta'(0)=0.
$$
The stellar surface is the first zero $\xi_1$ of $\theta$, and $R=\alpha\xi_1$.