Group Abstract Group Abstract

Message Boards Message Boards

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

[?] Use implicit region definition?

Posted 6 years ago

I had been trying to compute some integrals numerically over a region defined implicitly and was getting some results that didn't seem to make sense. It is possible that I am using the implicit region definition incorrectly. The following code is a simple example of results that don't seem to make sense. I think I am defining the same region in two different ways and am getting different results when integrating a function over these regions. What is going on?

r0 = Sphere[{0, 0, 0}, 1.0]
r1 = ImplicitRegion[x^2 + y^2 + z^2 <= 1., {x, y, z}]

Sphere[{0, 0, 0}, 1.]

ImplicitRegion[x^2 + y^2 + z^2 <= 1., {x, y, z}]

NIntegrate[(x + y + z)^2, {x, y, z} \[Element] r0]
NIntegrate[(x + y + z)^2, {x, y, z} \[Element] r1]

12.5664

2.51327

Edit: Never mind. I just realized that Sphere is the spherical shell and Ball is the filled sphere.

POSTED BY: Mike Luntz
2 Replies
Posted 6 years ago
Attachments:
POSTED BY: Mike Luntz

Hi,

Have you tried using Ball instead of Sphere?

r0 = Ball[{0, 0, 0}, 1.0]
r1 = ImplicitRegion[x^2 + y^2 + z^2 <= 1., {x, y, z}]
NIntegrate[(x + y + z)^2, {x, y, z} \[Element] r0]
NIntegrate[(x + y + z)^2, {x, y, z} \[Element] r1]

gives the same result (2.51327).

Cheers,

Marco

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