Recipe
Python
Intermediate
10 min
The Lane-Emden equation with solve_ivp: polytropes and the Chandrasekhar mass
Afterwards you can solve the Lane-Emden equation with solve_ivp for any index below 5, find the stellar surface with an event, and get the Chandrasekhar mass.
Ordinary differential equations
Physics