I know that the Integrate function of MMA can compute double integrals.

Integrate[x*y, {x, y} ∈ Disk[]]

Now I want to use MMA to calculate the result of this integral:

$$\iint_{x+y<=z}{\mathrm{e} ^{-\frac{x^2}{2} }\mathrm{e} ^{-\frac{y^2}{2} }}\mathrm{d}x \mathrm{d}y$$

The integral area of this double integral is related to the parameter z, so the result of this double integral is related to the parameter z. I know that the calculation of the above double integral according to the convolution formula is as follows:

  E^(-(x^2/2)) (E^(-((z - x)^2/
     2))), {x, -∞, +∞}], {z, -∞, z}]
    (*π (erf(z/2)+1)*)

But I can't get results when I execute his equivalent code:

    reg = ImplicitRegion[x + y <= z, {x, y}];
Integrate[E^(-(x^2/2)) E^(-(y^2/2)), {x, y} ∈ reg]

I want to know how to use Mathematica to calculate this type of double integral.

In addition, I don't want to use extra mathematical skills to calculate this kind of double integral.

  • 1
    $\begingroup$ It’s an infinite region on which the integral diverges, no? $\endgroup$ – Michael E2 Jul 5 at 3:56
  • $\begingroup$ @MichaelE2 Thank you. I've changed to a convergent integrand. $\endgroup$ – A little mouse on the pampas Jul 5 at 4:27
  • 1
    $\begingroup$ This suggests there's a stumbling block (taking z = 1): Integrate[E^(-(x^2/2)) E^(-(y^2/2)), {x, -Infinity, Infinity}, {y, -Infinity, 1 - x}] $\endgroup$ – Michael E2 Jul 5 at 10:29

Don't use ImplicitRegion with a symbolic z that isn't part of the coordinate list - it won't work for some reason and Wolfram should probably document this in the Possible Issues section in the help. Consider this incorrect example too:

disk = ImplicitRegion[x^2 + y^2 <= r^2, {x, y}]
(* returns: 0 *)

Instead, use an equivalent explicit region such as HalfPlane[{{z, 0}, {0, z}}, {-1, -1}];:

reg2 = HalfPlane[{{z, 0}, {0, z}}, {-1, -1}];
Integrate[Exp[-x^2/2] Exp[-y^2/2], {x, y} ∈ reg2]

(* result: ConditionalExpression[π (1 + Erf[z/2]), (z | z) ∈ Reals] *)
| improve this answer | |
  • 2
    $\begingroup$ Wow, ImplicitRegion is so buggy! By the way, using your first example, I am getting the correct answer imposing assumptions disk = ImplicitRegion[x^2 + y^2 <= r^2, {x, y}]; Assuming[r>0,Area[disk]]. I have MA12.1 $\endgroup$ – yarchik Jul 6 at 17:36
  • 1
    $\begingroup$ @yarchik interesting - I tried assumptions for z on x+y<=z but I didn't get anywhere. $\endgroup$ – flinty Jul 6 at 17:37
  • 2
    $\begingroup$ Yes, it does not help in this case... $\endgroup$ – yarchik Jul 6 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.