Mass of star from Lane-Emden equation Suppose we have equation of state $p=K\rho^{1+\frac{1}{n}},$ where $\gamma=1+\frac{1}{n}$ for some star. Then by standard calculations we obtain equation for enthalpy $h$:
$$\Delta h+4\pi G\left(\frac{\gamma-1}{K\gamma}\right)^nh^n=0.$$ 
We can transform the above the equation to the following form
$$w''(x)+\frac{2}{x}w'(x)+w^n(x)=0,$$
where $w(x)=\alpha h(x), \ r=\lambda x$ are some rescaled function and variable, i.e. we obtain Lane-Emden equation.
Let  $x_0:=\inf\{x>0\ |\ w_n(x)=0\}.$ Then one can easily check that the radius $R$ of star is $\lambda x_0$. 
My question is : How to show ( in the simplest way ) that the mass $M$ of a star is proportional to $\lambda^3x_0^2w_n'(x_0)$ ?
 A: Let us first define $\lambda$ by the equation
$$\lambda^2=\frac{4\pi G}{K(n+1)\rho_c^{\frac{1-n}{n}}}$$
for a constant $K$ and central pressure $\rho_c$, which gives us a scaled radius leading to the Lane-Emden equation. Now, we know that for a spherically symmetric body,
$$M=\int_0^R 4\pi r^2\rho(r)\mathrm{d}r$$
In our polytropic relation, though,
$$\rho=\rho_cw^n,\quad \mathrm{d}r=\lambda \mathrm{d}x,\quad r^2=\lambda^2x^2,\quad R=\lambda x_0$$
Therefore,
$$M=\int_0^{x_0}4\pi\lambda^3\rho_cx^2w^n\mathrm{d}x=4\pi\lambda^3\rho_c\int_0^{x_0} x^2w^n\mathrm{d}x$$
Substituting in from the Lane-Emden equation yields
$$M=4\pi\lambda^3\rho_c\int_0^{x_0}\left[-\frac{\mathrm{d}}{\mathrm{d}x}\left(x^2\frac{\mathrm{d}w}{\mathrm{d}x}\right)\right]\mathrm{d}x=4\pi\lambda^3\rho_c\left[-x^2\frac{\mathrm{d}w}{\mathrm{d}x}\right]_{x=x_0}$$
This shows that $M\propto \lambda^3x_0^2w_n'(x_0)$, completing the proof.
The derivation is somewhat common, and can be found in e.g. this text. Different variables are used; as far as I know, some of the ones you're used ($w$ and $x$) are non-standard, and are generally replaced by $\theta$ and $\xi$, respectively.
