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[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.
- Follow-Ups:
- Re: Double integral of a piecewise-constant function
- From: Chris Chiasson <chris.chiasson@gmail.com>
- Re: Double integral of a piecewise-constant function