       Re: The domain parameter of Reduce[]

• To: mathgroup at smc.vnet.net
• Subject: [mg124180] Re: The domain parameter of Reduce[]
• Date: Wed, 11 Jan 2012 17:23:23 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201201101059.FAA27797@smc.vnet.net> <E9C5C418-1769-4B02-9F9D-51DE21A131B8@mimuw.edu.pl>

```Andrzej Kozlowski wrote:
> On 10 Jan 2012, at 11:59, Szabolcs wrote:
>
>> My question if motivated by
>> http://stackoverflow.com/questions/8780068/mathematica-finding-the-conditions-for-the-real-part-of-a-complex-number-to-be
>>
>>
>> It seems that
>>
>> Reduce[{ComplexExpand@Re[-1 - Sqrt[a - b] ] < 0, a > 0, b > 0}, {a,
>> b}, Complexes]
>>
>> will return a different result from
>>
>> Reduce[{ComplexExpand@Re[-1 - Sqrt[a - b] ] < 0, a > 0, b > 0}, {a,
>> b}]
>>
>> Also the result of this latter calculation seems incorrect (I
>> didn't expect 'b' to be restricted to be less than 'a')
>>
>> How does the domain parameter of Reduce work?  Isn't Complexes the
>> default domain?  What changes if we specify Complexes explicitly?
>> Also, if the result of the second example incorrect (a bug)?
>>
>
>
> There is something pretty fishy here, I would say.
>
>
> Reduce uses the following principle: everything appearing on an
> algebraic level in an inequality will be assumed to be real,unless
> the domain Complexes is used.
>
>
> Consider first both expressions without ComplexExpand:
>
> In:= Reduce[{Re[-1 - Sqrt[a - b]] < 0, a > 0, b > 0}, {a, b}]
>
> a > 0 && (b >= a || 0 < b < a)
>
> Reduce[{Re[-1 - Sqrt[a - b]] < 0, a > 0, b > 0}, {a, b}, Complexes]
>
> a > 0 && (b >= a || 0 < b < a)
>
> The answers are identical and both are actually equivalent to the
> given assumption a>0&&b>0. Reduce did not assume that Sqrt[a-b] is
> real because of the presence of Re (this is what is mean by
> "algebraic level": Re[x] is not "algebraic"). Now consider:
>
> ComplexExpand@Re[-1 - Sqrt[a - b]]
>
> -1 - ((a - b)^2)^(1/4) Cos[1/2 Arg[a - b]]
>
> Now there is no Re here and ((a - b)^2)^(1/4) is algebraic. So it
> will be assumed to be real. But this assumption, of course,  does not
> entail that a>=b. Yet Reduce seems to  think that it does:
>
> Reduce[{-1 - ((a - b)^2)^(1/4) Cos[1/2 Arg[a - b]] < 0, a > 0, b >
> 0}, {a, b}]
>
> a > 0 && 0 < b <= a
>
> As one would expect, with the domain Complexes it no longer assumes
> that:
>
> Reduce[{-1 - ((a - b)^2)^(1/4) Cos[1/2 Arg[a - b]] < 0, a > 0, b >
> 0}, {a, b}, Complexes]
>
> a > 0 && b > 0
>
> The first behaviour would not, perhaps, be surprising if the
> expression was
>
> Reduce[{-1 - ((a - b)^(1/4))^2  Cos[1/2 Arg[a - b]] < 0, a > 0, b >
> 0}, {a, b}]
>
> a > 0 && 0 < b <= a
>
> for this time indeed the expression (a - b)^(1/4) is real only if
> a>=b. But the really curious thing is that if you remove the
> requirement that a and b be positive you get:
>
>
> Reduce[{-1 - ((a - b)^2)^(1/4) Cos[1/2 Arg[a - b]] < 0}, {a, b}]
>
> (a | b) \[Element] Reals
>
> Reduce[{-1 - ((a - b)^(1/4))^2 Cos[1/2 Arg[a - b]] < 0}, {a, b}]
>
> (a | b) \[Element] Reals
>
> Now that's really odd, since this case clearly includes the previous
> one as a sub-case. So if the inequality holds for all real a and b,
> it also holds for all positive a and b?
>
> Andrzej Kozlowski
>
>
>
>

This is a bug. A transformation produces a disjunction term involving
Sec[Arg[a - b]/2], and the requirement that Sec[Arg[a - b]/2] be real
valued gets applied to a too wide context. It will be fixed in the next
release of Mathematica.

Best regards,