topic This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message in PTC Mathcad
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400920#M157387
<HTML><HEAD></HEAD><BODY><P>Hey folks, I am posting this because I am really having trouble seeing where the problem is within this worksheet. Any help would be greatly appreciated.</P></BODY></HTML>Thu, 03 May 2018 16:48:32 GMTptc-53413202018-05-03T16:48:32ZThis problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400920#M157387
Hey folks, I am posting this because I am really having trouble seeing where the problem is within this worksheet. Any help would be greatly appreciated.Thu, 03 May 2018 16:48:32 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400920#M157387ptc-53413202018-05-03T16:48:32ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400921#M157388
<HTML><HEAD></HEAD><BODY><P><IMG __jive_id="60144" class="jive-image-thumbnail jive-image" onclick="" alt="a2.png" src="https://community.ptc.com/legacyfs/online/60144_a2.png" width="450" /></P></BODY></HTML>Fri, 25 Oct 2013 07:42:03 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400921#M157388ValeryOchkov2013-10-25T07:42:03ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400922#M157389
<HTML><HEAD></HEAD><BODY><P>See attached.</P><P></P><P>BTW, there is nothing wrong with using the Align Regions facilitiy in Mathcad!</P></BODY></HTML>Fri, 25 Oct 2013 12:44:40 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400922#M157389Werner_E2013-10-25T12:44:40ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400923#M157390
<HTML><HEAD></HEAD><BODY><P>So my problem was that I needed to have the mass fractions as x.2a instead of a.2 (and so on for the others) in the find block?</P></BODY></HTML>Sat, 26 Oct 2013 04:19:16 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400923#M157390ptc-53413202013-10-26T04:19:16ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400924#M157391
<HTML><HEAD></HEAD><BODY><P>You had used those fractions x.2a etc. in the equations of your solve block. Those variables were not used as solve for variables and they had no value, were undefined. So Mathcad could not evaluate those equations in the solve provess and throws the error.</P><P>There are two other ways to make it work:</P><P>1) change x.2a etc. to a.2 in the equations of the solve block</P><P>2) assign guess values to x.2a, too, and solve for all 19 variables. Not recommended but should work.</P></BODY></HTML>Sat, 26 Oct 2013 09:52:02 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400924#M157391Werner_E2013-10-26T09:52:02ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400925#M157392
<HTML><HEAD></HEAD><BODY><P>Hello to anyone reading this, first post here. I'm not really a user of Mathcad, but since my current employer has it installed, I've been giving it a look of late. A few days ago I was playing with the worksheet enclosed in this thread, when Mathcad crashed and I lost all the edits made by then (but tech discussion should better take place in another section, so I'll cut short to what's related to the problem itself). </P><P></P><P>For a problem of this kind I would prefer to see the solution in a form similar to as shown below (with text output and equations not much more complicated than necessary to solve the system): </P><P></P><P>M1 = F * (1 – x1g / x6g) / ((1 – x3g / x6g) * x7a / x3a – 1)</P><P>M3 = M1 * x7a / x3a</P><P>M6 = M1 + F – M3</P><P>x3s = x1s * F / M3</P><P>x3w = 1 – x3a – x3g – x3s</P><P>M5 = S – M1</P><P>x2w = x5w * M5 / S</P><P>x2a = 1 – x2w</P><P>M4 = M5 + M6</P><P>x4a = x5a * M5 / M4</P><P>x4g = x6g * M6 / M4</P><P>x4w = 1 – x4a – x4g</P><P></P><P>Now (the question to PTC support staff and/or experienced users), do I get it right that this is something Mathcad can't do? I mean, when I try sym solution, I'm getting half a page of pretty heavy equations instead of neat formulae as shown above and I don't see how to get it in text. Am I missing some clues? </P><P></P><P>And one more thing (to the topic starter): is this a textbook problem, and if so, can you say what you were given (what did you have to work from)? Math is ok, but chemistry (considering L/L extraction terms from your worksheet) doesn't seem to make sense. </P></BODY></HTML>Tue, 29 Oct 2013 17:47:28 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400925#M157392ptc-53490402013-10-29T17:47:28ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400926#M157393
<HTML><HEAD></HEAD><BODY><P>If I buy a software to solve a syszem of equations symbolically and the result would be that one solved for variable is referenced on the RHS of the "solution" of another as is the case in your proagated "solution" multiple times, I'd like my money back!</P></BODY></HTML>Tue, 29 Oct 2013 18:32:10 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400926#M157393Werner_E2013-10-29T18:32:10ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400927#M157394
<HTML><HEAD></HEAD><BODY><P>Mathcad won't do "text output." I'm not sure why you want to.</P><P></P><P>Look at the attached file, understand what Mathcad can do, and try your hand.</P></BODY></HTML>Tue, 29 Oct 2013 18:43:43 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400927#M157394Fred_Kohlhepp2013-10-29T18:43:43ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400928#M157395
<HTML><HEAD></HEAD><BODY><P>It looks to me that with "text output" he means a symbolic solution. But the example he gave is not a solution at all.</P><P></P><P>@Andy: The example you gave is like the following:</P><P>You have the equations</P><P><IMG __jive_id="60453" class="jive-image" alt="29.10.png" src="https://community.ptc.com/legacyfs/online/60453_29.10.png" /></P><P>to solve for x1 and x2. Mathcads symbolics giv you the solutions</P><P><IMG __jive_id="60454" class="jive-image" alt="29.10.png" src="https://community.ptc.com/legacyfs/online/60454_29.10.png" /></P><P>You consider this as too complicated and are sad because you expected something simple as</P><P><IMG __jive_id="60455" class="jive-image" alt="29.10.png" src="https://community.ptc.com/legacyfs/online/60455_29.10.png" /></P><P>But this would not make much sense as it is not a solution to the system of two equations given!</P><P>Mathcad could do these transformations, too, if you apply "solve" to every equation individually but it won't help solving the system.</P></BODY></HTML>Tue, 29 Oct 2013 19:13:47 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400928#M157395Werner_E2013-10-29T19:13:47ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400929#M157396
<HTML><HEAD></HEAD><BODY><P>andy mokanov, this problem is one my teacher made, and i cant speak for the chemistry as far as the proportion of glycerine to salt or water to alcohol etc. This is the first chemical-engineering-specific class for us, so we are ChE newbs and i think the point was to just get us moving with material balances and very generally talk about processes like distillation etc. </P></BODY></HTML>Tue, 29 Oct 2013 21:04:48 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400929#M157396ptc-53413202013-10-29T21:04:48ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400930#M157397
<HTML><HEAD></HEAD><BODY><P><STRONG>"Mathcad won't do "text output." I'm not sure why you want to."</STRONG></P><P>Well, if I were to use Mathcad for work, I'd prefer to copy resulting equations to my sources, rather than retype them from screen! Thanks for the brochure, I'll take a look. </P><P></P><P><STRONG>"If I buy a software to solve a syszem of equations symbolically and the result would be that one solved for variable is referenced on the RHS of the "solution" of another as is the case in your proagated "solution" multiple times, I'd like my money back!"</STRONG></P><P></P><P>I'm afraid I don't follow you. </P><P></P><P>Did you check what Mathcad yields as a solution of this system? Are your results different to mine (see attached screenshot)? </P><P></P><P><STRONG>"It looks to me that with "text output" he means a symbolic solution. But the example he gave is not a solution at all."</STRONG></P><P></P><P>Sorry, I don't understand the point of your attack. </P><P></P><P>I gather you didn't take the effort to analyze the system yourself, but did you at least care to check the results against the solution Mathcad yields? I could have made a typo or two somewhere, but other than that the solution should be correct. </P><P></P><P><STRONG>"andy mokanov, this problem is one my teacher made, and i cant speak for the chemistry as far as the proportion of glycerine to salt or water to alcohol etc. This is the first chemical-engineering-specific class for us, so we are ChE newbs and i think the point was to just get us moving with material balances and very generally talk about processes like distillation etc."</STRONG></P><P></P><P>OK, that explains it. Thanks for clarifying. </P></BODY></HTML>Wed, 30 Oct 2013 06:18:33 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400930#M157397ptc-53490402013-10-30T06:18:33ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400931#M157398
<HTML><HEAD></HEAD><BODY><P>I tried to make my point clearer with the example in my second reply (and obviously failed).</P><P>If you have a system lets say in just three variables A, B and C, then anything which would want to be called a solution of this system would consist of three equations beginning with A=.., B=... and C... respective. The point ist, that on the right hand side of these equations anything would be allowed, but NOT A, B or C!</P><P></P><P>In the "solution" you propagate the first variable given is M1 and while you haven*t simplified/expanded your expression it seems to me that you agree with Mathcad at this point. But your next line is M3=... and it uses M1 on the righthand side. So this may not called a solution of the system of equations. While writing out the expressions the way you did may be comfortable for you and if no equation references a variable which is calculated below it, you get your solutions by substituting the result of one line into the next ones. But thats not called a solution of the system. If you do this procedure symbolically you sure would arrive at the expressions Mathcad gave you as solution.</P><P></P><P>Let me add at this point that Mathcads symbolics is rather weak in many respects and cannot compare to Mathematica or Maple. So using symbolics in Mathcad you will quickly come up against the limits, but as it seems to me not in case of this system of equations.</P></BODY></HTML>Wed, 30 Oct 2013 09:48:05 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400931#M157398Werner_E2013-10-30T09:48:05ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400932#M157399
<HTML><HEAD></HEAD><BODY><P><STRONG>"So this may not called a solution of the system of equations." </STRONG></P><P>At this point I'm afraid I have to suggest that you need to review the theory, starting with basic definitions. Since my school days, solution of a SoE was defined along the lines of </P><P>(1) such values of unknowns that meet all equations (make them true/valid);</P><P>(2) finding of (1).</P><P> </P><P><STRONG>"While writing out the expressions the way you did may be comfortable for you"</STRONG></P><P>It has nothing to do with personal comfort. One thing that counts is having fast code, another is ease of debugging and checking your math. If you don't realize these values at all, then perhaps you simply lack experience other people have. </P><P> </P><P><STRONG>"So using symbolics in Mathcad you will quickly come up against the limits, but as it seems to me not in case of this system of equations."</STRONG></P><P>I was, and still am, curious whether Mathcad could provide a solution not as heavy as it does. And if not perfectly short, then at least something not too far from the one shown in my post. </P><P> </P><P>Therefore, I would strongly suggest that in case you consider yourself to be in position to make a constructive contribution here, then your next post in this topic should address the way it can be done -- that would surely be of value for people using this software. </P><P></P><P>And, please, no more ridiculous comments bordering with insults. If you question the correctness of my solution, all you should do is point out the typos. Thank you. </P></BODY></HTML>Sat, 02 Nov 2013 16:12:43 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400932#M157399ptc-53490402013-11-02T16:12:43ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400933#M157400
<HTML><HEAD></HEAD><BODY><P>Am sorry that you take as an insult if a point you to an error.</P><P>I will try to explain one last time:</P><P>SoE: {x+y=5; x-y=1} Solution is {x=3; y=2}</P><P>You suggested something like {x=3; y=x-1} which is not to be considered a solution, but rather another way to write that SoE which may be more convenient as you immedeatly get the solution for y by simple substitution.</P><P></P><P>As you write about "fast code" it looks to me that you do not want Mathcad to completely solve a SoE but rather want it to bring it in a form so you can solve the SoE in a selfwritten program in some program language.</P></BODY></HTML>Sat, 02 Nov 2013 19:05:02 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400933#M157400Werner_E2013-11-02T19:05:02ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400934#M157401
<HTML><HEAD></HEAD><BODY><P>Werner is correct that if M1 is one of the variables that you are solving for it should ntot appear on the RHS of any equation in the solution set. Sorry if you don't like that, but it's the standard convention, and so it's what you get from the Mathcad symbolics. It's almost certainly what you will get from any other symbolic solver too. I have no idea why you would view an observation of that point as an insult.</P></BODY></HTML>Sat, 02 Nov 2013 21:57:31 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400934#M157401RichardJ2013-11-02T21:57:31ZRe: This problem has 12 variables and I do have 12 equations, but I still get the "variable undefined" message
https://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400935#M157402
<HTML><HEAD></HEAD><BODY><P>Guys, </P><P> </P><P>if I happen to be the first to tell you that, then <STRONG>don't</STRONG> take my word for it. Instead, please ask a math professor, consult a book on the subject (or check Wikipedia for lack of any), but for chissake, stop spreading the nonsense that a sequence of operations that delivers values satisfying a SoE "is not a solution"! If that's what Mathcad manual says, then print it out and burn it. </P><P></P><P>Development of SoE solution methods which minimize required computation time is an area of its own; there could well be theses and monographs dedicated to research of one particular method or a specific kind of SoE. But what do I know, eh? Maybe that's the effect Mathcad has on people using it...</P></BODY></HTML>Sun, 03 Nov 2013 11:34:21 GMThttps://community.ptc.com/t5/PTC-Mathcad/This-problem-has-12-variables-and-I-do-have-12-equations-but-I/m-p/400935#M157402ptc-53490402013-11-03T11:34:21Z