This was correct in older versions of Maxima:
Maxima 5.20.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) integrate( cos(x)*cos(2*x), x, 0, %pi );
(%o1) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?0
It is broken in 5.22.1:
Maxima 5.22.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) integrate( cos(x)*cos(2*x), x, 0, %pi );
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?4
(%o1) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?-
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?3
Cheers,
Don