0
$\begingroup$

This question already has an answer here:

I seriously need help for my research. I need to solve an inequality with several assumptions. I tried many times with Reduce but it did not work out properly. Sometimes the results I get are simply wrong or I encounter inconsistencies like Mathematica telling me that the result is neither positive nor equal to zero but only negative under certain assumptions. (though I assumed that all variables are in the Reals). It is of high importance that I use Mathematica correctly, because if I can't trust my results I can't publish them. What I need to do is the following: I need to know if either:

-(2*F*T-2*r*F-m)/((2*r-2)FT+(2*c-2*m)*r+2*m-2*c)-(((2*r-2)*F+m)/((2*r-2)*F+(2*c-2*m)*r+2*m-2*c))>0

or

-(2*F*T-2*r*F-m)/((2*r-2)FT+(2*c-2*m)*r+2*m-2*c)-(((2*r-2)*F+m)/((2*r-2)*F+(2*c-2*m)*r+2*m-2*c))<0

or

-(2*F*T-2*r*F-m)/((2*r-2)FT+(2*c-2*m)*r+2*m-2*c)-(((2*r-2)*F+m)/((2*r-2)*F+(2*c-2*m)*r+2*m-2*c))==0

under the following assumptions:

0 < a <= 1/2 && m > 0 && 0 <= T < 1 && 0 <= d <= 1 && F > 0 &&
0 < r < 1 && c >= 0 && a [Element] Reals && T [Element] Reals && d [Element] Reals && F [Element] Reals && r [Element] Reals && m [Element] Reals && c [Element] Reals && m > c && -2 c + m - 2 F r > 0

or in other terms if -(2*F*T-2*r*F-m)/((2*r-2)FT+(2*c-2*m)*r+2*m-2*c) is bigger, smaller or equal to ((2*r-2)*F+m)/((2*r-2)*F+(2*c-2*m)*r+2*m-2*c) or under which additional assumptions this is the case. (Above I subtracted the second from the first)

Until now I always tried to work with the following:

LogicalExpand@
 FullSimplify[$Assumptions = 
       0 < a <= 1/2 && m > 0 && 0 <= T < 1 && 0 <= d <= 1 && F > 0 &&  
        0 < r < 1 && c >= 0 && a ∈ Reals && T ∈ Reals && 
        d ∈ Reals && F ∈ Reals && r ∈ Reals && 
        m ∈ Reals && c ∈ Reals && 
        m > c && -2 c + m - 2 F r >= 0; 
      Reduce[-(2*F*T - 2*r*F - m)/((2*r - 2)*F*T + (2*c - 2*m)*r + 2*m - 
             2*c) - (((2*r - 2)*F + m)/((2*r - 2)*F + (2*c - 2*m)*r + 
              2*m - 2*c)) > 0 && $Assumptions]]
(* (c + F < m && 2 (c + F r) < m) || (c + F > m && m < c + F T &&
    2 (c + F r) < m) || 2 (c + F) <= m *)

LogicalExpand@
 FullSimplify[$Assumptions = 
       0 < a <= 1/2 && m > 0 && 0 <= T < 1 && 0 <= d <= 1 && F > 0 &&  
        0 < r < 1 && c >= 0 && a ∈ Reals && T ∈ Reals && 
        d ∈ Reals && F ∈ Reals && r ∈ Reals && 
        m ∈ Reals && c ∈ Reals && 
        m > c && -2 c + m - 2 F r >= 0; 
      Reduce[-(2*F*T - 2*r*F - m)/((2*r - 2)*F*T + (2*c - 2*m)*r + 2*m - 
             2*c) - (((2*r - 2)*F + m)/((2*r - 2)*F + (2*c - 2*m)*r + 
              2*m - 2*c)) < 0 && $Assumptions]]
(* c + F > m && 2 (c + F r) < m && c + F T < m *)

LogicalExpand@
 FullSimplify[$Assumptions = 
       0 < a <= 1/2 && m > 0 && 0 <= T < 1 && 0 <= d <= 1 && F > 0 &&  
        0 < r < 1 && c >= 0 && a ∈ Reals && T ∈ Reals && 
        d ∈ Reals && F ∈ Reals && r ∈ Reals && 
        m ∈ Reals && c ∈ Reals && 
        m > c && -2 c + m - 2 F r >= 0; 
      Reduce[-(2*F*T - 2*r*F - m)/((2*r - 2)*F*T + (2*c - 2*m)*r + 2*m - 
             2*c) - (((2*r - 2)*F + m)/((2*r - 2)*F + (2*c - 2*m)*r + 
              2*m - 2*c)) == 0 && $Assumptions]]
(* (2 (c + F r) == m && 2 r > 1) || (2 r == 1 && 
   2 (c + F r) == m && F < m) || (2 (c + F r) == m && 
   m + 2 F r > 2 F && 2 r < 1) || (2 (c + F r) == m && 2 r < 1 && 
   m + 2 F r < 2 F && 2 F T != m + 2 F r) *)

Though, trough other trials of solving with other programs and by the pure logic of my model I believe to know that these results are wrong under my assumptions. Mathematica says that the term can also be negative under certain assumptions. But I know in my model and under this assumptions it should be impossible. I also found a clearly contradicting result when solving by hand. And sometimes Mathematica is even contridicting itself when I try to get deeper into it. I believe that Reduce does not use my assumptions properly. Now in this case I believe to know that Mathematica is wrong but I will have to do similar calculations with other terms in the future where I cannot predict results anymore, so it is very important for me to have a code that works properly also for the later phase of my calculations. So I need a general way to solve this problem properly not only for this case. I really hope someone can help me out here. Thanks beforehand.

$\endgroup$

marked as duplicate by MarcoB, user9660, Jens, C. E., dr.blochwave Oct 18 '15 at 19:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    $\begingroup$ Is this not essentially the same question that you already asked before? See: How to properly interpret a seemingly contradictory result in Mathematica? $\endgroup$ – MarcoB Jul 3 '15 at 17:09
  • $\begingroup$ It is maybe very much in line with the one before but definitely not the same. Here I ask for a general way to calculate the problem correctly. To find a way that Mathematica does not give me seemingly wrong outputs anymore. Before I just wondered how a contradiction like this could happen. And furthermore the best answer showed me (If I understood right) that there are actually no cases for which the term got negative, but not why Mathematica gave me this output in the first place and not how to write my code better in order to avoid this. See, I need clearcut results, ergo a clear method. $\endgroup$ – Researcher Jul 3 '15 at 17:25
  • $\begingroup$ See, this time I ask for the correct code to avoid inconsistencies. Cause else it gets difficult for me to go on with my research. Before it was asking what went wrong but not how the correct code actually should be. I think I really lack the right code and it is not sufficient for me always to check if the set of assumptions is actually empty further on, but I need to have a method that is always correct and can also give me correct results in cases where it is not clearcut as it is here. I'm sorry that I could not get over my problem til now, but I need more help. $\endgroup$ – Researcher Jul 3 '15 at 17:32