I have some issue regarding the stellar structure. I know analytically the equation of state, and I have been asked to build the structure of the star from these two equations
$\frac{dP}{dr}=-\frac{G m \rho}{r^2}$
$\frac{dm}{dr}=4 \pi r^2 \rho$
The problem is that I have been told to integrate over density, so I don't really know how to transform these equations in order to do that. Any help is welcome!