Possible Collect bug

• To: mathgroup at yoda.ncsa.uiuc.edu
• Subject: Possible Collect bug
• From: John Mitchell <uunet!pico.uchicago.edu!mitchell>
• Date: Mon, 20 Aug 90 17:48:34 CDT

```I would like to relate a recent calculation I ran across which I believe
represents a bug in Mathematica 1.2.1 (Macintosh II version).  I have
not seen this bug reported elsewhere, but it may have been.  The sample
ouput below shows a comparison of Collect with Factor on what seems like
a straightforward expression.  Note, however, that two different answers
result.  I would appreciate anyone's comments on this.

(Note that this output has been "cut and pasted" from Mathematica
into a word-processing program before transfer, explaining the
missning In[##] and Out[##] )

expr = -((-1)^(2n) y^2)/8 - ((-1)^(-1 + 2n) y^2)/8 + ((-1)^(1 + 2n) y^2)/8

2 n  2              -1 + 2 n   2               1 + 2 n   2
-((-1)     y )         (-1)          y            (-1)         y
-------------   -     -----------------    +     -----------------
8                      8                          8

Collect[expr,y]

2 n  2
-3 (-1)     y
-------------
8

(* This is incorrect *)

Factor[expr]

2 n  2
-((-1)     y )
-------------
8

(* This is correct  *)

*****************************

John Mitchell
Univ. of Chicago
5735 South Ellis Ave.
Chicago, IL  60637
(312) 702-7253
mitchell at pico.uchicago.edu

```

• Prev by Date: Re: Bug in Integrate?
• Next by Date: Plotting Experimental Data
• Previous by thread: PointSize Problem
• Next by thread: Re: Possible Collect bug