Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there a way to work around integration over Boole being mysteriously flaky like examples show below? Is there a meaningful explanation for this behaviour?

First, rather obvious integral stays unevaluated:

Integrate[Boole[u^2 + v^2 < 1], {u,-1,1}, {v,-1,x}, Assumptions -> -1 < x < 1]

(* Integrate[Boole[u^2 + v^2 < 1], {u,-1,1}, {v,-1,x}, Assumptions -> -1 < x < 1] *)

While the following succeeds to produce a meaningful result:

Integrate[Boole[u^2 + v^2 < 1], {u,-1,1}, {v,-1,x}, Assumptions -> -1 < x < 0]

(* Pi + x Sqrt[1 - x^2] - ArcCos[x] *)

Why this succeeds particularly puzzles me, when the first one fails:

Integrate[Boole[u^2 + v^2 < 1], {u,-1,1}, {v,-1,x},
  Assumptions -> -1 < x < Infinity] // FullSimplify

(* Pi + x Sqrt[1 - x^2] - ArcCos[x]             x <= 0
   Pi                                           x >= 1
   x Sqrt[1 - x^2] + ArcCos[x] + 2 ArcSin[x]    True *)
share|improve this question
    
Whenever integration fails over a domain, I always do something like this: FullSimplify@ Integrate[Boole[u^2 + v^2 < 1], {u, -1, 1}, {v, -1, EulerGamma}] /. EulerGamma -> x –  Chip Hurst Sep 17 '13 at 17:11
add comment

1 Answer 1

up vote 2 down vote accepted

It works if you do one integration at a time :

Integrate[Integrate[Boole[u^2 + v^2 < 1], {u, -1, 1}], {v, -1, x}, 
  Assumptions -> -1 < x < 1]
(* 1/2 (\[Pi] + 2 x Sqrt[1 - x^2] + 2 ArcSin[x]) *)
share|improve this answer
    
It would also appear that swapping order to Integrate[Boole[u^2 + v^2 < 1], {v,-1,x}, {u,-1,1}, Assumptions -> -1 < x < 1] does the trick. Can someone explain why these tricks work? –  kirma Sep 17 '13 at 16:36
    
This answer doesn't give a perfect solution but... I hope your answer helps people stumbling to these same issues. :) –  kirma Sep 24 '13 at 20:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.