MathGroup Archive 2002

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

Search the Archive

Re: Integrating over a Minimum

I take the example you give. Try NIntegrate instead of Integrate:

NIntegrate[Min[x, y], {y, 0, 1}, {x, 0, 1}]

I quote from the Help Browser: "Integrate can evaluate integrals of rational
functions. It can also evaluate integrals that involve exponential,
logarithmic, trigonometric and inverse trigonometric functions, so long as
the result comes out in terms of the same set of functions." If you're
interested in numerical results - which I assume is the case - I think you
can successfully use NIntegrate. Another example:

f[x_, y_] := x + y /; 0 <= x <= 1 && 0 <= y <= 1;
f[x_, y_] := x + 2*y /; x >= 1 || y >= 1;

NIntegrate[f[x, y], {x, 0, 2}, {y, 0, 2}]

Tomas Garza
Mexico City

----- Original Message -----
From: "Moritz Meyer-ter-Vehn" <meyerter at>
To: mathgroup at
Subject: [mg32980] [mg32946] Integrating over a Minimum

> Hi,
> I want to integrate piecewise linear functions over a highdimensional
> space. The ranges where the function is linear are given by linear
> inequality constraints.
> Example: Integrate[Min[x,y],{y,0,1},{x,0,1}]
> (of course that is not the one I really want to solve)
> I could not get matematica to do this.
> Moritz Meyer-ter-Vehn

  • Prev by Date: World map
  • Next by Date: Re: complexity of AppendTo
  • Previous by thread: Integrating over a Minimum
  • Next by thread: Re: Integrating over a Minimum