MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Double integral of a piecewise-constant function


Dear All,

I am trying to use Mathematica to calculate some quantum mechanical 
expressions involving integrals of commutators. In the simplest case, 
the Hamiltonian of the system is piecewise constant.

My problem is that Mathematica can integrate this expression:

(-(1/2))*Integrate[Piecewise[{{0, t[2] < 0 || t[2] >= 3 || (t[2] < 1 && 
t[1] < 1) || (t[2] < 2 && t[1] >= 3) || (t[2] >= 1 && t[1] < 0) ||
         (Inequality[1, LessEqual, t[2], Less, 2] && Inequality[1, 
LessEqual, t[1], Less, 2]) || (t[2] >= 2 && t[1] >= 2)},
       {Comm[Subscript[H, 1], Subscript[H, 2]], t[2] < 1 && t[1] < 2}, 
{Comm[Subscript[H, 1], Subscript[H, 3]], t[2] < 1},
       {Comm[Subscript[H, 2], Subscript[H, 1]], t[2] < 2 && t[1] < 1}, 
{Comm[Subscript[H, 2], Subscript[H, 3]], t[2] < 2},
       {Comm[Subscript[H, 3], Subscript[H, 1]], t[1] < 1}}, 
Comm[Subscript[H, 3], Subscript[H, 2]]] /. t[2] -> 0, {t[1], 0, 3}]

but it can't do the two dimension integral of the same expression:

-Integrate[Integrate[Piecewise[{{0, t[2] < 0 || t[2] >= 3 || (t[2] < 1 
&& t[1] < 1) || (t[2] < 2 && t[1] >= 3) || (t[2] >= 1 && t[1] < 0) ||
         (Inequality[1, LessEqual, t[2], Less, 2] && Inequality[1, 
LessEqual, t[1], Less, 2]) || (t[2] >= 2 && t[1] >= 2)},
       {Comm[Subscript[H, 1], Subscript[H, 2]], t[2] < 1 && t[1] < 2}, 
{Comm[Subscript[H, 1], Subscript[H, 3]], t[2] < 1},
       {Comm[Subscript[H, 2], Subscript[H, 1]], t[2] < 2 && t[1] < 1}, 
{Comm[Subscript[H, 2], Subscript[H, 3]], t[2] < 2},
       {Comm[Subscript[H, 3], Subscript[H, 1]], t[1] < 1}}, 
Comm[Subscript[H, 3], Subscript[H, 2]]], {t[2], 0, t[1]}], {t[1], 0, 3}]/2

To me these look pretty similar, and both are easy to do with pencil and 
paper. How should I set things up so that Mathematica can perform the 
second integral?

Many thanks,

Chris.


  • Prev by Date: Re: Displaying Solution in Matrix Form
  • Next by Date: Re: Re: formatting table with integers and floats in a column
  • Previous by thread: Re: Speeding up Vector Comparison
  • Next by thread: Re: Double integral of a piecewise-constant function