# Trying to solve analytically (or at least numerically) a set of equations

I have a set of two equations regarding equations of state of some stars. I have a lot of variables that depend upon each other (all the μ's). I also have a parameter, ρ. Ideally I'd like to get the analytical solutions as functions of ρ (i.e. μu (ρ) etc.), but I realize that's probably too much to ask for. NSolve either returns an empty set or hangs on "Running", depending on how I present the problem, while I'm pretty sure that my equations are correct.

mu = 5; md = 7; ms = 150; me = 5 10^(-1); ρ = 3 10^(-1);
ku := Sqrt[μu^2 + mu^2];
kd := Sqrt[μd^2 + md^2];
ks := Sqrt[μs^2 + ms^2];
ke := Sqrt[μe^2 + me^2];
e1 = μd == μu + μe;
e2 = μs == μd;
e3 = ku^3/(3 Pi^2) + kd^3/(3 Pi^2) + ks^3/(3 Pi^2) == ρ;
e4 = (2 ku^3)/(3 Pi^2) - kd^3/(3 Pi^2) - ks^3/(3 Pi^2) - ke^3/(3 Pi^2) == 0;
NSolve[{e1,e2,e3,e4},{μu, μd, μs, μe}]


This is a copy-paste of my code. I hope the Greek letters don't mess anything up but if they do I'll edit my post with some other symbol.

• What are the parameter ranges? – Ulrich Neumann Jul 8 '19 at 10:04
• Welcome to Mma.SE. Start by taking the tour now and learning about asking and what's on-topic. Always edit if improvable, show due diligence, give brief context, include informtion about your parameters domain and range. A minimal working example of your code is a must. Thanks for using formatted form. By doing all this you help us to help you and likely you will inspire great answers. – rhermans Jul 8 '19 at 10:18

NMinimize[#.# &[{e1, e2, e3, e4} /. Equal -> Subtract], {\[Mu]u, \[Mu]d, \[Mu]s, \[Mu]e}]