integration of piecewise convex bivariate function with 6 parameters
- To: mathgroup at smc.vnet.net
- Subject: [mg78908] integration of piecewise convex bivariate function with 6 parameters
- From: "Michael Chen" <vancouver.michael at gmail.com>
- Date: Thu, 12 Jul 2007 05:24:45 -0400 (EDT)
Dear there,
I spent roughly one week to manually integrate a piecewise convex function
with 6 parameters, and I can't imagine how happy I would be if Mathematica
can do it for me too. Following is the function, and the Mathematica command
I tried.
f(h1,h1)= if (h1 - x1 <= 0 or h2 - x2 <= 0) then | h1 - x1| + | h2 - x2 |
else max( h1 - x1, h2 - x2), where x1, x2 are real parameters. And I
integrate the function f(h1, h2) over rectangular region {h1, B1, U1}, {h2,
B2, U2}, where B1, U1, B2, U2 are reals, and B1 < U1, B2 < U2.
I tried this in Mathematica 6.0:
g[x1_Real, x2_Real] := Integrate[
If [h1 - x1 <= 0 || h2 - x2 <= 0, abs[h1 - x1] + abs[h2 - x2] ,
max[h1 - x1, h2 - x2]], {h1, B1, U1}, {h2, B2, U2},
Assumptions ->
Im[B1] == 0 && Im[B2] == 0 && Im[U1] == 0 && Im[U2] == 0 &&
Im[h1] == 0 && Im[h2] == 0 && B1 < U1 && B2 < U2 ];
However there is simply no response from Mathematica 6.0 after I press
Shift+Enter. Could anybody give me any suggestions? Thanks a lot.
( The example on
http://reference.wolfram.com/mathematica/tutorial/IntegralsOverRegions.html,
[image: Click for copyable input] <javascript:input('i_9')>, seems very
close to what I am doing. And Mathematica gives back a piecewise function
in a as answer. I know the integral of my function f(h1,h2) is a
piecewise function of (x1,x2) too.)
Michael Chen