----- Original Message ----- From: "Alec Mihailovs" <alec@mihailovs.com> To: "math-fun" <math-fun@mailman.xmission.com> Sent: Sunday, November 26, 2006 00:53 Subject: Re: [math-fun] integrate(x^p floor(x)^q,x)
When I participated in Maple beta program, I submitted this bug. It was a heated discussion there about it, and I was told by Maple developers that in Maple indefinite integrals are defined up to "a piecewise constant", i.e. integrals of continuous functions can be discontinuous. The bug was classified as "works as designed".
The Wolframites seem to have the same philosophy. But I'd love to see a student arguing for full credit on a test if he'd given, say, | x^2 - 3 if x < 0 | | x^2 if x > 0 as an antiderivative for 2*x. Note that I intentionally left the antiderivative undefined at x = 0. When Mathematica gives antiderivatives with needless discontinuities, the antiderivative will often also be undefined there. (I presume that Maple behaves similarly.) Although not desirable, such behavior seems more natural in some sense when the integrand itself is discontinuous, like floor. But consider the continuous function 1/(2 + cos(x)), say. Mathematica's antiderivative for that is 2/Sqrt[3]*ArcTan[Tan[x/2]/Sqrt[3]] which has needless discontinuities at odd multiples of Pi. Although messier, I much prefer the continuous antiderivative given by Derive: (x - 2 atan(sin(x)/(2 + sqrt(3) + cos(x))))/sqrt(3). David Cantrell
A workaround for that (in Maple) is to use definite integral from 0 to x instead of indefinite integral. That also doesn't always work (sometimes it returns unevaluated), but as far as I recall, that gives the correct answer in this example.
Alec Mihailovs http://mihailovs.com/Alec/