5

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?

Peter Mortensen
  • 759
  • 4
  • 7
lotus2019
  • 2,091
  • 5
  • 10

2 Answers2

8
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

cvgmt
  • 72,231
  • 4
  • 75
  • 133
4

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}}

Peter Mortensen
  • 759
  • 4
  • 7