Integration bug



Hello!

I believe that I've found a bug in Maxima.

The following command

        integrate(cos(x)*cos(2*x),x);

gives a wrong answer with

        Maxima 5.22.{0,1} + GCL 2.6.8 + Windows

and the right answer with

        Maxima 5.21.1 + GCL 2.6.8 + Windows.

(Maxima 5.21.1 + GNU/Linux [Ubuntu 10.10] also gives a correct answer.
 Unfortunately I don't remember the version of GCL used to compile
Maxima in Ubuntu 10.10.)

The correct answer for this (easy to solve by hand) integral is

        sin(3*x)/6+sin(x)/2 [1].

The wrong answer is the same in both Maxima 5.22.0 and Maxima 5.22.1.
This wrong answer is

        -cos(3*x)/6-cos(x)/2 [2].

It is obvious that [1] and [2] are different - just let x=0.

Could someone check this integral and let me know if I'm unfortunately
right?  Is "this bug" known?

Best regards from Portugal!

PS - If Maxima uses "rewriting rules" to solve this type of integrals,
then I guess this rules are messed up - probably a copy & paste
problem :-)

-- 
Nuno Miguel dos Santos Baeta
ille nihil dubitat quem nulla scientia dictat