The Center of gravity

The solid of revolution around the axis x
S:the area,V:the volume,h:height of the center of gravity
2*%pi*h*S=V (Pappus-Guldin theorem)

(%i1) h(f,a,b):=integrate(f^2,x,a,b)/integrate(f,x,a,b)/2;

Result

(%i4) h(-x^2+1,-1,1);

Result

(%i5) float(%);

Result

(%i9) load(draw)$

(%i29) draw2d(
xaxis=true,
yaxis=true,
point_type= asterisk,
point_size= 1,
grid = true,
points([[0,0.4]]),
explicit(-x^2+1,x,-1,1)
)$

Figure 1:
Result

(%i46) h((1-x^2)*(5*x^2+1),-1,1);

Result

(%i47) float(%);

Result

(%i52) draw2d(
xaxis=true,
yaxis=true,
point_type= asterisk,
point_size= 1,
grid = true,
points([[0,0.7238]]),
explicit((1-x^2)*(5*x^2+1),x,-1,1)
)$

Figure 2:
Result

(%i49) h(sqrt(1-x^2),-1,1);

Result

(%i50) float(%);

Result

(%i51) draw2d(
xaxis=true,
yaxis=true,
point_type= asterisk,
point_size= 1,
grid = true,
points([[0,0.4244]]),
explicit(sqrt(1-x^2),x,-1,1)
)$

Figure 3:
Result

(%i6) h(cos(x),-%pi/2,%pi/2);

Result

(%i7) float(%);

Result

(%i40) draw2d(
xaxis=true,
yaxis=true,
point_type= asterisk,
point_size= 1,
grid = true,
points([[0,0.3927]]),
explicit(cos(x),x,-%pi/2,%pi/2)
)$

Figure 4:
Result


Created with wxMaxima. inserted by FC2 system