I've been trying to solve the following system of equations using NSolve and the code has been running for close to 24 hours already. Is this normal? Is there a quicker way to solve these equations? Thanks:
NSolve[{((x + y + z + k + l + m - 0.5)/(x + y + z + k + l + m -
1)) + (Log[x + y + z + k + l + m - 1]) - ((x + y + z + k + l + m + 161 - 0.5)/(x + y + z + k + l + m + 161 - 1)) - (Log[x + y + z + k + l + m + 161 - 1]) + ((33 + x + 180 - 0.5)/(33 + x + 180 - 1)) + (Log[33 + x + 180 - 1]) - ((33 + x - 0.5)/(33 + x - 1)) -
Log[33 + x - 1] == 0, ((x + y + z + k + l + m - 0.5)/(x + y + z + k + l + m - 1)) + (Log[x + y + z + k + l + m - 1]) - ((x + y + z + k + l + m + 161 - 0.5)/(x + y + z + k + l + m + 161 - 1)) - (Log[x + y + z + k + l + m + 161 - 1]) + ((65 + y + 198 - 0.5)/(65 + y + 198 - 1)) + (Log[65 + y + 198 - 1]) - ((65 + y - 0.5)/(65 + y - 1)) - Log[65 + y - 1] == 0, ((x + y + z + k + l + m - 0.5)/(x + y + z + k + l + m - 1)) + (Log[x + y + z + k + l + m - 1]) - ((x + y + z + k + l + m + 161 - 0.5)/(x + y + z + k + l + m + 161 - 1)) - (Log[x + y + z + k + l + m + 161 - 1]) + ((140 + z + 133 - 0.5)/(140 + z + 133 - 1)) + (Log[140 + z + 133 - 1]) - ((140 + z - 0.5)/(140 + z - 1)) - Log[140 + z - 1] == 0, ((x + y + z + k + l + m - 0.5)/(x + y + z + k + l + m - 1)) + (Log[x + y + z + k + l + m - 1]) - ((x + y + z + k + l + m + 161 - 0.5)/(x + y + z + k + l + m + 161 - 1)) - (Log[x + y + z + k + l + m + 161 - 1]) + ((195 + k + 139 - 0.5)/(195 + k + 139 - 1)) + (Log[195 + k + 139 - 1]) - ((195 + k - 0.5)/(195 + k - 1)) - Log[195 + k - 1] == 0, ((x + y + z + k + l + m - 0.5)/(x + y + z + k + l + m - 1)) + (Log[x + y + z + k + l + m -1]) - ((x + y + z + k + l + m + 161 - 0.5)/(x + y + z + k + l +m + 161 - 1)) - (Log[x + y + z + k + l + m + 161 - 1]) + ((251 + l + 171 - 0.5)/(251 + l + 171 - 1)) + (Log[251 + l + 171 - 1]) - ((251 + l - 0.5)/(251 + l - 1)) - Log[251 + l - 1] == 0, ((x + y + z + k + l + m - 0.5)/(x + y + z + k + l + m - 1)) + (Log[x + y + z + k + l + m - 1]) - ((x + y + z + k + l + m + 161 - 0.5)/(x + y + z + k + l + m + 161 - 1)) - (Log[x + y + z + k + l + m + 161 - 1]) + ((281 + m + 144 - 0.5)/(281 + m + 144 - 1)) + (Log[281 + m + 144 - 1]) - ((281 + m - 0.5)/(281 + m - 1)) - Log[281 + m - 1] == 0}, {x, y, z, k, l, m}]
sltn = FindInstance[ Simplify[Factor[Rationalize[eqn, 0]]], {x, y, z, k, l, m}]
returns an answer quickly.eqn
is what you have inside{}
in theNSolve
command $\endgroup$NMinimize
of the sum of the squares of your equations along withx>0,y>0,z>0,k>0,l>0,m>0
finds a sum of squares close to zero. The reason for adding the positive constraints is to avoid negative values being given toLog
and avoiding complex numbers. That hints the solution involves z==0, k==0, l==0, m==0 $\endgroup$