1
$\begingroup$

We a tough problem in class today preparing for the final exam next Monday.

$$\int_0^{\pi^{1/4}}\int_0^z\int_y^z 12y^2z^3\sin(x^4)\,dx\,dy\,dz$$

I was extremely surprised that I could simply type in the bounds of the integrals as inequalities using the RegionPlot3D command.

RegionPlot3D[0 <= z <= π^(1/4) && 0 <= y <= z && y <= x <= z, {x, 0, π^(1/4)}, 
            {y, 0, π^(1/4)}, {z, 0, π^(1/4)}]

Which produced the correction region of integration.

enter image description here

Will this process with the bounds work for every such integral? If not, can someone provide a counterexample?

$\endgroup$
  • 3
    $\begingroup$ I am surprised by your surprise. What did you think the RegionPlot3D function was for if not this? $\endgroup$ – Rahul Dec 4 '15 at 22:28
  • 1
    $\begingroup$ I'd say the only time things will mess up is when your integral limits are flipped. i.e. if you're integrating z from pi^(1/4) to 0, then your inequality is always false. $\endgroup$ – Chip Hurst Dec 4 '15 at 22:32
  • 2
    $\begingroup$ f[x_, y_, z_] := 12 y^2 z^3 Sin[x^4]; Integrate[ f[x, y, z] Boole[0 <= z <= \[Pi]^(1/4) && 0 <= y <= z && y <= x <= z ], {x, 0, \[Pi]^(1/4)}, {y, 0, \[Pi]^(1/4)}, {z, 0, \[Pi]^(1/4)}] is more surprising :) $\endgroup$ – Dr. belisarius Dec 4 '15 at 23:39
3
$\begingroup$
rgn = ImplicitRegion[
   0 < z < π^(1/4) && 0 < y < z &&
    y < x < z, {x, y, z}];

(int1 = Integrate[
    12 y^2 z^3 Sin[x^4],
    {x, y, z} ∈ rgn]) // AbsoluteTiming

(*  {1.38881, π/4}  *)

(int2 = Assuming[{Element[{x, y, z}, Reals]},
    Integrate[12 y^2 z^3 Sin[x^4],
     {z, 0, π^(1/4)}, {y, 0, z},
     {x, y, z}]]) // AbsoluteTiming

(*  {7.53664, π/4}  *)

int1 == int2

(*  True  *)

RegionPlot3D[rgn,
 PlotPoints -> 100,
 Axes -> True,
 AxesLabel ->
  (Style[#, 14, Bold] & /@ {"x", "y", "z"})]

enter image description here

$\endgroup$
  • $\begingroup$ Interesting that the integration over an implicit region is faster. $\endgroup$ – David Dec 5 '15 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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