Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.9K Views
|
11 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Convergence of numerical integration with parameter

Posted 10 years ago

Hi there, I would like to solve the integral:

NIntegrate[( Sqrt[12 ((x - y)^2/(x + y)^2 + (x - z)^2/(x + z)^2 + (y - z)^2/(y +  z)^2)] 
Boole[Sqrt[1/3 ((x - y)^2/(x + y)^2 + (x - z)^2/(x + z)^2 + (y - z)^2/(y + z)^2)] == a])/
(E^(x + y + z) Sqrt[(-((4 x (x - z))/(x + z)^3) - (4 y (y - z))/(y + z)^3)^2 + ((4 z (y - z))/(y + z)^3 - 
(4 x (x - y))/(x + y)^3)^2 + ((4 y (x - y))/(x + y)^3 + (4 z (x - z))/(x + z)^3)^2]), 
{x, 0, \[Infinity]}, {y, 0, \[Infinity]}, {z, 0, \[Infinity]}]

With parameter $a\in [0,1]$. But the expression above does not work.

I have also tried by creating an implicit region of the surface where I'm integrating (mainly the expression inside the Boole operation), but it fails to discretize the region.

Do you know what I might be doing wrong? Do you know any work-around? Any advice is welcome.

POSTED BY: Ramiro Serra
11 Replies
Posted 10 years ago

Mmmhh... The problem is that my surface is not closed, which, according to my understanding, prevents it to apply Gauss' law, is that right?

But maybe Stokes could be applied... The problem is how to interpret my integrand as $(\nabla\times\underline{F})\cdot\underline{\rm{d}S}$

Because already the normal to that surface is not something simple. Furthermore, I have no idea how to define the boundary curve, since this "cone" grows to $\infty$.

POSTED BY: Updating Name

Perhaps you could transform the surface integral to a volume integral using something like Gauss' law and then use NIntegrate, which works for an inequality constraint inside Boole.

POSTED BY: Frank Kampas
Posted 10 years ago

I think it is a problem of ImplicitRegion, because I was able to plot the surface using CountourPlot3D directly on the equation:

ContourPlot3D[
 Sqrt[1/3 ((x - y)^2/(x + y)^2 + (x - z)^2/(x + z)^2 + (y - z)^2/(y + 
        z)^2)] == .2, {x, 0, 10}, {y, 0, 10}, {z, 0, 10}]

Surface of integration

And it confirms that the surface is the "skin" of the cone.

POSTED BY: Ramiro Serra
Posted 10 years ago

No, it takes about 10 seconds before giving the DiscretizeRegion error. I'm running version 10.2. Could that be the point?

If it takes too long, it might work better to use NIntegrate with the MonteCarlo (or any of its daughters) method of integration.

Tomorrow I'll install 10.3 and try.

POSTED BY: Ramiro Serra

When you try to do the integral with the ImplicitRegion approach, does the error message show up right away? I'm trying that approach and not getting an error but the calculation has been evaluating for several minutes now with no result yet. I'm running version 10.3.

POSTED BY: Frank Kampas
Posted 10 years ago

@Frank. Yes, I don't know why it gives that error. The division by 0 occurs only at the origin (I consider only positive values of $x$, $y$ and $z$), but then it is 0/0 and the limit is 1 for the whole region. The origin is part of the surface only when $a==1$.

If you use RegionPlot3D and change the $==$ to $\leq$, it works. The region looks like this (for $a=0.2$ for instance):

Region of integration

I just assumed that the surface ( $==$) is just the "skin" of this region (the orange surface). Isn't it the case?

BTW: the region is a line ( $x=y=z$) for $a=0$ and the whole first octant when $a=1$.

POSTED BY: Ramiro Serra

I tried to do a ContourPlot3D of the Boole expression with a = 0.5 and got error messages about 1/0. I think that's similar to the problem you are getting from NIntegrate and DiscretizeRegion. What is the surface you are trying to integrate over? Can you express it in a different way so you don't get 0 in the denominator for certain subregions?

POSTED BY: Frank Kampas
Posted 10 years ago

Thank you Frank. I think you might be right.

I rephrase your simple case as follows:

In[84]:= 
reg = ImplicitRegion[x^2 + y^2 + z^2 == 1, {x, y, z}]

    Out[84]= ImplicitRegion[x^2 + y^2 + z^2 == 1, {x, y, z}]

    In[85]:= NIntegrate[1, {x, y, z} \[Element] reg]

    Out[85]= 12.5664

And it seems to work ( $4\pi$ is the answer). But if I do the same with my integral (for instance for $a=0.5$):

reg = ImplicitRegion[Sqrt[1/3 ((x - y)^2/(x + y)^2 + (x - z)^2/(x + z)^2 + (y - z)^2/(y + z)^2)] == .5 && x >= 0 && y >= 0 && z >= 0, {x, y, z}]

and then

NIntegrate[Sqrt[
 12 ((x - y)^2/(x + y)^2 + (x - z)^2/(x + z)^2 + (y - z)^2/(y + 
      z)^2)]/(E^(x + y + z)
   Sqrt[(-((4 x (x - z))/(x + z)^3) - (4 y (y - z))/(y + z)^3)^2 + ((
     4 z (y - z))/(y + z)^3 - (4 x (x - y))/(x + y)^3)^2 + ((
     4 y (x - y))/(x + y)^3 + (4 z (x - z))/(x + z)^3)^2]), {x, y, 
   z} \[Element] reg]

Then I get the error: "DiscretizeRegion was unable to discretize the region \ ImplicitRegion[<<2>>]. "

Any further ideas?

POSTED BY: Ramiro Serra

For problems of this sort, I find it easier to do a simpler case first. This is the case I tried

In[3]:= Integrate[
 Boole[x^2 + y^2 + z^2 == 1], {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]

Out[3]= 0

It makes me think that you can't do a surface integral by converting it to a volume integral in this manner.

POSTED BY: Frank Kampas
Posted 10 years ago

Hi Key, thanks for your interest. Yes, it exists. It is actually a density function for random variable $a$. The $==$ is in the Boole command, representing the region of integration, a surface defined by $\sqrt{\frac{1}{3} ((\frac{x-y}{x+y})^2+(\frac{y-z}{y+z})^2+(\frac{x-z}{x+z})^2)}=a$.

Numerical integration on an infinite domain is possible with MonteCarlo techniques.

POSTED BY: Ramiro Serra

Hi, Does the integral of this function even exist over infinite domains? You have an equation == in your integral?

POSTED BY: Kay Herbert
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard