HP Forums

Full Version: Solver Giving Nothing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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)
(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.
This will not work here because 123e-12 is exactified to 0. I have fixed this in the latest version of giac.
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.
Reference URL's