Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Why is

Integrate[Boole[x < 1], q]

resulting in

Piecewise[{{x, x <= 1}}, 1]

I'd expect

Piecewise[{{x, x <= 1}}, 0]

Because for x > 1 we just integrate Boole[False].

share|improve this question
2  
Help on Integrate[], under "possible issues": Different forms of the same integrand can give integrals that differ by constants of integration: . Try Integrate[Boole[x < 1], {x, 2, 3}] – belisarius Feb 27 at 13:47
3  
Perhaps Mathematica prefers to make the result continuous. – m_goldberg Feb 27 at 14:13
@m_goldberg: That's a good assumption. After some further testing I think you are right. – Emerson Feb 27 at 14:17
2  
@m_goldberg I think it's simpler than that. When the integrand is Riemann integrable, the result is going to be continuous. Riemann integrability includes all piecewise continuous functions whose jump discontinuities are discrete, like this one, so evidently Piecewise[{x, x <= 1}}, 0] would simply be wrong. I'm voting to close this question as too localized--it's based on a mathematical misconception and is not relevant to Mathematica. – whuber Feb 27 at 14:42
Agreed with whuber, Piecewise[{{x, x <= 1}}, 0] is simply an incorrect answer. Think of it as $F(x) = \int_c^x f(t) \, dt$. – Szabolcs Feb 27 at 14:56

closed as too localized by whuber, Szabolcs, Oleksandr R., acl, Yves Klett Feb 27 at 16:51

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.