0
|
6593 Views
|
8 Replies
|
7 Total Likes
View groups...
Share
GROUPS:

# Regarding the volume via an implicit method

Posted 9 years ago
 Greetings! May I know how should I obtain volume of an object using an implicit method? Regards Corse
8 Replies
Sort By:
Posted 9 years ago
Posted 9 years ago
 Use the same method as for volume, but define 2D region instead and integrate over this 2D region.I.M.
Posted 9 years ago
 Oh I see, I think the first assignment method should be good enough for me at this point, although I'll look through the other methods of assignment as well.I have input arbitrary values into a,b,c and h into the implicitregion equation (with z conditions as: z <= -h && z >= -c).what could possibly be done to obtain the cutting plane ?I'm assuming I have to solve for the a and b values of the ellipse equation where z = -h (i.e. at the cutting plane)? In the plot, I have set h = 1
Posted 9 years ago
 Ben,There are several ways to do it, here is an example: In:= (* with assignment *) v = a b c h ; a = 1 ; b = 2 ; c = 3 ; h = 4 ; v Out= 24 In:= (* with rules *) Clear[v, a, b, c, h] ; v = a b c h ; v /. {a -> 1, b -> 2, c -> 3, h -> 4} Out= 24 In:= (* with function *) Clear[v] ; v[a_, b_, c_, h_] := a b c h ; v[1, 2, 3, 4] Out= 24 In:= (* with pure function *) Clear[v] ; v = #1 #2 #3 #4 &; v[1, 2, 3, 4] Out= 24 Also see this, where useful basic concepts are explained. In general you can get all you answers from Mathematica documentation.I.M.
Posted 9 years ago
 Greetings I.M and AdamReally appreciate the advice regarding the stated problem. Wow I didnt know the ordering of variables and adding more specific conditions made so much difference in terms of computation time. Thank you for the heads up regarding that. Also, I'm sorry for this but could I arbitrarily assign values to a,b,c and h in Mathematica to evaluate the expression (a b h (3 c^2 - h^2) [Pi])/(3 c^2)? Say something similar to a user input stored in the variables? Regards Corse
Posted 9 years ago
 Great solution, Adam,I was not enough patient to get Integrate[] result. In fact if you add a condition that h plane must intersect the ellipsoid than computation is almost immediate. Volume[reg, Assumptions -> a > 0 && b > 0 && c > 0 && h > 0 && h < c] and Integrate gives the same result as it should: Integrate[1, {x, y, z} \[Element] reg, Assumptions -> a > 0 && b > 0 && c > 0 && h > 0 && h < c] I.M.
Posted 9 years ago
 Hi,In V10 you can compute it using the built-in Volume function: In:= reg=ImplicitRegion[x^2/a^2+y^2/b^2+z^2/c^2<=1 && z<=0 && z>=-h, {z, y, x}]; In:= Volume[reg, Assumptions->a>0 && b>0 && c>0 && h>0] 2 2 2 a b c Pi a b h (3 c - h ) Pi Out= Piecewise[{{----------, c - h < 0}}, --------------------] 3 2 3 c Note that I used the variable order {z, y, x}. Volume computation problems involving symbolic parameters are hard in general and the computation time often depends on variable ordering (that is the order in which we compute the iterated integrals). Here I put the variable z first because it appears in the extra conditions. The result was computed in 6 seconds. With variables ordered {x, y, z} the computation takes about 10 minutes.Best regards, Adam
Posted 9 years ago
 Hi,Since version 10 it's possible to integrate over specified domain with both Integrate[] and NIntegrate[] functions. Consult documentation for details. Here is an example with NIntegrate[]: R = ImplicitRegion[ x^2/1 + y^2 + z^2 <= 1 && -0.5 <= z <= 0.5, {x, y, z} ] ; RegionPlot3D[R] NIntegrate[1, {x, y, z} \[Element] R] I.M.