Solver Giving Nothing
01-28-2017, 04:53 AM
Post: #1
 rpn314 Junior Member Posts: 1 Joined: Dec 2015
Solver Giving Nothing
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.
01-28-2017, 06:43 AM (This post was last modified: 01-28-2017 07:04 AM by parisse.)
Post: #2
 parisse Senior Member Posts: 1,179 Joined: Dec 2013
RE: Solver Giving Nothing
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-30-2017, 07:01 AM
Post: #3
 Tim Wessman Senior Member Posts: 2,270 Joined: Dec 2013
RE: Solver Giving Nothing
(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.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
01-30-2017, 04:06 PM
Post: #4
 parisse Senior Member Posts: 1,179 Joined: Dec 2013
RE: Solver Giving Nothing
This will not work here because 123e-12 is exactified to 0. I have fixed this in the latest version of giac.
01-30-2017, 11:06 PM
Post: #5
 akmon Member Posts: 197 Joined: Jun 2014
RE: Solver Giving Nothing
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.
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)