       Re: Reduce and Indeterminate

• To: mathgroup at smc.vnet.net
• Subject: [mg87800] Re: Reduce and Indeterminate
• From: dh <dh at metrohm.ch>
• Date: Thu, 17 Apr 2008 06:57:48 -0400 (EDT)
• References: <fu6mb9\$nl0\$1@smc.vnet.net>

```
Hi Szabolcs,

it would certainly be nice and consistent if a message about a invalid

comparison is produced. But we must ask if real harm can be produced

from this result and I think this is possible. Although all arthmetic

operations on Indeterminate give Indeterminate, it is not hard to come

up with a simple example where things go wrong:

f[x_]:=If[Reduce[x>0],"pos","neg","ind"];

Therefore, I think a warning is a must.

Daniel

Szabolcs Horvát wrote:

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

>

>

> Here's a somewhat artificial example:

>

> In:= Integrate[1/x, {x, a, b}]

>

> Out= 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:= First[%]

>

> Out= (-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:= Reduce[% && (a | b) \[Element] Reals]

>

> Out= False

>

> Note that unlike Reduce, FullSimplify gives a warning:

>

> In:= FullSimplify[%%, (a | b) \[Element] Reals]

>

> During evaluation of In:= FullSimplify::infd: Expression (-Im[b] \

> Re[a]+Im[a] Re[b])/(Im[a]-Im[b]) simplified to Indeterminate. >>

>

> Out= Indeterminate >=

>    0 && (Im[a/(-a + b)] != 0 ||

>     Re[a/(a - b)] >= 1 || (a/(a - b) != 0 && Re[a/(-a + b)] >= 0))

>

> In:= Reduce[Rest[%] && (a | b) \[Element] Reals, {a, b}]

>

> Out= (a < 0 && (b < a || a < b <= 0)) || (a >

>      0 && (0 <= b < a || b > a))

>

>

```

• Prev by Date: Re: Re: If Integrate returns no result, can we conclude that no closed-form
• Next by Date: Re: Reduce and Indeterminate
• Previous by thread: Reduce and Indeterminate
• Next by thread: Re: Reduce and Indeterminate