# Use MATHEMATICA to calculate the volume of the solid [duplicate]

This question already has an answer here:

Use MATHEMATICA to calculate the volume of the solid that results when the region enclosed by the given curves is revolved about the x- axis. f(x)=Pi^2 Sin[x] Cos[x]^3, f(x)= 4 x^2 x=0, x=Pi/4

## marked as duplicate by RunnyKine, Dr. belisarius, Jens, C. E., Niki EstnerSep 1 '14 at 6:28

• Please post your ideas and tell us where you got stuck. Otherwise you're just asking for somebody to do your homework (And your TA could be around!) – Dr. belisarius Sep 1 '14 at 1:34
• i have used 3D... ContourPlot[Pi^2 Sin[x] Cos[x]^3, 4 x^2, {x, 0, Pi/4}, Axes -> True, Frame -> False, AxesLabel -> {x, y}] – Ashneel Sep 1 '14 at 1:39
• i want the gra[ph in 2D – Ashneel Sep 1 '14 at 1:39

This volume between the regions can be obtained as follows:

f[x_] := Pi^2 Sin[x] Cos[x]^3
g[x_] := 4 x^2
v1 = Integrate[Pi g[z]^2, {z, 0, Pi/4}]
v2 = Integrate[Pi f[z]^2, {z, 0, Pi/4}]
N[v2 - v1]


yielding: [Pi]^6/320,(1/48 + (5 [Pi])/512) [Pi]^5, 12.7596 respectively.

You can use a number of v10 capabilities to visualize region and approximate volume (the second integral in straightforward but the first is problematic for Volume/RegionMeasure unless region is discretized).

ir1 = ImplicitRegion[y^2 + z^2 <= g[x]^2 && 0 < x < Pi/4, {x, y, z}];
ir2 = ImplicitRegion[y^2 + z^2 <= f[x]^2 && 0 < x < Pi/4, {x, y, z}];
roi = RegionDifference[ir2, ir1];
Volume[DiscretizeRegion[roi]]


yields: 12.0382

Visualizing region (with no particular emphasis on quality, just for illustration)

DiscretizeRegion@roi


• +1 for the Region approach. – RunnyKine Sep 1 '14 at 4:10
ftop = Pi^2  Sin[x] Cos[x]^3
fbtm = 4 x^2;
Plot[{ftop, fbtm}, {x, 0, Pi/4}]


Use Volume = Pi r^2 * h (cylinder volume) for top and bottom and take the difference (i.e remove volume of inner cylinder from outer)

vtop = Pi Integrate[ftop^2, {x, 0, Pi/4}];
vbtm = Pi Integrate[fbtm^2, {x, 0, Pi/4}];
vtop - vbtm


N[%]
(* 12.7596 *)


The area of the cross section, if you want it, is

 Integrate[ftop - fbtm, {x, 0, Pi/4}] // N
(*1.20459*)