integration error



> However, substituting a by 0, gives the following:
> 
> (%i3) integrate(cos(0*x)/(1+x^2),x,0,inf);
> (%o3) %pi/2

If you trace(integrate), you will see that by the time the integration 
routine runs, cos(0*x) has already been simplified to 1.

Ray