Post Reply 
Solver Giving Nothing
01-28-2017, 04:53 AM
Post: #1
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.
Find all posts by this user
Quote this message in a reply
01-28-2017, 06:43 AM (This post was last modified: 01-28-2017 07:04 AM by parisse.)
Post: #2
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)
Find all posts by this user
Quote this message in a reply
01-30-2017, 07:01 AM
Post: #3
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 HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
01-30-2017, 04:06 PM
Post: #4
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.
Find all posts by this user
Quote this message in a reply
01-30-2017, 11:06 PM
Post: #5
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.
Find all posts by this user
Quote this message in a reply
Post Reply 




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