7.93 bug in invphi, Maple V.3 to Maple 8 (20.6.02)

7.93.1 Neil J. A. Sloane

Is this a known bug?

FRY$ maple 
    |\^/|     Maple 6 (SGI MIPS UNIX) 
._|\|   |/|_. Copyright (c) 2000 by Waterloo Maple Inc. 
 \  MAPLE  /  All rights reserved. Maple is a registered trademark of 
 <____ ____>  Waterloo Maple Inc. 
      |       Type ? for help. 
> with(numtheory): 
Warning, the protected name order has been redefined and unprotected 
 
> invphi(1610510); 
                                                 [] 
 
> phi(1771561); 
                                               1610510 
\begin{MAPLEinline} 
 
In other words \verb|invphi(1610510);| gave an incorrect answer. 
 
%%%%%%%%%%%%%%%%%%%%% 
\subsubsection{\href{mailto:meade@math.sc.edu}{Douglas B. Meade       }(25.6.02)} 
 
I have not worked with Maple's invphi function for several 
years (Maple V, Release 2 in 1993) but remember that it was not 
very efficient and was not perfect. At that time I wrote some 
general pre-image routines for integer-valued functions. These have not 
been updated to later versions of Maple but should not be difficult to 
update. The PS and PDF versions of the technical report I wrote at that 
time can be downloaded from the list of publication on my website 
\url{http://www.math.sc.edu/~meade/publ.html}. 
 
I do not have time to update the code but will be happy to answer 
any questions that you might have. 
 
%%%%%%%%%%%%%%%%%%%%% 
\subsubsection{\href{mailto:devore@math.udel.edu}{Carl Devore      } (27.6.02)} 
 
My investigation so far shows that this bug will occur for 
\verb|invphi((p-1)*p^n) for n>1| and p any of the primes 
11, 23, 29, 31, 47, 53, 59, 67, 71, 79, 83, 89, 103, 107, 113, 131, .... 
 
I can't see the pattern of the primes, except that it appears 
that if p is such a prime, then so are all primes of the 
form \verb|(4*n+2)*p+1, n= 0, 1, ....| 
 
Tracking down the bug and verifying the above conjecture might 
lead to an interesting result. Perhaps it is one of your 
Integer Sequences. So the smallest example that I can find 
for this bug is \verb|invphi(10*11^2)|. 
 
 
%%%%% 
\clearpage\subsection{bug in is, Maple 8   (10.6.02)} 
%%%%%%%%%%%%%%%%%%%%% 
\subsubsection{\href{mailto:HJaramillo@houston.westerngeco.slb.com}{Herman Jaramillo}} 
 
In Maple 7. 
 
\begin{MAPLEinline} 
 > is(cos(a)*cos(a)-sin(b)*sin(b)=cos(b)*cos(b)-sin(a)*sin(a)); 
 
                         FAIL 
 
 > simplify(cos(a)*cos(a)-sin(b)*sin(b)-cos(b)*cos(b)+sin(a)*sin(a)); 
 
                           0
 

Is this a bug?.

The same result for Maple V.3, V.5 and 6 (U. Klein)

7.93.2 Robert Israel (11.6.02)

Perhaps more of a weakness than a bug. "is" does not take identities among transcendental functions into account when checking equalities.

Unfortunately the help page does not mention this. For example:

> is(exp(2*x) = exp(x)^2); 
 
                 FAIL
 

Interestingly, however:

> is(exp(2*x)<=exp(x)^2) assuming x::real; 
 
                 true 
 
> is(exp(2*x)>=exp(x)^2) assuming x::real; 
 
                 true
 

BTW: does anybody have an example where "_EnvTry:= hard" makes a difference in the result of "is"?

7.93.3 Carl Devore (12.6.02)

The FAIL indicates that "is" could not figure out the answer, so I would very rarely consider an answer of FAIL to be a bug.

However, it seems like "is" has been terribly messed up in Maple 8. In Maple 8, the above "is" returns false.

7.93.4 RICHARD YOUNG (12.6.02)

Maple V release 4 returns a true.