<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Phantom solution to linear inequalities using solve</title>
    <link>http://www.mapleprimes.com/questions/142780-Phantom-Solution-To-Linear-Inequalities</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 12:04:21 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 12:04:21 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Phantom solution to linear inequalities using solve</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Phantom solution to linear inequalities using solve</title>
      <link>http://www.mapleprimes.com/questions/142780-Phantom-Solution-To-Linear-Inequalities</link>
    </image>
    <item>
      <title>Variant</title>
      <link>http://www.mapleprimes.com/questions/142780-Phantom-Solution-To-Linear-Inequalities?ref=Feed:MaplePrimes:Phantom solution to linear inequalities using solve:Comments#answer142781</link>
      <itunes:summary>&lt;p&gt;The solution will be correct, if we write&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;solve({ a + b = 1, a &amp;gt; 0, b &amp;gt; 1/2}, {a,b,c}) &amp;nbsp;assuming &amp;nbsp;c&amp;gt;0;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{a = -b+1, c = c, 1/2 &amp;lt; b, b &amp;lt; 1}&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;The solution will be correct, if we write&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;solve({ a + b = 1, a &amp;gt; 0, b &amp;gt; 1/2}, {a,b,c}) &amp;nbsp;assuming &amp;nbsp;c&amp;gt;0;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{a = -b+1, c = c, 1/2 &amp;lt; b, b &amp;lt; 1}&lt;/p&gt;</description>
      <guid>142781</guid>
      <pubDate>Wed, 30 Jan 2013 00:39:59 Z</pubDate>
      <itunes:author>Kitonum</itunes:author>
      <author>Kitonum</author>
    </item>
    <item>
      <title>Well, that seems to fix that simple example.&amp;nbsp;</title>
      <link>http://www.mapleprimes.com/questions/142780-Phantom-Solution-To-Linear-Inequalities?ref=Feed:MaplePrimes:Phantom solution to linear inequalities using solve:Comments#answer142783</link>
      <itunes:summary>&lt;p&gt;Well, that seems to fix that simple example.&amp;nbsp; How does one work in general?&amp;nbsp; I have a routine which generates linear equalites and inequalities and I want to see if there are any solutions.&amp;nbsp; The following should give no solutions&lt;/p&gt;
&lt;pre&gt;&amp;nbsp; solve([0 &amp;lt; 2*f[1], 5 &amp;lt; f[1]+f[2], 8 &amp;lt; f[1]+f[3], f[1]+f[4] = 7, 0 &amp;lt; 2*f[2], f[2]+f[3] = 6, 
    6 &amp;lt; f[2]+f[4], 0 &amp;lt; 2*f[3], 11/2 &amp;lt; f[3]+f[4], 0 &amp;lt; 2*f[4]],{f[1],f[2],f[3],f[4]});&lt;/pre&gt;
&lt;p&gt;But gives&lt;/p&gt;
&lt;p&gt;&lt;code&gt;{f[1] = 7-f[4], f[2] = 6-f[3], f[3] = f[3], f[4] = f[4]}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Rewriting as you suggest&lt;/p&gt;
&lt;pre&gt;&amp;nbsp; solve([ 5 &amp;lt; f[1]+f[2], 8 &amp;lt; f[1]+f[3], f[1]+f[4] = 7, f[2]+f[3] = 6, 
               6 &amp;lt; f[2]+f[4],11/2 &amp;lt; f[3]+f[4]])&amp;nbsp; 
      assuming And(f[1]&amp;gt;0,f[2]&amp;gt;0,f[3]&amp;gt;0,f[4]&amp;gt;0);&lt;/pre&gt;
&lt;p&gt;gives the same wrong answer.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Well, that seems to fix that simple example.&amp;nbsp; How does one work in general?&amp;nbsp; I have a routine which generates linear equalites and inequalities and I want to see if there are any solutions.&amp;nbsp; The following should give no solutions&lt;/p&gt;
&lt;pre&gt;&amp;nbsp; solve([0 &amp;lt; 2*f[1], 5 &amp;lt; f[1]+f[2], 8 &amp;lt; f[1]+f[3], f[1]+f[4] = 7, 0 &amp;lt; 2*f[2], f[2]+f[3] = 6, 
    6 &amp;lt; f[2]+f[4], 0 &amp;lt; 2*f[3], 11/2 &amp;lt; f[3]+f[4], 0 &amp;lt; 2*f[4]],{f[1],f[2],f[3],f[4]});&lt;/pre&gt;
&lt;p&gt;But gives&lt;/p&gt;
&lt;p&gt;&lt;code&gt;{f[1] = 7-f[4], f[2] = 6-f[3], f[3] = f[3], f[4] = f[4]}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Rewriting as you suggest&lt;/p&gt;
&lt;pre&gt;&amp;nbsp; solve([ 5 &amp;lt; f[1]+f[2], 8 &amp;lt; f[1]+f[3], f[1]+f[4] = 7, f[2]+f[3] = 6, 
               6 &amp;lt; f[2]+f[4],11/2 &amp;lt; f[3]+f[4]])&amp;nbsp; 
      assuming And(f[1]&amp;gt;0,f[2]&amp;gt;0,f[3]&amp;gt;0,f[4]&amp;gt;0);&lt;/pre&gt;
&lt;p&gt;gives the same wrong answer.&lt;/p&gt;</description>
      <guid>142783</guid>
      <pubDate>Wed, 30 Jan 2013 01:32:17 Z</pubDate>
      <itunes:author>Simon Willerton</itunes:author>
      <author>Simon Willerton</author>
    </item>
    <item>
      <title>By LinearMultivariateSystem command</title>
      <link>http://www.mapleprimes.com/questions/142780-Phantom-Solution-To-Linear-Inequalities?ref=Feed:MaplePrimes:Phantom solution to linear inequalities using solve:Comments#answer142786</link>
      <itunes:summary>&lt;p&gt;This works:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;form name="worksheet_form"&gt;
&lt;table style="width: 576px;" align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="left"&gt;&lt;img style="vertical-align: -41;" src="/view.aspx?sf=142786/452578/dddf2da29d7220afec30a5daebb9143b.gif" alt="with(SolveTools[Inequality]):" width="576" height="58" align="middle"&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr valign="baseline"&gt;
&lt;td&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="center"&gt;&lt;img style="vertical-align: -6;" src="/view.aspx?sf=142786/452578/baed9256f96f803555d31bf930588ea9.gif" alt="{}" width="23" height="23"&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="color: #000000; font-family: Times, serif; font-weight: bold; font-style: normal;" align="right"&gt;(1)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="left"&gt;&lt;img style="vertical-align: -43;" src="/view.aspx?sf=142786/452578/166dda8a3e311d7981be1c56456869c0.gif" alt="LinearMultivariateSystem({f1+f4 = 7, f2+f3 = 6, 0 &amp;lt; 2*f1, 0 &amp;lt; 2*f2, 0 &amp;lt; 2*f3, 0 &amp;lt; 2*f4, 5 &amp;lt; f1+f2, 6 &amp;lt; f2+f4, 8 &amp;lt; f1+f3, 11/2 &amp;lt; f3+f4}, {f1, f2, f3, f4});" width="576" height="60" align="middle"&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr valign="baseline"&gt;
&lt;td&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="center"&gt;&lt;img style="vertical-align: -6;" src="/view.aspx?sf=142786/452578/b4b7e46beef9f7438da374cc64c9e301.gif" alt="{[{f1, f2}, {f3 = -f2+6}, {f4 = 7-f1}]}" width="268" height="23"&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="color: #000000; font-family: Times, serif; font-weight: bold; font-style: normal;" align="right"&gt;(2)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="left"&gt;&lt;img style="vertical-align: -6;" src="/view.aspx?sf=142786/452578/778aa4312b5678a7d432ac162a26117a.gif" alt="``" width="11" height="23"&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;input type="hidden" name="sequence" value="1"&gt; &lt;input type="hidden" name="cmd" value="none"&gt;&lt;/form&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=142786/452578/LMS.mw"&gt;Download LMS.mw&lt;/a&gt; See &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=SolveTools/Inequality"&gt;?SolveTools/Inequality&lt;/a&gt; for more info.&lt;/p&gt;
&lt;p&gt;PS. The notation fk is preferable over f[k].&lt;/p&gt;
&lt;p&gt;PPS. Relation (2) is not true.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;This works:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;form name="worksheet_form"&gt;
&lt;table style="width: 576px;" align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="left"&gt;&lt;img style="vertical-align: -41;" src="/view.aspx?sf=142786/452578/dddf2da29d7220afec30a5daebb9143b.gif" alt="with(SolveTools[Inequality]):" width="576" height="58" align="middle"&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr valign="baseline"&gt;
&lt;td&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="center"&gt;&lt;img style="vertical-align: -6;" src="/view.aspx?sf=142786/452578/baed9256f96f803555d31bf930588ea9.gif" alt="{}" width="23" height="23"&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="color: #000000; font-family: Times, serif; font-weight: bold; font-style: normal;" align="right"&gt;(1)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="left"&gt;&lt;img style="vertical-align: -43;" src="/view.aspx?sf=142786/452578/166dda8a3e311d7981be1c56456869c0.gif" alt="LinearMultivariateSystem({f1+f4 = 7, f2+f3 = 6, 0 &amp;lt; 2*f1, 0 &amp;lt; 2*f2, 0 &amp;lt; 2*f3, 0 &amp;lt; 2*f4, 5 &amp;lt; f1+f2, 6 &amp;lt; f2+f4, 8 &amp;lt; f1+f3, 11/2 &amp;lt; f3+f4}, {f1, f2, f3, f4});" width="576" height="60" align="middle"&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr valign="baseline"&gt;
&lt;td&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="center"&gt;&lt;img style="vertical-align: -6;" src="/view.aspx?sf=142786/452578/b4b7e46beef9f7438da374cc64c9e301.gif" alt="{[{f1, f2}, {f3 = -f2+6}, {f4 = 7-f1}]}" width="268" height="23"&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="color: #000000; font-family: Times, serif; font-weight: bold; font-style: normal;" align="right"&gt;(2)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="margin: 0 0 0 0; padding-top: 0px; padding-bottom: 0px;" align="left"&gt;&lt;img style="vertical-align: -6;" src="/view.aspx?sf=142786/452578/778aa4312b5678a7d432ac162a26117a.gif" alt="``" width="11" height="23"&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;input type="hidden" name="sequence" value="1"&gt; &lt;input type="hidden" name="cmd" value="none"&gt;&lt;/form&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=142786/452578/LMS.mw"&gt;Download LMS.mw&lt;/a&gt; See &lt;a href="http://www.maplesoft.com/support/help/search.aspx?term=SolveTools/Inequality"&gt;?SolveTools/Inequality&lt;/a&gt; for more info.&lt;/p&gt;
&lt;p&gt;PS. The notation fk is preferable over f[k].&lt;/p&gt;
&lt;p&gt;PPS. Relation (2) is not true.&lt;/p&gt;</description>
      <guid>142786</guid>
      <pubDate>Wed, 30 Jan 2013 01:39:22 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
    <item>
      <title>SolveTools:-SemiAlgebraic</title>
      <link>http://www.mapleprimes.com/questions/142780-Phantom-Solution-To-Linear-Inequalities?ref=Feed:MaplePrimes:Phantom solution to linear inequalities using solve:Comments#answer142789</link>
      <itunes:summary>&lt;p&gt;In 16.01 on 64bit Linux on an Intel i5, after about 5 minutes,&lt;/p&gt;
&lt;pre&gt;SolveTools:-SemiAlgebraic({f1+f2 = 5, f3+f4 = 11/2,&lt;br&gt; 0 &amp;lt;f1, 0 &amp;lt; f2, 0 &amp;lt; f3, 0 &amp;lt; f4,&lt;br&gt; 6 &amp;lt; f2+f3, 6 &amp;lt; f2+f4,&lt;br&gt; 7 &amp;lt; f1+f4, 8 &amp;lt; f1+f3},&lt;br&gt; [f1,f2,f3,f4]);&lt;br&gt;&lt;br&gt; []&lt;/pre&gt;
&lt;p&gt;which, with [] as output, means no solutions.&lt;/p&gt;
&lt;p&gt;More quickly,&lt;/p&gt;
&lt;pre&gt;SolveTools:-SemiAlgebraic({ a + b = 1, a &amp;gt; 0, b &amp;gt; 1, c &amp;gt; 0 }, {a,b,c});&lt;br&gt;&lt;br&gt; []&lt;/pre&gt;
&lt;p&gt;However, the computation time grows quickly with problem size, for this approach.&lt;/p&gt;
&lt;p&gt;The `solve` command is using an older, faster, and buggier algorithm here.&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;In 16.01 on 64bit Linux on an Intel i5, after about 5 minutes,&lt;/p&gt;
&lt;pre&gt;SolveTools:-SemiAlgebraic({f1+f2 = 5, f3+f4 = 11/2,&lt;br&gt; 0 &amp;lt;f1, 0 &amp;lt; f2, 0 &amp;lt; f3, 0 &amp;lt; f4,&lt;br&gt; 6 &amp;lt; f2+f3, 6 &amp;lt; f2+f4,&lt;br&gt; 7 &amp;lt; f1+f4, 8 &amp;lt; f1+f3},&lt;br&gt; [f1,f2,f3,f4]);&lt;br&gt;&lt;br&gt; []&lt;/pre&gt;
&lt;p&gt;which, with [] as output, means no solutions.&lt;/p&gt;
&lt;p&gt;More quickly,&lt;/p&gt;
&lt;pre&gt;SolveTools:-SemiAlgebraic({ a + b = 1, a &amp;gt; 0, b &amp;gt; 1, c &amp;gt; 0 }, {a,b,c});&lt;br&gt;&lt;br&gt; []&lt;/pre&gt;
&lt;p&gt;However, the computation time grows quickly with problem size, for this approach.&lt;/p&gt;
&lt;p&gt;The `solve` command is using an older, faster, and buggier algorithm here.&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</description>
      <guid>142789</guid>
      <pubDate>Wed, 30 Jan 2013 02:39:57 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>Mathematica</title>
      <link>http://www.mapleprimes.com/questions/142780-Phantom-Solution-To-Linear-Inequalities?ref=Feed:MaplePrimes:Phantom solution to linear inequalities using solve:Comments#answer142792</link>
      <itunes:summary>&lt;p&gt;To solve these problems, use Mathematica rather than Maple:&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;Reduce[{0 &amp;lt; 2*f[1], 5 &amp;lt; f[1] + f[2], 8 &amp;lt; f[1] + f[3], &lt;/strong&gt;&lt;br&gt;&lt;strong&gt; f[1] + f[4] == 7, 0 &amp;lt; 2*f[2], f[2] + f[3] == 6, 6 &amp;lt; f[2] + f[4], &lt;/strong&gt;&lt;br&gt;&lt;strong&gt; 0 &amp;lt; 2*f[3], 11/2 &amp;lt; f[3] + f[4], 0 &amp;lt; 2*f[4]}, {f[1], f[2], f[3], &lt;/strong&gt;&lt;br&gt;&lt;strong&gt; f[4]}]&lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;/pre&gt;
&lt;pre&gt;                                         False&amp;nbsp;&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;To solve these problems, use Mathematica rather than Maple:&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;Reduce[{0 &amp;lt; 2*f[1], 5 &amp;lt; f[1] + f[2], 8 &amp;lt; f[1] + f[3], &lt;/strong&gt;&lt;br&gt;&lt;strong&gt; f[1] + f[4] == 7, 0 &amp;lt; 2*f[2], f[2] + f[3] == 6, 6 &amp;lt; f[2] + f[4], &lt;/strong&gt;&lt;br&gt;&lt;strong&gt; 0 &amp;lt; 2*f[3], 11/2 &amp;lt; f[3] + f[4], 0 &amp;lt; 2*f[4]}, {f[1], f[2], f[3], &lt;/strong&gt;&lt;br&gt;&lt;strong&gt; f[4]}]&lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;/pre&gt;
&lt;pre&gt;                                         False&amp;nbsp;&lt;/pre&gt;</description>
      <guid>142792</guid>
      <pubDate>Wed, 30 Jan 2013 02:47:37 Z</pubDate>
      <itunes:author>Kitonum</itunes:author>
      <author>Kitonum</author>
    </item>
    <item>
      <title>Splitting in eqs and ineqs</title>
      <link>http://www.mapleprimes.com/questions/142780-Phantom-Solution-To-Linear-Inequalities?ref=Feed:MaplePrimes:Phantom solution to linear inequalities using solve:Comments#answer142793</link>
      <itunes:summary>&lt;p&gt;The following works on your longer example (as well as on your simple one):&lt;/p&gt;
&lt;p&gt;restart;&lt;br&gt;sys:=[0 &amp;lt; 2*f[1], 5 &amp;lt; f[1]+f[2], 8 &amp;lt; f[1]+f[3], f[1]+f[4] = 7, 0 &amp;lt; 2*f[2], f[2]+f[3] = 6, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6 &amp;lt; f[2]+f[4], 0 &amp;lt; 2*f[3], 11/2 &amp;lt; f[3]+f[4], 0 &amp;lt; 2*f[4]];&lt;br&gt;var:={f[1],f[2],f[3],f[4]};&lt;br&gt;#Splitting:&lt;br&gt;eqs,ineqs:=selectremove(type,sys,`=`);&lt;br&gt;solve(eqs,var);&lt;br&gt;subs(%,ineqs);&lt;br&gt;solve(%,indets(%,name));&lt;br&gt;#Output NULL as is correct in this case.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;The following works on your longer example (as well as on your simple one):&lt;/p&gt;
&lt;p&gt;restart;&lt;br&gt;sys:=[0 &amp;lt; 2*f[1], 5 &amp;lt; f[1]+f[2], 8 &amp;lt; f[1]+f[3], f[1]+f[4] = 7, 0 &amp;lt; 2*f[2], f[2]+f[3] = 6, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6 &amp;lt; f[2]+f[4], 0 &amp;lt; 2*f[3], 11/2 &amp;lt; f[3]+f[4], 0 &amp;lt; 2*f[4]];&lt;br&gt;var:={f[1],f[2],f[3],f[4]};&lt;br&gt;#Splitting:&lt;br&gt;eqs,ineqs:=selectremove(type,sys,`=`);&lt;br&gt;solve(eqs,var);&lt;br&gt;subs(%,ineqs);&lt;br&gt;solve(%,indets(%,name));&lt;br&gt;#Output NULL as is correct in this case.&lt;/p&gt;</description>
      <guid>142793</guid>
      <pubDate>Wed, 30 Jan 2013 03:05:56 Z</pubDate>
      <itunes:author>Preben Alsholm</itunes:author>
      <author>Preben Alsholm</author>
    </item>
  </channel>
</rss>