Re: different output!!
- To: mathgroup at smc.vnet.net
- Subject: [mg97022] Re: different output!!
- From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
- Date: Mon, 2 Mar 2009 05:22:58 -0500 (EST)
- References: <godm3n$46c$1@smc.vnet.net>
It seems correct to me. Please note that Mod[x,5] is not necessarily
integer and therefore not countable if x is a real whereas it is
countable when x is an integer. Reduce does a fine job here.
Cheers -- Sjoerd
On Mar 1, 11:56 am, olfa <olfa.mra... at yahoo.fr> wrote:
> Hi Mathematica community,
> Why output2 (with integers as domain) is different from output1 (with
> reals as domain) ?!! I think it should be the same thing.
>
> input1:Reduce[{Mod[x, 5] == Mod[xP, 5], 0 <= xP < 5}, {xP}, Reals,
> Backsubstitution -> True]
>
> output1: 0 <= Mod[x, 5] < 5 && xP == Mod[x, 5]
>
> input2:Reduce[{Mod[x, 5] == Mod[xP, 5], 0 <= xP < 5}, {xP}, Integer=
s,
> Backsubstitution -> True]
>
> output2: (Mod[x, 5] == 0 && xP == 0) || (Mod[x, 5] == 1 &&
> xP == 1) || (Mod[x, 5] == 2 && xP == 2) || (Mod[x, 5] =
== 3 &&
> xP == 3) || (Mod[x, 5] == 4 && xP ==
> 4)