Why does Mathematica return twice this value?

Click For Summary
SUMMARY

The discussion centers on the evaluation of the integral $$\int_0^4 dz \iint xyz~dx dy$$ over a quarter circular disk defined by $$x^2 + y^2 = 4$$ in the first quadrant. The integration was performed using polar coordinates, leading to a result of 16. Participants noted discrepancies in Mathematica's output when integrating with respect to $$\theta$$ from $$0$$ to $$\frac{\pi}{4}$$, which does not correspond to the defined region. The consensus is that a factor of 1/2 may have been misplaced during the integration of $$\sin(2\theta)$$.

PREREQUISITES
  • Understanding of double integrals and their applications
  • Familiarity with polar coordinates and their conversion from Cartesian coordinates
  • Knowledge of Mathematica for symbolic computation
  • Basic calculus concepts, particularly integration techniques
NEXT STEPS
  • Review the properties of double integrals over polar coordinates
  • Learn about the integration of trigonometric functions in polar coordinates
  • Explore Mathematica's syntax for integrating over defined regions
  • Study the geometric interpretation of integrals in cylindrical coordinates
USEFUL FOR

Students and professionals in mathematics, particularly those studying calculus, as well as anyone using Mathematica for complex integral evaluations.

TheMercury79
Messages
24
Reaction score
5
Homework Statement
I have evaluated this integral and got 16. But when I do it in the Mathematica program, the answer comes out as 32. I'm wondering if there is some symmetry that I'm missing or if I'm just entering it incorrectly in Mathematica, but I can't seem to get around the missing factor 2.
Relevant Equations
Polar coordinates in triple integral
The integral is$$\int_0^4dz\iint xyz~dxdy$$Constricted to the quarter circular disk ##x^2+y^2=4## in the first quadrant.
First I switched to polar coordinates and integrated the double integral by first writing it as:$$\int_0^4z~dz \int_0^\frac{\pi}2\int_0^2 \frac{1}{2}r^3sin(2\theta)~drd\theta$$
Which leads to:$$2\int_0^4z~dz \int_0^\frac{\pi}2 sin(2\theta) d\theta = 2\int_0^4z~dz = 16$$
I have tried to figure out what's missing and why it comes out as twice this in Mathematica and I feel the textbook is
scarce with descriptions. For example, we're asked to describe the region of integration and I think it's a quarter cylinder
with radius 2 and height 4 but can't find any support in the textbook for it.

I also can't understand why Mathematica gives the answer 16 when ##\theta## is integrated from ##0## to ##\frac{\pi}4##
But that's not the quarter of the circle.
Btw, the code that I entered in Mathematica is: Integrate[x*y*z, {z, 0, 4}, {x, y} ##\in## Circle[{0, 0}, 2, {0, \[Pi]/2}]]

Any hints or pointers to what is missing in my reasoning?
Tnx.
 
Physics news on Phys.org
TheMercury79 said:
The integral is$$\int_0^4dz\iint xyz~dxdy$$Constricted to the quarter circular disk ##x^2+y^2=4## in the first quadrant.
First I switched to polar coordinates and integrated the double integral by first writing it as:$$\int_0^4z~dz \int_0^\frac{\pi}2\int_0^2 \frac{1}{2}r^3sin(2\theta)~drd\theta$$
Which leads to:$$2\int_0^4z~dz \int_0^\frac{\pi}2 sin(2\theta) d\theta = 2\int_0^4z~dz = 16$$
I have tried to figure out what's missing and why it comes out as twice this in Mathematica and I feel the textbook is
scarce with descriptions. For example, we're asked to describe the region of integration and I think it's a quarter cylinder
with radius 2 and height 4 but can't find any support in the textbook for it.

I also can't understand why Mathematica gives the answer 16 when ##\theta## is integrated from ##0## to ##\frac{\pi}4##
But that's not the quarter of the circle.
Btw, the code that I entered in Mathematica is: Integrate[x*y*z, {z, 0, 4}, {x, y} ##\in## Circle[{0, 0}, 2, {0, \[Pi]/2}]]

Any hints or pointers to what is missing in my reasoning?
Tnx.
I get the same answer you did -- 16, and WolframAlpha agrees with this. See https://www.wolframalpha.com/input/?i=integrate+z+*+r^3+cos+t+sin+t+dr+dt+dz,+r=0..2,+t=0..pi/2,+z=0..4
My integral looks like this:
Code:
integrate z * r^3 cos t sin t dr dt dz, r=0..2, t=0..pi/2, z=0..4

My guess is that you misplaced a factor of 1/2 when you integrated ##\sin(2\theta)##.

BTW, questions about integrals belong in the Calculus & Beyond section, not in the Precalc section you originally posted in.
 
  • Like
Likes   Reactions: TheMercury79
TheMercury79 said:
The integral is$$\int_0^4dz\iint xyz~dxdy$$Constricted to the quarter circular disk ##x^2+y^2=4## in the first quadrant.
First I switched to polar coordinates and integrated the double integral by first writing it as:$$\int_0^4z~dz \int_0^\frac{\pi}2\int_0^2 \frac{1}{2}r^3sin(2\theta)~drd\theta$$
Which leads to:$$2\int_0^4z~dz \int_0^\frac{\pi}2 sin(2\theta) d\theta = 2\int_0^4z~dz = 16$$
I have tried to figure out what's missing and why it comes out as twice this in Mathematica and I feel the textbook is
scarce with descriptions. For example, we're asked to describe the region of integration and I think it's a quarter cylinder
with radius 2 and height 4 but can't find any support in the textbook for it.

I also can't understand why Mathematica gives the answer 16 when ##\theta## is integrated from ##0## to ##\frac{\pi}4##
But that's not the quarter of the circle.
Btw, the code that I entered in Mathematica is: Integrate[x*y*z, {z, 0, 4}, {x, y} ##\in## Circle[{0, 0}, 2, {0, \[Pi]/2}]]

Any hints or pointers to what is missing in my reasoning?
Tnx.

I get the same answer as you, using rectangular coordinates instead of polar.
$$I = \int_{z=0}^4 \, dz \int_{x=0}^2 \, dx \int_{y=0}^{\sqrt{4-x^2}} xyz \, dy \\
= \int_0^4 \, dz \int_0^2 \frac 1 2 z x (4-x^2) \, dx\\
= \int_0^4 2z \, dz = 16$$
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
12
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K