Re: Re: Integrating over a Minimum
- To: mathgroup at smc.vnet.net
- Subject: [mg32986] Re: [mg32980] Re: [mg32946] Integrating over a Minimum
- From: BobHanlon at aol.com
- Date: Sat, 23 Feb 2002 02:38:03 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 2/22/02 3:30:56 AM, tgarza01 at prodigy.net.mx writes: >I take the example you give. Try NIntegrate instead of Integrate: > >In[1]:= >NIntegrate[Min[x, y], {y, 0, 1}, {x, 0, 1}] >Out[1]= >0.33333 > >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: > >In[1]:= >f[x_, y_] := x + y /; 0 <= x <= 1 && 0 <= y <= 1; >f[x_, y_] := x + 2*y /; x >= 1 || y >= 1; > >In[2]:= >NIntegrate[f[x, y], {x, 0, 2}, {y, 0, 2}] >Out[2]= >11.5 > Alternatively, break the integral into segments: 0<=x<=y and y<=x<=1 Integrate[x, {y,0,1}, {x,0,y}] + Integrate[y, {y,0,1}, {x,y,1}] 1/3 Bob Hanlon Chantilly, VA USA