Problem with integrate() (was: Re: What am I doing wrong with this cycle?)



Recently, Pyotr Ivanishin asked for help and it seems that his troubles 
result from the following problem with integrate():

integrate(x^k,x);
Is k + 1 zero or nonzero?

nonzero;
(%o15)                              log(x)
(%i16) integrate(x^k,x);
Is k + 1 zero or nonzero?

zero;
(%o16)                              log(x)