[Date Index] [Thread Index] [Author Index]
Re: it isn't strange?!
On 2 Feb., 12:06, olfa <olfa.mra... at yahoo.fr> wrote: > Hi Mathematica community, > > here is my pb: > > input: > Reduce[Max[a, b] == Max[c, d], c, Reals] > output: > (d < Max[a, b] && c == Max[a, b]) || (d == Max[a, b] && c <= Max[a, > b]) > > when testing this output with 2 initialisations: > d = 2 a = 4 b = 3 c = 6 here d < Max[4, 3] but c i= s not equal to > Max[4, 3] > > d = 4 a = 4 b = 3 c = 6 here d = Max[4, 3] but = c is not <= to > Max[4, 3] > > where is the pb?! You are asking Mathematica to reduce the relation Max[a,b]==Max[c,d] which it does correctly. You then wonder why the numbers a=4,b=3 (Which gives Max[4,3]=4) and c=6,d=2 (which have Max[6,2]=6) don't follow the result. Well 4!=6. That is, for your chosen a,b,c,d it is not true that Max[a,b]=Max[c,d]. So the numbers you "test" with don't follow the inequality, so naturally the reduction doesn't either. If you want to test the reduced relations you have to chose a set of number for which relation actually holds. That means that the largest number of a and b has to be equal to the largest number in c,d.