Solving a set of equations/inequations
02-07-2017, 03:16 PM (This post was last modified: 02-07-2017 07:56 PM by compsystems.)
Post: #1
 compsystems Senior Member Posts: 1,332 Joined: Dec 2013
Solving a set of equations/inequations
Hello, I can not solve a system that has an equation and an equation with hp-prime, some command in particular?

1: HP-prime
solve( {(x+y)<10,(x^2) = 9}, {x,y} ); returns []

2: With maple, I get

{ solve({ x+y<10, x^2=9 }, { x, y }) } returns

{ {x = -3, y < 13}, {x = 3, y < 7} } // Output form as a set or list/array

(x = -3 and y < 13) or (x = 3 and y < 7) // Output form as an expression (and, or)

3: wolframα
Reduce[{x + y < 10, x^2 == 9}, {x, y}] returns
(x == -3 && y < 13) || (x == 3 && y < 7)
https://www.wolframalpha.com/input/?i=so...)+%3D+9%7D

with 4: TI68k (TI92+/TIV200) you have to know how to interpret the parameter at (@)

solve(x+y<10 AND x^2=9, {x,y}) returns

(x = -3 and y < @1 and @1 < 13) or (x = 3 and y < @2 and @2 = 7) // Output form as an expression (and, or, @)

for a output form as a set or list/array to use expToList(Ans(1)) cmd

[[when(@2<7,3),when(@2<7,@2)][when(@1<13,-3),when(@1<13,@1)]]

But I think there is a problem in the decoding
[[when(y<7,3),when(y<7,y)][when(y<13,­-3),when(y<13,y)]] ?

[when(y<7,3),when(y<13,­-3)]

02-15-2017, 03:31 PM
Post: #2
 Aries Member Posts: 158 Joined: Oct 2014
RE: Solving a set of equations/inequations
I'm also interested in this, tried everything with no success :-(
Best,

Aries ;-)
02-15-2017, 03:54 PM (This post was last modified: 02-15-2017 07:48 PM by Han.)
Post: #3
 Han Senior Member Posts: 1,882 Joined: Dec 2013
RE: Solving a set of equations/inequations
I am of the opinion that inequality "solvers" are generally quite useless. Here is what Maple provides as the solution to:

solve({x^2+y^2>3, x^2+y^2<4});

{-2 < y, x < sqrt(-y^2+4), y < -sqrt(3), -sqrt(-y^2+4) < x}, {y = -sqrt(3), -1 < x, x < 0}, {y = -sqrt(3), 0 < x, x < 1}, {x < -sqrt(-y^2+3), y < sqrt(3), -sqrt(3) < y, -sqrt(-y^2+4) < x}, {x < sqrt(-y^2+4), y < sqrt(3), -sqrt(3) < y, sqrt(-y^2+3) < x}, {y = sqrt(3), -1 < x, x < 0}, {y = sqrt(3), 0 < x, x < 1}, {x < sqrt(-y^2+4), y < 2, -sqrt(-y^2+4) < x, sqrt(3) < y}

This, while correct, provides absolutely no insight into the solution that a simple graph would convey. Your specific example is more of an exception rather than a representation of the typical system of inequalities one could encounter.

EDIT: For the record, Wolfram Alpha gives an equally useless solution. The original inequalities themselves are much more meaningful than the "solutions" once one recognizes that they (the original inequalities) represent regions inside/outside a circle.

solve({3*x+y>4,2*x-y<1});

{ 1 < y, x < (1/2)*y+1/2, -(1/3)*y+4/3 < x }

Again, correct yet mostly useless. This answer requires knowledge about lines written in the atypical form of $$x=My+B$$ as opposed to $$y=mx+b$$ so that one can geometrically realize the solution. But if you look at it, the solution is not really that much more useful than the original inequalities themselves. In fact, the best that most solvers would be able to do in a typical system of inequalities is to solve for one variable (say $$y$$) in all the formulas and then simply insert "and" in between each formula. It is really no different than the solution above (in the second example).

If you want meaningful solutions to a set of inequalities, I would recommend using the Advanced Graphing app. A picture is worth a thousand words (or formulas).

Graph 3D | QPI | SolveSys
02-16-2017, 09:19 AM
Post: #4
 Aries Member Posts: 158 Joined: Oct 2014
RE: Solving a set of equations/inequations
solve({x^2-4>=0,x^2-4=2*x-4}), the solution set given by the Prime is {0,2}.
What the **** is that 0 ?
It's not part of the intersection ;-(
Best,

Aries :-)
02-16-2017, 10:23 AM
Post: #5
 parisse Senior Member Posts: 1,236 Joined: Dec 2013
RE: Solving a set of equations/inequations
A missing test, it only affects 0.
02-17-2017, 11:18 AM
Post: #6
 Simone Cerica Member Posts: 60 Joined: Mar 2014
RE: Solving a set of equations/inequations
(02-16-2017 09:19 AM)Aries Wrote:  solve({x^2-4>=0,x^2-4=2*x-4}), the solution set given by the Prime is {0,2}.
What the **** is that 0 ?
It's not part of the intersection ;-(
Best,

Aries :-)

It's a bug!
02-17-2017, 04:44 PM
Post: #7
 parisse Senior Member Posts: 1,236 Joined: Dec 2013
RE: Solving a set of equations/inequations
And it is fixed in giac source code.
02-17-2017, 04:45 PM
Post: #8
 Simone Cerica Member Posts: 60 Joined: Mar 2014
RE: Solving a set of equations/inequations
thank you so much
 « Next Oldest | Next Newest »

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