MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re:: Reduce in Mathematica 5 vs Mathematica 8

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114927] Re:: Reduce in Mathematica 5 vs Mathematica 8
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 23 Dec 2010 03:52:53 -0500 (EST)
  • References: <359276.84917.qm@web26102.mail.ukl.yahoo.com>

On 22 Dec 2010, at 15:20, olfa mraihi wrote:

> Thank you for the information about Reduce.
> Below is an example that I've sent to mathematica mailing list this =
morning:
> Thank you fr your help.
> 
> --- En date de : Mer 22.12.10, olfa <olfa.mraihi at yahoo.fr> a =E9crit :
>
> De: olfa <olfa.mraihi at yahoo.fr>
> Objet: Reduce in Mathematica 5 vs Mathematica 8
> =C0: olfa.mraihi at yahoo.fr
> Date: Mercredi 22 d=E9cembre 2010, 11h09
>
> Hi Mathematica Community,
>
> Knowing that Reduce has'nt been modified in Mathematica 8 why the same
> system that I try to solve with Reduce gives result with Mathematica 5
> but not with Mathematica 8?
>
> Reduce[-y + Log[Log[v]]/Log[2] == -yP + Log[Log[vP]]/Log[2] &&   yP ==
> y + Floor[Log[x]/Log[2]], {yP, vP}, Backsubstitution -> True]
>
> Thank you very much.
>

I checked the answer that Mathematica 5.2. The solution that you get is this:

Reduce[-y + Log[Log[v]]/Log[2] == -yP + Log[Log[vP]]/Log[2] && yP ==
 y + Floor[Log[x]/Log[2]],
  {yP, vP}, Backsubstitution -> True]


(E^-Re[K$335[1]]==0&&-Log[2] =
Im[Floor[Log[x]/Log[2]]]-\[Pi]<Im[Log[Log[v]]]<=\[Pi]-Im[Floor[Log[x]/Log[2]]] =
Log[2]&&yP==y+Floor[Log[x]/Log[2]]&&vP==v^2^Floor[Log[x]/Log[2]])||(E^Re[K$335[1]]>0&&-E^Re[K$335[1]] =
\[Pi]<=Sin[Im[K$335[1]]]<E^Re[K$335[1]] =
\[Pi]&&E^-Re[K$335[1]]>0&&-Log[2] =
Im[Floor[Log[x]/Log[2]]]-\[Pi]<Im[Log[Log[v]]]<=\[Pi]-Im[Floor[Log[x]/Log[2]]] =
Log[2]&&yP==y+Floor[Log[x]/Log[2]]&&vP==v^2^Floor[Log[x]/Log[2]])||(E^Re[K$335[1]]<0&&E^Re[K$335[1]] =
\[Pi]<Sin[Im[K$335[1]]]<=-E^Re[K$335[1]] =
\[Pi]&&E^-Re[K$335[1]]<0&&-Log[2] =
Im[Floor[Log[x]/Log[2]]]-\[Pi]<Im[Log[Log[v]]]<=\[Pi]-Im[Floor[Log[x]/Log[2]]] Log[2]&&yP==y+Floor[Log[x]/Log[2]]&&vP==v^2^Floor[Log[x]/Log[2]])

It seems to me that the whole expression is complete nonsense. It =
contains lots of obviously nonsensical expressions such as:

(E^(-Re[K$335[1]]) == 0

how can E to any power by 0? And what is the meaning of K$335[1]?

and what about inequalities involving complex numbers such as:

-Log[2] Im[Floor[Log[x]/Log[2]]] - \[Pi] <
 Im[Log[Log[v]]] <= \[Pi] - Im[Floor[Log[x]/Log[2]]] Log[2]

How can an imaginary quantity Im[Log[Log[v]]] be smaller or greater than 
another imaginary quantity?
As I wrote above,  whole thing is just a lot of nonsense and I don't =
think a lot of nonsense is a better answer than not giving any answer.


In fact your equation problem requires doing this:

Reduce[Log[Log[v]] == A, v]

But Reduce cannot do this either in Mathematica 5.2 or Mathematica 8. =
The reason for that is that Reduce has to give a complete answer which =
it cannot do in this case. However, if you do not need a complete answer =
Solve can do this:

 Solve[Log[Log[v]] == A, v]

{{v -> E^E^A}}

So this suggest that, if you do not need a complete solution, you can =
just use Solve in your equation to get:

Solve[-y + Log[Log[v]]/Log[2] == -yP + Log[Log[vP]]/Log[2] && yP ===
 y + Floor[Log[x]/Log[2]], {yP, vP}]

{{yP -> Floor[Log[x]/Log[2]] + y, vP -> v^2^Floor[Log[x]/Log[2]]}}

except that (and here there seems to be a bug in Mathematica 8) this =
works in Mathematica 7 but not in Mathematica 8.

In Mathematica 8 we get:

 Solve[-y + Log[Log[v]]/Log[2] == -yP + Log[Log[vP]]/Log[2] && yP ===
 y + Floor[Log[x]/Log[2]], {yP, vP}]

 During evaluation of In[1]:= Solve::nsmet:This system cannot be =
solved with the methods available to Solve.

Solve[Log[Log[v]]/Log[2] - y == Log[Log[vP]]/Log[2] - yP && yP == =
Floor[Log[x]/Log[2]] + y, {yP, vP}]

Why is that? Well, it seems that in Mathematica 8 Solve behaves rather =
like Reduce and attempts to give a "conditional" answer in such cases, =
which it can't even do this:

Solve[Log[Log[vP]] == Floor[Log[x]/Log[2]], vP]

 During evaluation of In[8]:= Solve::nsmet:This system cannot be =
solved with the methods available to Solve. >>

Solve[Log[Log[vP]] == Floor[Log[x]/Log[2]], vP]


This is easily dealt with by Solve in Mathematica 7. The only way to get =
around this in Mathematica 7 seems to me to be

Solve[Log[Log[vP]] == Floor[Log[x]], vP, Method -> "Legacy"]

{{vP -> E^E^Floor[Log[x]]}}

which isn't really satisfactory. I am inclined to treat this as a bug, =
unless persuaded otherwise...


Andrzej Kozlowski




  • Prev by Date: Re: need help with CUDA setup on my MacBook Pro
  • Next by Date: Re: The size of image output
  • Previous by thread: Reduce in Mathematica 5 vs Mathematica 8
  • Next by thread: Re: Reduce in Mathematica 5 vs Mathematica 8