Integration with Mathematica or Matlab

79 Views Asked by At
  • Assuming $0 < x,y < 1$ and $0<v<1$. Consider the function $\,\mathrm{f}\left(x,y\right) = 1 + \left(1 -2x\right)\left(1 - 2y\right)$.
  • How to find the integral $$ I \equiv \int\left\{\vphantom{\large A}\, xy + xy\left(1 - x\right)\left(1 - y\right) \leq v\,\right\} \,\mathrm{f}\left(x,y\right)\,\mathrm{d}x\,\mathrm{d}y $$ using $\texttt{Mathematica}$ or $\texttt{Matlab}$ ?.
  • I am trying to show that $I \leq v$ by this integral for which the integration of $\,\mathrm{f}\left(x,y\right)$ over the region $\left\{\vphantom{\large A}\, xy + xy\left(1 - x\right)\left(1 - y\right)\leq v\,\right\}$ is essential.
1

There are 1 best solutions below

6
On

$\texttt{Mathematica}$:

Clear[f,iverson,v,x,y];

f[x_, y_] := 1 + (1 - 2 x) (1 - 2 y); 
iverson[v_, x_, y_] := If[x y + x y (1 - x) (1 - y) <= v, 1, 0];

Integrate[iverson[v, x, y]f[x, y],{x, 0, 1},{y, 0, 1},
Assumptions -> (0 < v) && (v < 1)]