Solver Giving Nothing - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Solver Giving Nothing (/thread-7677.html) Solver Giving Nothing - rpn314 - 01-28-2017 04:53 AM I'm trying to simplify my life a bit with the solve in CAS. I've come across an equation that I don't understand the results of, or rather the lack of results. The equation is a type of system of equations, 2 unknowns and 2 variables. 127E-12=(a*b)/(a+b) and 8.377=((a+b)/b)^2 then solve for a and b. If I "help" it along by simplifying the second equation to be b*1.893=a, then the solve function gives me the results that I would expect. However if I enter it in just like above, it gives me nothing (returns []). I feel like I'm missing something obvious, like a setting. Any ideas? I can post screenshots if it would help. RE: Solver Giving Nothing - parisse - 01-28-2017 06:43 AM The CAS solver works with exact coefficients, since you have approx coefficients it will try to convert them to exact coefficients, and this fails because 127e-12 is small and is converted to 0. The solution is to write exact coefficients yourself: Code: `s:=solve([127*10^-12=(a*b)/(a+b) , 8377*10^-3=((a+b)/b)^2],[a,b])` and approx after: Code: `evalf(s)` RE: Solver Giving Nothing - Tim Wessman - 01-30-2017 07:01 AM (01-28-2017 04:53 AM)rpn314 Wrote:  I'm trying to simplify my life a bit with the solve in CAS. I've come across an equation that I don't understand the results of, or rather the lack of results. The equation is a type of system of equations, 2 unknowns and 2 variables. 127E-12=(a*b)/(a+b) and 8.377=((a+b)/b)^2 then solve for a and b. If I "help" it along by simplifying the second equation to be b*1.893=a, then the solve function gives me the results that I would expect. However if I enter it in just like above, it gives me nothing (returns []). I feel like I'm missing something obvious, like a setting. Any ideas? I can post screenshots if it would help. As a general rule, don't stick approximate numbers into the CAS else it can be unhappy. You can always insert an "exact( )" call around your function with decimals and it will normally be enough. RE: Solver Giving Nothing - parisse - 01-30-2017 04:06 PM This will not work here because 123e-12 is exactified to 0. I have fixed this in the latest version of giac. RE: Solver Giving Nothing - akmon - 01-30-2017 11:06 PM I have used this thread to test the updated app from Han to solve multiple linear or nonlinear system of equations (If it works I´m going to call it Solvesys from HP Prime). The results are: A: -3,675E-10 B: 9,438€-11 Is the result correct? Edit: using Wolfram Aloha the result is correct. Great.