# How to rotate a circle around the y-axis and calculate the volume of the 3D solid?

How do I rotate the equation $${(x-5)^2}+{y^2}={3^2}$$ around the y-axis and calculate the volume of the plotted 3D solid? I tried the code below but the result doesn't work.

Show[{RevolutionPlot3D[(x - 5)^2 + (y^2) == (3^2), {x, -100,
100}, {y, -100, 100}, AxesOrigin -> {0, 0, 0},
PlotRange -> {-1, 20}],
Graphics3D[{Text["x", Scaled[{-.05, .5, 0}], {0, -1}],
Text["y", Scaled[{.5, -.05, 0}], {0, -1}],
Text["z", Scaled[{.5, .5, 1.1}]]}]}, Boxed -> False,
RevolutionAxis -> "Y"]

• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. Commented May 31, 2021 at 4:42

We define a region by

f[x_, y_] := (x - 5)^2 + y^2 - 3^2;
reg2=ImplicitRegion[f[x, y] <= 0, {x, y}]
reg2// Region


Then the implicit equation of revolution is f[Sqrt[x^2 + y^2], z] <= 0.

f[x_, y_] := (x - 5)^2 + y^2 - 3^2;
reg3=ImplicitRegion[f[Sqrt[x^2 + y^2], z] <= 0, {x, y, z}]
reg3//Volume
RegionPlot3D[DiscretizeRegion[reg3, MaxCellMeasure -> 0.01]]


90 π^2

For another implicit region, for example, an elliptical disk the method also works.

g[x_, y_] := (x - 5)^2 + 2 y^2 - 3^2;
reg3 = ImplicitRegion[g[Sqrt[x^2 + y^2], z] <= 0, {x, y, z}];
reg3 // Volume
(* 45 Sqrt[2] π^2 *)


RevolutionPlot3D needs a parametric representation of the curve. For your circle, try this code, modified from the 2nd example in the documentation for RevolutionPlot3D:

 RevolutionPlot3D[{5 + 3 Cos[t], 3 Sin[t]}, {t, 0, 2 Pi}]


The volume may be calculated either by a formula:

V== 2 Pi^2 r^2 R
2 Pi^2 3^2 5 == 90 Pi^2 == 888.264


or using integration of 2 Pi x, the circumference of the circle a x/y point describes during rotation, over the x/y circle:

NIntegrate[2 Pi x, {x, 2, 8}, {y, -Sqrt[9 - (x - 5)^2], Sqrt[9 - (x - 5)^2]}]


alternatively, we may use the "ImplicitRegion" command for the integral :

ir = ImplicitRegion[(x - 5)^2 + y^2 <= 9, {x, y}]
NIntegrate[2 Pi x, {x, y} \[Element] ir]