How to draw integral with mathematica

  • Context: Mathematica 
  • Thread starter Thread starter EliasS
  • Start date Start date
  • Tags Tags
    Integral Mathematica
Click For Summary

Discussion Overview

The discussion revolves around how to visualize the volume of a triple integral using Mathematica, specifically focusing on different coordinate systems such as rectangular, cylindrical, and spherical coordinates. Participants explore methods to plot these volumes without first solving the integral, emphasizing the need to represent the limits of integration.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant seeks to plot the volume of a triple integral directly from its formula, expressing frustration with Mathematica's tendency to solve the integral first, resulting in a constant.
  • Another participant suggests that the focus should be on plotting the limits of integration rather than the integrand or the integral itself, recommending the use of ParametricPlot3D or RegionPlot3D and noting the need for coordinate transformation.
  • A participant shares a successful example of plotting in rectangular coordinates using RegionPlot3D but encounters difficulties when attempting to plot in spherical coordinates, specifically with drawing a cone beneath a sphere.
  • Another participant proposes using region plots in spherical coordinates, acknowledging the slower performance and the need for adjustments due to angle considerations, while providing a specific example of a RegionPlot3D command.
  • There is mention of the necessity to convert coordinates back to Cartesian for cylindrical coordinates, but no specific method is detailed.

Areas of Agreement / Disagreement

Participants generally agree on the need to plot the limits of integration rather than the integral itself, but there is no consensus on the best method to visualize the cone beneath the sphere in spherical coordinates. Multiple approaches are suggested, indicating a lack of resolution on the optimal technique.

Contextual Notes

Participants express uncertainty about the effectiveness of different plotting methods and the challenges associated with coordinate transformations. Specific limitations related to performance and the need for adjustments in angle calculations are noted.

EliasS
Messages
5
Reaction score
0
Hello,
is there a way to draw the volume of a triple integral?, and in different ways?(rectangular, cylindrical and sphere coordinates)
for example if the integral is
attachment.php?attachmentid=20391&stc=1&d=1252079429.jpg

what I want is to draw directly with the above formula
attachment.php?attachmentid=20392&stc=1&d=1252079429.jpg


I have been struggling all day with this, because if for example I use something like Plot3D[Integrate[x... it will first solve the integral, which will become a constant and then draw that constant

Also there must be a way because in the calculus book I'm studying, in many exercises it ask you to draw the volume of the problem with a software tool

Thank you, I really need this
 

Attachments

  • 1.JPG
    1.JPG
    9.3 KB · Views: 1,627
  • 2.JPG
    2.JPG
    18.3 KB · Views: 1,537
Physics news on Phys.org
What you want to plot here is not the integrand nor the integral, what you want to plot is the limits of integration. I would use ParametricPlot3D or RegionPlot3D, but you will have to transform from spherical coordinates to Cartesian coordinates either way.
 
Thank you DaleSpam, now I can draw integrals in rectangular coordinates, for example, the integral

RegionPlot3D[-2 < x < 2 && -\[Sqrt](4 - x^2) < y < \[Sqrt](4 - x^2) && x^2 + y^2 < z < 4, {x, -2, 2}, {y, -2, 2}, {z, 0, 5}, PlotPoints -> 50, Mesh -> True, AxesLabel -> Automatic]
will draw

attachment.php?attachmentid=20427&stc=1&d=1252238163.jpg


but for spherical coordinates, I found the sentence SphericalPlot3D, which for example with
SphericalPlot3D[{1}, {\[Phi], 0, Pi/4}, {\[Theta], 0, 2 Pi}]
will draw

attachment.php?attachmentid=20428&stc=1&d=1252238468.jpg


but I doesn't draw the cone underneath the sphere, my question is, is there a way to do that?

I thought something like saying to mathematica "draw me rho from 0 to 1 continuously ", and it would draw

attachment.php?attachmentid=20429&stc=1&d=1252238468.jpg


, but the cone being solid

thank you
 

Attachments

  • 1.JPG
    1.JPG
    22.4 KB · Views: 1,694
  • 3.JPG
    3.JPG
    20 KB · Views: 1,272
  • 2.JPG
    2.JPG
    18 KB · Views: 1,490
  • attachment.php?attachmentid=20427&stc=1&d=1252238163.jpg
    attachment.php?attachmentid=20427&stc=1&d=1252238163.jpg
    22.4 KB · Views: 593
  • attachment.php?attachmentid=20428&stc=1&d=1252238468.jpg
    attachment.php?attachmentid=20428&stc=1&d=1252238468.jpg
    18 KB · Views: 547
I'd use region plot and just use spherical coordinates. Its slower, and requires tweaking due to the angles but :

r = Sqrt[x^2 + y^2 + z^2];
\[Phi] = ArcTan[y/Abs[x]];
\[Theta] = ArcCos[Abs[z]/Sqrt[x^2 + y^2 + z^2]];
RegionPlot3D[
0 < r <= 3 && 0 < Abs[\[Theta]] < \[Pi]/4, {x, -5, 5}, {y, -5,
5}, {z, 0, 5}, PlotPoints -> 60, Mesh -> True,
AxesLabel -> Automatic, PlotRange -> {{-3, 3}, {-3, 3}, {-1, 5}}]

http://en.wikipedia.org/wiki/Spherical_coordinatesSame for cylindrical. You just have to do a coordinate conversion back to cartesian.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 29 ·
Replies
29
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 30 ·
2
Replies
30
Views
7K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
5K