On 11/2/10 1:25 PM, Dieter Kaiser wrote:
> Am Montag, den 01.11.2010, 21:30 -0400 schrieb Raymond Toy:
>> On 10/30/10 7:14 PM, Bruno Torremans wrote:
>>> Hello
>>>
>>> I came upon some strange integration results :
>>>
>>> (%i1) integrate(cos(2*x)*cos(x),x);
>>> (%o1) -cos(3*x)/6-cos(x)/2
>>> (%i2) ev(%,x=2),numer;
>>> (%o2) 0.048045037165177
>> Ah, this is totally wrong. I see what the problem is and will be
>> checking in a fix soon. With the fix, maxima will now return
>> sin(x)/2+sin(3*x)/6. The derivative of this matches the integrand.
>>
>> Thanks for the bug report.
> Hello Ray,
>
> thank you very much for the bug fix. I am guilty to have introduced this
> silly and unnecessary error. It is the typical type of error I always
> fear. I have not seen a side effect of the code. I will learn from this
No need to apologize; we all make mistakes. I had to stare at the code
for a while and then stick in a bunch of prints before I realized what
the problem was. It's easy to overlook these side effects. I think
that whole section that you commented out really had just one purpose:
make the side effects happen, because the tests being made were always true.
Ray