5
$\begingroup$

I can get the volume enclosed by two orthogonal cylindrical surfaces when the radius of the bottom circle of the cylinder is a specific value (for example, r1=r2=2):

    Clear["Global`*"];
    v1 = ImplicitRegion[x^2 + y^2 <= 2^2, {x, y, z}];
    v2 = ImplicitRegion[x^2 + z^2 <= 2^2, {x, y, z}];
    v = RegionIntersection[v1, v2];
    Volume[v]

(*128/3*)

How can I get the volume enclosed by two orthogonal cylindrical surfaces when the radius of the bottom circle of the cylinder is a variable "r" (r1==r2==r), not a specific value?

$\endgroup$

2 Answers 2

8
$\begingroup$
v1 = ImplicitRegion[x^2 + y^2 <= r^2, {x, y, z}];
v2 = ImplicitRegion[x^2 + z^2 <= r^2, {x, y, z}];
v = RegionIntersection[v1, v2];
Assuming[r > 0, Volume[v]]

(16 r^3)/3

$\endgroup$
2
  • $\begingroup$ Thanks!! @cvgmt $\endgroup$
    – lotus2019
    Feb 28 at 1:51
  • $\begingroup$ Assuming[r > 0, ImplicitRegion[{x^2 + y^2 <= r^2, x^2 + z^2 <= r^2}, {x, y, z}] // Volume] $\endgroup$
    – cvgmt
    Feb 28 at 2:01
4
$\begingroup$

This was the fastest way that came to mind. Do a bunch of values and then guess the result. Like so:

Table[v1 = ImplicitRegion[x^2 + y^2 <= r^2, {x, y, z}];
 v2 = ImplicitRegion[x^2 + z^2 <= r^2, {x, y, z}];
 v = RegionIntersection[v1, v2];
 Volume[v], {r, 1, 12, 1}]

{16/3, 128/3, 144, 1024/3, 2000/3, 1152, 5488/3, 8192/3, 3888, \ 16000/3, 21296/3, 9216}

Then, you run

FindSequenceFunction[{16/3, 128/3, 144, 1024/3, 2000/3, 1152, 5488/3, 
  8192/3, 3888, 16000/3, 21296/3, 9216}, r]

which gives

(16 r^3)/3

Bonus feature: rewrite it in terms of π.

Solve[16/3 xx == 4/3 Pi, xx] // Simplify

{{xx -> π/4}}

$\endgroup$
2
  • $\begingroup$ Thanks :-) @kcr $\endgroup$
    – lotus2019
    Feb 28 at 1:53
  • $\begingroup$ @lotus2019 you are welcome :-) $\endgroup$
    – kcr
    Feb 28 at 1:54

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.