Mathematica - what is wrong with ImplicitRegion[]

  • Mathematica
  • Thread starter PrecPoint
  • Start date
  • Tags
    Mathematica
In summary, the integral given is: $$\int_S z\,dS$$ where S is the lateral (surface) area of the cylinder $y^2+z^2=4$ cut off by two planes, $x=y-3$ and $x=6-z$. Using the parametrization $r(x,\theta)=(x,2\cos(\theta), 2\sin(\theta))$, the integral can be simplified to $-8\pi$. However, when using Mathematica, the result given is $8\pi$, which is due to a bug in the software. No further ideas or solutions have been found.
  • #1
PrecPoint
15
3
TL;DR Summary
Trying to understand how to use an implicit region in Integrate.
I'm working the integral
$$\displaystyle \int_S z\,dS$$

Where [itex]S[/itex] is the lateral (surface) area of the cylinder [itex]y^2+z^2=4[/itex] cut off by two planes, [itex]x=y-3[/itex] and [itex]x=6-z[/itex].

Using the parametrization [itex]r(x,\theta)=(x,2\cos(\theta), 2\sin(\theta))[/itex] this is pretty straight forward

$$\int 2\sin(\theta)|\frac{\partial r}{\partial x}\times\frac{\partial r}{\partial \theta}|\,dxd\theta=-8\pi$$

However, when I use Mathematica I get the following:

Code:
myReg2 = ImplicitRegion[y^2 + z^2 == 4, {{x, y - 3, 6 - z}, y, z}];
Integrate[z, {x, y, z} \[Element] myReg2]

>8 \[Pi]

Even using my exact parametrization:

Code:
myRegion = 
  ParametricRegion[{x, 2*Cos[\[Theta]], 
    2*Sin[\[Theta]]}, {{x, 2*Cos[\[Theta]] - 3, 
     6 - 2*Sin[\[Theta]]}, {\[Theta], 0, 2 \[Pi]}}];
Integrate[z, {x, y, z} \[Element] myRegion]

>8 \[Pi]

Obviously I'm missing something, but I can't figure it out and it drives me nuts. Any ideas would be welcome!
 
Physics news on Phys.org
  • #2
Quick update*; so I was not missing something. Apparently, this is a bug in Mathematica.
 
  • Like
Likes jim mcnamara and DrClaude

FAQ: Mathematica - what is wrong with ImplicitRegion[]

What is ImplicitRegion[] in Mathematica and how does it work?

ImplicitRegion[] is a built-in function in Mathematica that allows users to define geometric regions using mathematical inequalities or equations. This function takes in a set of constraints and uses them to create a region object, which can then be used for further calculations or visualization.

How do I know if there is something wrong with my use of ImplicitRegion[]?

If there is an error in your use of ImplicitRegion[], Mathematica will typically display an error message explaining the issue. Common errors include incorrect syntax, incompatible constraints, or undefined variables. You can also check the documentation for ImplicitRegion[] to ensure you are using the function correctly.

Why is my ImplicitRegion[] not producing the expected results?

There could be several reasons for this. First, check that your constraints accurately represent the region you want to define. Also, make sure you are using the correct syntax for your constraints. Additionally, there may be an error in your calculations or assumptions that are affecting the results. You can try simplifying your constraints or using different methods to define your region to see if that produces the desired results.

Can I use ImplicitRegion[] for 3D or higher-dimensional regions?

Yes, ImplicitRegion[] can be used to define regions in any dimension. However, it may become more complex and difficult to visualize in higher dimensions. It is important to carefully consider your constraints and how they define the region in higher dimensions.

Are there any limitations to using ImplicitRegion[] in Mathematica?

While ImplicitRegion[] is a powerful tool for defining regions in Mathematica, it does have some limitations. It may not be able to handle extremely complex or irregular regions, and it may struggle with regions that have discontinuities or singularities. Additionally, the use of symbolic variables in constraints may lead to slow or inaccurate results.

Similar threads

Replies
1
Views
819
Replies
1
Views
1K
Replies
1
Views
909
Replies
13
Views
2K
Replies
4
Views
739
Replies
2
Views
558
Replies
1
Views
1K
Replies
4
Views
1K
Replies
7
Views
2K
Replies
3
Views
2K
Back
Top