HP Forums

Full Version: Problem with solve().
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I think there is a problem with solve() in HP Prime. In Home and in CAS when I enter solve(1,x) or solve(1,X) I get [[]], empty matrix, but when I do solve(0,x) or solve(0,X) I get {x} or{X} as a solution. I think in both cases should be empty matrix or empty list.
Thanks.
Your contribution made me try solving 1 and 1=0 on the 32SII, resulting in both cases 'no root found'. Nice. Solving 0 for any variable gives an arbitrary number, maybe a starting value for the solver. Also ok.

The Prime is correct here IMHO.
(12-24-2013 09:32 AM)John P Wrote: [ -> ]I think there is a problem with solve() in HP Prime. In Home and in CAS when I enter solve(1,x) or solve(1,X) I get [[]], empty matrix, but when I do solve(0,x) or solve(0,X) I get {x} or{X} as a solution. I think in both cases should be empty matrix or empty list.
Thanks.

Actually, the second case seems fine. If a function is identically zero, then solution set would be the entire domain of that function. The problem is that the domain is ambiguous so returning the input variable is an acceptable way (to me) of presenting the solution.
I would think that both cases should return a syntax error, since the first entry is supposed to be an equation. If a variable is entered in the first position without an equality, then it is implicitly treated as =0. So, the first case would be 1=0, which is an error, and second would be 0=0, which is trivial. For example, in CAS view if I enter solve(x=0,0} the result is {0}. If I only enter solve{x} then I first get a message "Warning, argument is not an equation, solving x=0" followed by the correct result {0}. Also, this occurs with solve(x,x). When I enter solve(0,x), the message "solving 0=0" is nonsense IMO.
Reference URL's