       Double integral of a piecewise-constant function

• To: mathgroup at smc.vnet.net
• Subject: [mg61395] Double integral of a piecewise-constant function
• From: Chris Rodgers <rodgers at physchem.NOSPAMox.aREMOVEc.uk>
• Date: Tue, 18 Oct 2005 02:44:36 -0400 (EDT)
• Organization: Oxford University, England
• Sender: owner-wri-mathgroup at wolfram.com

```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 < 0 || t >= 3 || (t < 1 &&
t < 1) || (t < 2 && t >= 3) || (t >= 1 && t < 0) ||
(Inequality[1, LessEqual, t, Less, 2] && Inequality[1,
LessEqual, t, Less, 2]) || (t >= 2 && t >= 2)},
{Comm[Subscript[H, 1], Subscript[H, 2]], t < 1 && t < 2},
{Comm[Subscript[H, 1], Subscript[H, 3]], t < 1},
{Comm[Subscript[H, 2], Subscript[H, 1]], t < 2 && t < 1},
{Comm[Subscript[H, 2], Subscript[H, 3]], t < 2},
{Comm[Subscript[H, 3], Subscript[H, 1]], t < 1}},
Comm[Subscript[H, 3], Subscript[H, 2]]] /. t -> 0, {t, 0, 3}]

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

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