I'm trying to solve a system of two differential equations which depend on two parameters, which I call "K" and "polytrope" in my worksheet. The two differential equations are for the density rho(r) of the star and it's mass m(r). What I'm trying to do with dsovle is to change the values of K and polytrope once rho(r) drops below a certain value and letting dsolve continue the integration with the new values for the parameters. I was thinking about using events, but I'm not sure how to do it, since Maple doesn't seem to allow the use of "<" and ">" in the trigger of an action and I'm not sure how to let dsolve distinguish between the cases rho(r)<rho_crit and rho(r)>=rho_crit.
Thank you for your help.