1
$\begingroup$

Sometimes when dealing with multiple integrals we need to integrate inside a region bounded by graphs of functions. This leads to integrals of the form:

$$I=\int_{a}^b\int_{f(x)}^{g(x)}\xi(x,y)dydx.$$

One concrete example I came accross recently is the following, consider the region $R$ defined by

$$R=\{(x,y)\in \mathbb{R}^2 : 0\leq x\leq \operatorname{arcsinh}(2), 0\leq y\leq \arctan(\sinh(x))\}$$

This region is bounded by the graph $y = 0$ and $y = \arctan(\sinh(x))$.

If I want to integrate one function of two variables in a region like this, how can I proceed? How Mathematica deals with this?

$\endgroup$

2 Answers 2

1
$\begingroup$

You need to specify the integrand, of course, but for a simple integrand the numerical integration is straightforward:

NIntegrate[x - y,
  {x, 0, ArcSinh[2]},
 {y, 0, ArcTan[Sinh[x]]}]

$0.48775$

Some functions give analytic results:

Integrate[x,
  {x, 0, ArcSinh[2]},
 {y, 0, ArcTan[Sinh[x]]}]

$\frac{1}{16} \left(8 \left(\log ^2\left(2+\sqrt{5}\right) \tan ^{-1}(2)-i \left(-2 \text{Li}_3\left(-i \left(-2+\sqrt{5}\right)\right)+2 \text{Li}_3\left(i \left(-2+\sqrt{5}\right)\right)- 2 \text{Li}_2\left(-i \left(-2+\sqrt{5}\right)\right) \log \left(2+\sqrt{5}\right)+2 \text{Li}_2\left(i \left(-2+\sqrt{5}\right)\right) \log \left(2+\sqrt{5}\right)+\log \left((1-2 i)+i \sqrt{5}\right) \log ^2\left(2+\sqrt{5}\right)-\log \left(i \left(\sqrt{5}+(-2+i)\right)\right) \log ^2\left(2+\sqrt{5}\right)\right)\right)-\pi ^3+8 \pi \log ^2\left(2+\sqrt{5}\right)\right)$

$\endgroup$
1
$\begingroup$

One can define a region

reg = ImplicitRegion[0 <= x <= ArcSinh[2] && 0 <= y <= ArcTan[Sinh[x]], {x, y}]

that looks like this

RegionPlot[reg]

enter image description here

and integrate a function over it:

int1 = Integrate[x, {x, y} ∈ reg]

enter image description here

Or the old style:

int2 = Integrate[
  x Boole[0 <= x <= ArcSinh[2] && 0 <= y <= ArcTan[Sinh[x]]],
    {x, -∞, ∞}, {y, -∞, ∞}]

enter image description here

int1 and int2 have different forms; some machinery (like ComplexExpand etc.) can be employed to show they are equivalent, but let's just simply

N /@ {int1, int2} // Chop

{0.84757, 0.84757}

to show that they are the same.


This works also for numerical integrals:

int3 = NIntegrate[x - y, {x, y} ∈ reg]

0.48775

int4 = NIntegrate[(x - y) Boole[0 <= x <= ArcSinh[2] && 0 <= y <= ArcTan[Sinh[x]]],
        {x, -∞, ∞}, {y, -∞, ∞}]

0.48775

$\endgroup$
1
  • $\begingroup$ Actually, if one is using Boole[], one can be lazy and use -∞ and as the limits, since Boole[] zeroes out everything that doesn't satisfy the condition inside it. $\endgroup$ Dec 16, 2016 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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