Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Greetings,
I am trying to do a fairly straightforward optimization problem using Lagrange multipliers and have condensed my system down to a set of four equations with four unknowns. I am trying to solve for the unknowns using a Solve block and the 'Find' command, but I keep getting the error message: 'This variable is undefined. Could it be that the system has no solution, or are there some other rules for solvable equations that i am unaware of, or is it simply the case that Mathcad can't find a solution?
Thanks,
MT
In this case I would have to say that there doesn't appear to be a real solution.
If you replaace the Find with Minerr, then mathcad will iterate as far as it can & then return the 'best' result that it found.
The ERR internal variable is also a useful guide after the Minerr function.
Regards
Andy
I went ahead and tried using the Minerr function, but I am still getting the same error message (The variable is undefined.). Should I take this to mean that the system is not solvable at all or could there be something else going on?
In the first instance, I'd suspect that there isn't a suitable solution. Try increasing the value of TOL or CTOL to see if that brings any potential "near" solutions into play. You could also try plotting the equations as surfaces to see how close they approach.
Stuart
The sheet I posted did return values,
But they are all complex , which I would guess is unacceptable.
One correction I made t oyou r sheet was tha whole sheet t there were 2 given statements.
That will upset Mathcad , if you change it & the Minerr stays red, try <ctrl> <F9> to recalculate the whole sheet.
Should fix it.
Regards
Andy