[GGB-166] Error solving inequalities

a.zampa shared this problem 5 years ago
Solved

Hello, this probably is a bug: the command


Solutions[x/(x-1)+2/(x-2)<=(2x^2-6)/(x^2-3x+2)]


gives the solutions {x<=-2}


while manually reducing to normal form (without simplification)


Solutions[(4-x^2)/(x^2-3x+2)<=0]


gives the almost correct answer {x<=2, 1<x<=2, x>=2}.


Of course, the correct answer is {x<=2, 1<x<2, x>2}.


Following is the system information. Observe that my computer runs (with some problems) Windows 10 upgraded from Windows 8.1, not Windows 8 as it is said below.


Thanks


Alessandro


    GeoGebra 5.0.156.0-3D (29 September 2015)

    Java: 1.7.0_40

    Codebase: file:/C:/Users/ale/AppData/Roaming/GeoGebra%205.0/jars/current/geogebra.jar

    OS: Windows 8

    Architecture: x86 / x86

    Heap: 247MB

    CAS: Giac/JNI


    GeoGebraLogger log:

    17:33:02.674 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac: after interrupt/stop

    17:33:02.675 DEBUG: org.geogebra.common.b.b.a.d[-1]: giac output (with inequality converted): {x<=(-2)}

    17:33:02.676 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac output: {x<=(-2)}

    17:33:02.693 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac input: ggbsort(normal(zeros(((x)/((x)-(1)))+((2)/((x)-(2))) <= (((2)*((x)^(2)))-(6))/((((x)^(2))-((3)*(x)))+(2)),x)))

    17:33:02.695 DEBUG: ?: thread starting: ggbsort(normal(zeros(((x)/((x)-(1)))+((2)/((x)-(2))) <= (((2)*((x)^(2)))-(6))/((((x)^(2))-((3)*(x)))+(2)),x)))

    17:33:02.741 DEBUG: org.geogebra.desktop.a.a.a$a.run[-1]: giac evalRaw input: evalfa(ggbsort(normal(zeros(((x)/((x)-(1)))+((2)/((x)-(2))) <= (((2)*((x)^(2)))-(6))/((((x)^(2))-((3)*(x)))+(2)),x))))

    17:33:02.768 DEBUG: org.geogebra.desktop.a.a.a$a.run[-1]: giac evalRaw output: {(-2)>=x}

    17:33:02.769 DEBUG: ?: message from thread: {(-2)>=x}

    17:33:02.769 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac: after interrupt/stop

    17:33:02.770 DEBUG: org.geogebra.common.b.b.a.d[-1]: giac output (with inequality converted): {x<=(-2)}

    17:33:02.771 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac output: {x<=(-2)}

    17:35:33.137 DEBUG: org.geogebra.desktop.gui.g.j.keyReleased[-1]: Key pressed \uFFFF ctrl

    17:35:33.138 DEBUG: org.geogebra.desktop.gui.g.j.keyReleased[-1]: Unknown keyString: ctrl

    17:35:48.562 WARN: org.geogebra.common.m.r.a[-1]: Java keycode not found:153

    17:35:50.398 DEBUG: org.geogebra.common.l.j.n.a[-1]: NOT FUNCTIONSolutions

    17:35:50.403 DEBUG: org.geogebra.common.b.d.a.a[-1]: 1:

    17:35:50.404 DEBUG: org.geogebra.common.b.d.a.a[-1]: 1: Soluzioni[(4-x^2)/(x^2-3x+2)<=0]

    17:35:50.405 DEBUG: org.geogebra.common.b.d.a.a[-1]: 1:

    17:35:50.408 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac input: ggbsort(normal(zeros(((4)-((x)^(2)))/((((x)^(2))-((3)*(x)))+(2)) <= 0,x)))

    17:35:50.410 DEBUG: ?: thread starting: ggbsort(normal(zeros(((4)-((x)^(2)))/((((x)^(2))-((3)*(x)))+(2)) <= 0,x)))

    17:35:50.457 DEBUG: org.geogebra.desktop.a.a.a$a.run[-1]: giac evalRaw input: evalfa(ggbsort(normal(zeros(((4)-((x)^(2)))/((((x)^(2))-((3)*(x)))+(2)) <= 0,x))))

    17:35:50.492 DEBUG: org.geogebra.desktop.a.a.a$a.run[-1]: giac evalRaw output: {(-2)>=x,(x>1) && (2>=x),x>=2}

    17:35:50.493 DEBUG: ?: message from thread: {(-2)>=x,(x>1) && (2>=x),x>=2}

    17:35:50.493 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac: after interrupt/stop

    17:35:50.495 DEBUG: org.geogebra.common.b.b.a.d[-1]: giac output (with inequality converted): {x<=(-2),1<x<=2,x>=2}

    17:35:50.495 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac output: {x<=(-2),1<x<=2,x>=2}

    17:35:50.512 DEBUG: org.geogebra.common.l.j.n.w_[-1]: updating$2

    17:36:13.631 DEBUG: org.geogebra.desktop.gui.i.ac.menuSelected[-1]: Menu opening: class org.geogebra.desktop.gui.i.ac

    17:36:13.631 DEBUG: org.geogebra.desktop.gui.i.ac.menuSelected[-1]: creating menu items

    17:36:13.665 DEBUG: org.geogebra.desktop.gui.i.ac.c[-1]: using flag: it.png

    17:36:19.077 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac input: ggbsort(normal(zeros(((x)/((x)-(1)))+((2)/((x)-(2))) <= (((2)*((x)^(2)))-(6))/((((x)^(2))-((3)*(x)))+(2)),x)))

    17:36:19.078 DEBUG: ?: thread starting: ggbsort(normal(zeros(((x)/((x)-(1)))+((2)/((x)-(2))) <= (((2)*((x)^(2)))-(6))/((((x)^(2))-((3)*(x)))+(2)),x)))

    17:36:19.122 DEBUG: org.geogebra.desktop.a.a.a$a.run[-1]: giac evalRaw input: evalfa(ggbsort(normal(zeros(((x)/((x)-(1)))+((2)/((x)-(2))) <= (((2)*((x)^(2)))-(6))/((((x)^(2))-((3)*(x)))+(2)),x))))

    17:36:19.147 DEBUG: org.geogebra.desktop.a.a.a$a.run[-1]: giac evalRaw output: {(-2)>=x}

    17:36:19.147 DEBUG: ?: message from thread: {(-2)>=x}

    17:36:19.148 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac: after interrupt/stop

    17:36:19.149 DEBUG: org.geogebra.common.b.b.a.d[-1]: giac output (with inequality converted): {x<=(-2)}

    17:36:19.150 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac output: {x<=(-2)}

    17:36:19.153 DEBUG: org.geogebra.common.l.j.n.a[-1]: NOT FUNCTIONSolutions

    17:36:19.156 DEBUG: org.geogebra.common.l.j.n.a[-1]: NOT FUNCTIONSolutions

    17:36:19.164 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac input: ggbsort(normal(zeros(((4)-((x)^(2)))/((((x)^(2))-((3)*(x)))+(2)) <= 0,x)))

    17:36:19.165 DEBUG: ?: thread starting: ggbsort(normal(zeros(((4)-((x)^(2)))/((((x)^(2))-((3)*(x)))+(2)) <= 0,x)))

    17:36:19.209 DEBUG: org.geogebra.desktop.a.a.a$a.run[-1]: giac evalRaw input: evalfa(ggbsort(normal(zeros(((4)-((x)^(2)))/((((x)^(2))-((3)*(x)))+(2)) <= 0,x))))

    17:36:19.243 DEBUG: org.geogebra.desktop.a.a.a$a.run[-1]: giac evalRaw output: {(-2)>=x,(x>1) && (2>=x),x>=2}

    17:36:19.243 DEBUG: ?: message from thread: {(-2)>=x,(x>1) && (2>=x),x>=2}

    17:36:19.244 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac: after interrupt/stop

    17:36:19.245 DEBUG: org.geogebra.common.b.b.a.d[-1]: giac output (with inequality converted): {x<=(-2),1<x<=2,x>=2}

    17:36:19.245 DEBUG: org.geogebra.desktop.a.a.a.f[-1]: giac output: {x<=(-2),1<x<=2,x>=2}

    17:36:23.510 DEBUG: javax.swing.JMenu.fireMenuSelected[-1]: Menu opening: class org.geogebra.desktop.gui.i.V

    17:36:23.511 DEBUG: javax.swing.JMenu.fireMenuSelected[-1]: creating menu items

    17:36:23.514 ERROR: org.geogebra.desktop.geogebra3D.f.a.a[-1]: Image /gui/images/64px/forum.gif not found

    17:36:23.520 ERROR: org.geogebra.desktop.geogebra3D.f.a.a[-1]: Image /gui/images/64px/forum.png not found

    17:36:26.221 DEBUG: org.geogebra.desktop.gui.R.d[-1]: opening URL:http://www.geogebra.org/bugs/?v=5.0

    17:36:26.222 DEBUG: org.geogebra.desktop.gui.R.d[-1]: opening URL:http://www.geogebra.org/bugs/?v=5.0

    17:48:26.164 DEBUG: org.geogebra.common.b.d.f.a[-1]: 0: $1

    17:48:26.165 DEBUG: org.geogebra.common.b.d.f.a[-1]: 0: $1

    17:48:26.165 DEBUG: java.awt.dnd.DropTarget.drop[-1]: DEBUG: CASDropTargetListener: exception in drop

    17:48:50.386 DEBUG: javax.swing.JMenu.fireMenuSelected[-1]: Menu opening: class org.geogebra.desktop.gui.i.V


    GGB file content:

    <?xml version="1.0" encoding="utf-8"?>

    <geogebra format="5.0" version="5.0.156.0" id="ebe0c531-ef75-471c-8a4b-03e4e5cb2a10" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb...; xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLS...; >

    <gui>

    <window width="800" height="600" />

    <perspectives>

    <perspective id="tmp">

    <panes>

    <pane location="" divider="0.25" orientation="1" />

    <pane location="1" divider="0.375" orientation="1" />

    </panes>

    <views>

    <view id="4097" visible="false" inframe="true" stylebar="true" location="1,1,1,1" size="400" window="100,100,700,550" />

    <view id="512" toolbar="0 | 1 501 5 19 , 67 | 2 15 45 18 , 7 37 | 514 3 9 , 13 44 , 47 | 16 | 551 550 11 , 20 22 21 23 , 55 56 57 , 12 | 69 | 510 511 , 512 513 | 533 531 , 534 532 , 522 523 , 537 536 , 535 | 521 520 | 36 , 38 49 560 | 571 30 29 570 31 33 | 17 | 540 40 41 42 , 27 28 35 , 6 , 502" visible="false" inframe="false" stylebar="false" location="1,1,1" size="500" window="100,100,600,400" />

    <view id="1" visible="true" inframe="false" stylebar="false" location="1,1" size="263" window="100,100,600,400" />

    <view id="4" toolbar="0 || 2020 , 2021 , 2022 , 66 || 2001 , 2003 , 2002 , 2004 , 2005 || 2040 , 2041 , 2042 , 2044 , 2043" visible="false" inframe="false" stylebar="false" location="1,1" size="300" window="100,100,600,400" />

    <view id="8" toolbar="1001 | 1002 | 1003 || 1005 | 1004 || 1006 | 1007 | 1010 || 1008 1009 || 66 68 || 6" visible="true" inframe="false" stylebar="false" location="1,3" size="300" window="100,100,600,400" />

    <view id="2" visible="true" inframe="false" stylebar="false" location="3" size="200" window="100,100,250,400" />

    <view id="16" visible="false" inframe="false" stylebar="false" location="1" size="150" window="50,50,500,500" />

    <view id="32" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />

    <view id="64" visible="false" inframe="true" stylebar="true" location="1" size="150" window="50,50,500,500" />

    <view id="70" visible="false" inframe="true" stylebar="true" location="1" size="150" window="50,50,500,500" />

    </views>

    <toolbar show="true" items="0 39 | 1 501 67 , 5 19 , 72 | 2 15 45 , 18 65 , 7 37 | 4 3 8 9 , 13 44 , 58 , 47 | 16 51 64 , 70 | 10 34 53 11 , 24 20 22 , 21 23 | 55 56 57 , 12 | 36 46 , 38 49 50 , 71 | 30 29 54 32 31 33 | 17 26 62 73 , 14 68 | 25 52 60 61 | 40 41 42 , 27 28 35 , 6" position="1" help="false" />

    <input show="true" cmd="true" top="algebra" />

    <dockBar show="true" east="true" />

    </perspective>

    </perspectives>

    <labelingStyle val="0"/>

    <font size="12"/>

    <graphicsSettings javaLatexFonts="false"/>

    </gui>

    <euclidianView>

    <viewNumber viewNo="1"/>

    <size width="263" height="438"/>

    <coordSystem xZero="58.99999999999999" yZero="145.0" scale="49.99999999999998" yscale="49.99999999999999"/>

    <evSettings axes="true" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="0"/>

    <bgColor r="255" g="255" b="255"/>

    <axesColor r="0" g="0" b="0"/>

    <gridColor r="192" g="192" b="192"/>

    <lineStyle axes="1" grid="0"/>

    <axis id="0" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>

    <axis id="1" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>

    </euclidianView>

    <kernel>

    <continuous val="false"/>

    <usePathAndRegionParameters val="true"/>

    <decimals val="2"/>

    <angleUnit val="degree"/>

    <algebraStyle val="0"/>

    <coordStyle val="0"/>

    <angleFromInvTrig val="false"/>

    </kernel>

    <scripting blocked="false" disabled="false"/>

    <construction title="" author="" date="">

    <cascell>

    <cellPair>

    <inputCell>

    <expression value="Solutions[x/(x-1)+2/(x-2)<=(2x^2-6)/(x^2-3x+2)]" eval="Solutions[x / (x - 1) + 2 / (x - 2) ≤ ((2 * x^(2)) - 6) / (x^(2) - (3 * x) + 2)]" evalCmd=""/>

    </inputCell>

    <outputCell>

    <expression value="{x ≤ (-2)}" native="true"/>

    </outputCell>

    </cellPair>

    </cascell>

    <expression label ="f" exp="f(x) = x / (x - 1) + 2 / (x - 2) - ((2 * x^(2)) - 6) / (x^(2) - (3 * x) + 2)"/>

    <element type="function" label="f">

    <show object="true" label="true"/>

    <objColor r="0" g="100" b="0" alpha="0.0"/>

    <layer val="0"/>

    <labelMode val="0"/>

    <animation step="1" speed="1" type="0" playing="false"/>

    <lineStyle thickness="3" type="0" typeHidden="1"/>

    </element>

    <cascell>

    <cellPair>

    <inputCell>

    <expression value="Solutions[(4-x^2)/(x^2-3x+2)<=0]" eval="Solutions[(4 - x^(2)) / (x^(2) - (3 * x) + 2) ≤ 0]" evalCmd=""/>

    </inputCell>

    <outputCell>

    <expression value="{x ≤ (-2), 1 < x ≤ 2, x ≥ 2}" native="true"/>

    </outputCell>

    </cellPair>

    </cascell>

    </construction>

    </geogebra>


    <?xml version="1.0" encoding="utf-8"?>

    <geogebra format="5.0" version="5.0.156.0" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggt...; xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLS...; >

    </geogebra>


    LibraryJavaScript:


    Preferences:

    <?xml version="1.0" encoding="utf-8"?><geogebra format="5.0" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb...; xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLS...; ><gui><window width="800" height="600" /><settings ignoreDocument="false" showTitleBar="true" /><labelingStyle val="0"/><mouse reverseWheel="true"/><font size="12"/><menuFont size="-1"/><tooltipSettings language="" timeout="0"/><graphicsSettings javaLatexFonts="false"/></gui><euclidianView><size width="640" height="480"/><coordSystem xZero="215.0" yZero="315.0" scale="50.0" yscale="50.0"/><evSettings axes="true" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="2" checkboxSize="26" gridType="0"/><bgColor r="255" g="255" b="255"/><axesColor r="0" g="0" b="0"/><gridColor r="192" g="192" b="192"/><lineStyle axes="1" grid="0"/><axis id="0" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true" axisCross="0.0" positiveAxis="false"/><axis id="1" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true" axisCross="0.0" positiveAxis="false"/></euclidianView><kernel><continuous val="false"/><decimals val="2"/><angleUnit val="degree"/><algebraStyle val="0"/><coordStyle val="0"/><localization digits="false" labels="true"/><angleFromInvTrig val="false"/><casSettings timeout="5" expRoots="true"/></kernel><scripting blocked="false"/></geogebra>

Comments (4)

photo
1

Well, lines 6 and 7 of my post should read


gives the almost correct answer {x<=-2, 1<x<=2, x>=2}.


Of course, the correct answer is {x<=-2, 1<x<2, x>2}.


:laughing:

photo
1

Hi, it works better with a polygon form (so 1 and 2 are to delete)

    Solutions[(x/(x-1)+2/(x-2))(x^2-3x+2)sgn(x^2-3x+2)<=sgn(x^2-3x+2)(2x^2-6)]

or

    Solutions[abs(x^2-3x+2)(x/(x-1)+2/(x-2))<=abs(x^2-3x+2)(2x^2-6)/(x^2-3x+2)]

with the answer (cut in 2 ?) :

    {x<=-2,1<=x<=2,x>=2}

photo
1

Fixed for (probably) v610

© 2021 International GeoGebra Institute