I am integrating g
over the region:
RegionPlot[ 0 <= x <= 3 && 1 - x <= y < -(2/3) x + 2, {x, 0, 3}, {y, 0, 2}]
The limits of integration are
$$\int _0^1\int _{1-x}^{2-\frac{2 x}{3}}g[x,y]dydx+\int _1^3\int _0^{2-\frac{2 x}{3}}g[x,y]dydx$$
The expected answer is obtained from evaluating these integrals.
g[x_, y_] := 3 x + y^2
Integrate[g[x, y], {x, 0, 1}, {y, 1 - x, -(2/3) x + 2}] +
Integrate[g[x, y], {x, 1, 3}, {y, 0, -(2/3) x + 2}]
(* 125/12 *)
I then had the idea that I could use the Assumptions
option to restrict y
and only evaluate one Integration
. However, the answer is returned is the same as an unrestricted y
integration.
Integrate[g[x, y], {x, 0, 3}, {y, 1 - x, -(2/3) x + 2},
Assumptions -> y >= 0]
(* 103/4 *)
Integrate[g[x, y], {x, 0, 3}, {y, 1 - x, -(2/3) x + 2}]
(* 103/4 *)
Why doesn't Integrate
restrict y
with the Assumption
option?
Assumptions
is intended only to eliminate generated conditions, not to reduce the range of an integration variable. Thus,Integrate[1, {y, -1, 1}]
andIntegrate[1, {y, -1, 1}, Assumptions -> y > 0]
produce the same answer $\endgroup$