0

Assuming $0<x,y<1$ and $0<v<1$, consider the function $f(x,y)=1+(1-2x)(1-2y)$. How to find the integral $I=\int_{\{xy+xy(1-x)(1-y)\leq v\}} \,f(x,y)\;dx \, dy$ using Mathematica or Matlab?

I am trying to show that $I \leq v$ by this integral for which the integration of $f(x,y)$ over the region $\{ xy+xy(1-x)(1-y) \leq v\}$ is essential.

Michael E2
  • 235,386
  • 17
  • 334
  • 747
Sudha
  • 21

1 Answers1

1
f[x_, y_] := 1 + (1 - 2 x) (1 - 2 y)

int[v_] := NIntegrate[Boole[x y + x y (1 - x) (1 - y) <= v] f[x,y], {x, 0, 1}, {y, 0, 1}]

For example:

int[0.5]

0.763851

Plot[{v, int[v]}, {v, 0, 1}, Frame -> True, 
 PlotStyle -> {{Black, Dashed}, Red}, AspectRatio -> 1, 
 FrameLabel -> {"v", ""}]

enter image description here

corey979
  • 23,947
  • 7
  • 58
  • 101