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; |
(%i4) | h(-x^2+1,-1,1); |
(%i5) | float(%); |
(%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:
(%i46) | h((1-x^2)*(5*x^2+1),-1,1); |
(%i47) | float(%); |
(%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:
(%i49) | h(sqrt(1-x^2),-1,1); |
(%i50) | float(%); |
(%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:
(%i6) | h(cos(x),-%pi/2,%pi/2); |
(%i7) | float(%); |
(%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: