im really confused on how i relate mass to radius of a star with a non constant density. more specifically i cannot seem to find an equation that states how density varies throughout a main sequence stars radius. Im fine if the equation has known constants within them including solar measurements. not only that i need to code this into a plottable formatt on python and i cant get past the whole density issue.
any help would be amazing!