HP Forums
Solving a set of equations/inequations - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Solving a set of equations/inequations (/thread-7739.html)



Solving a set of equations/inequations - compsystems - 02-07-2017 03:16 PM

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=solve+%7B(x%2By)%3C10,(x%5E2)+%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)]


[Image: system_of_equations_inequations_image00.png]


RE: Solving a set of equations/inequations - Aries - 02-15-2017 03:31 PM

I'm also interested in this, tried everything with no success :-(
Best,

Aries ;-)


RE: Solving a set of equations/inequations - Han - 02-15-2017 03:54 PM

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).


RE: Solving a set of equations/inequations - Aries - 02-16-2017 09:19 AM

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 :-)


RE: Solving a set of equations/inequations - parisse - 02-16-2017 10:23 AM

A missing test, it only affects 0.


RE: Solving a set of equations/inequations - Simone Cerica - 02-17-2017 11:18 AM

(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!


RE: Solving a set of equations/inequations - parisse - 02-17-2017 04:44 PM

And it is fixed in giac source code.


RE: Solving a set of equations/inequations - Simone Cerica - 02-17-2017 04:45 PM

thank you so much