Reduce and Indeterminate
- To: mathgroup at smc.vnet.net
- Subject: [mg87766] Reduce and Indeterminate
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Wed, 16 Apr 2008 22:30:04 -0400 (EDT)
- Organization: University of Bergen
If a complex number appears in an inequality, Reduce issues a warning: Reduce[I > 0] This is useful (to avoid mistakes). But if Indeterminate appears in an inequality, Reduce will immediately say False: Reduce[Indeterminate > 0] While it is debatable what is the correct thing to do mathematically, I naively believe that it would be useful if Reduce at least gave a warning. It is true that it is not a good idea to manipulate expressions completely blindly (without paying attention to what they contain), but some functions may return very large expressions ... and the main advantage of using computers is that they can do large and tedious calculations quickly. What do MathGroup readers think about this? Here's a somewhat artificial example: In[1]:= Integrate[1/x, {x, a, b}] Out[1]= If[(-Im[b] Re[a] + Im[a] Re[b])/(Im[a] - Im[b]) >= 0 && ((Re[a/(-a + b)] >= 0 && a/(-a + b) != 0) || Re[a/(a - b)] >= 1 || Im[a/(-a + b)] != 0), -Log[a] + Log[b], Integrate[1/x, {x, a, b}, Assumptions -> ! ((-Im[b] Re[a] + Im[a] Re[b])/(Im[a] - Im[b]) >= 0 && ((Re[a/(-a + b)] >= 0 && a/(-a + b) != 0) || Re[a/(a - b)] >= 1 || Im[a/(-a + b)] != 0))]] In[2]:= First[%] Out[2]= (-Im[b] Re[a] + Im[a] Re[b])/(Im[a] - Im[b]) >= 0 && ((Re[a/(-a + b)] >= 0 && a/(-a + b) != 0) || Re[a/(a - b)] >= 1 || Im[a/(-a + b)] != 0) In[3]:= Reduce[% && (a | b) \[Element] Reals] Out[3]= False Note that unlike Reduce, FullSimplify gives a warning: In[4]:= FullSimplify[%%, (a | b) \[Element] Reals] During evaluation of In[4]:= FullSimplify::infd: Expression (-Im[b] \ Re[a]+Im[a] Re[b])/(Im[a]-Im[b]) simplified to Indeterminate. >> Out[4]= Indeterminate >= 0 && (Im[a/(-a + b)] != 0 || Re[a/(a - b)] >= 1 || (a/(a - b) != 0 && Re[a/(-a + b)] >= 0)) In[5]:= Reduce[Rest[%] && (a | b) \[Element] Reals, {a, b}] Out[5]= (a < 0 && (b < a || a < b <= 0)) || (a > 0 && (0 <= b < a || b > a))