restart: with(student); (1) Pick an (a, b, c) value to place our point mass m in xyz-space. a:=3;b:=2;c:=6; (2) Consider a sphere centered at (1,1,1) with radius 1. Then (x-1)^2 + (y-1)^2 + (z-1)^2 = 1. Solving for z, z = 1 +/- sqrt(1 - (x-1)^2 - (y-1)^2) are the upper and lower limits. Similarly, the projection onto the xy-plane is the circle with radius 1, and center (1,1), i.e., (x-1)^2 + (y-1)^2 = 1 so y = 1 +/- sqrt(1 - (x-1)^2) are the upper and lower limits for y, with x going from 0 to 2. If the density is 1, then dM = 1dV (infinitesimal mass at (x,y,z).) The force of gravity on a point mass m at (a, b, c) from the infinitesmal mass dM at (x, y, z) is dF = GmdM/r^2*<x-a, y-b, z-c>/r where r = sqrt( ( x-a)^2 + (y-b)^2 + (z-c)^2 ), so dF = G*m*dM<x-a, y-b, z-c>/sqrt[ ( x-a)^2 + (y-b)^2 + (z-c)^2 ]^3 dV or dF = G*m*dM<x-a, y-b, z-c>/[( x-a)^2 + (y-b)^2 + (z-c)^2] ^(3/2) dV Picking units so that G*m = 1, the force in the x-direction is dF_x = G*m*dM*(x-a)/[( x-a)^2 + (y-b)^2 + (z-c)^2] ^(3/2) dV The total force in the x-direction is the triple integral over the solid: Tripleint((x-a)/((x-a)^2+(y-b)^2+(z-c)^2)^(3/2), z=1-sqrt(1(x-1)^2-(y-1)^2)..1+sqrt(1-(x-1)^2-(y-1)^2), y=1-sqrt(1-(x-1)^2) ..1+sqrt(1-(x-1)^2), x=0..2); aa:=evalf(%,6); (3) For a sphere, you can always find the force by putting all the mass at the center of mass. If p=1, then M=4/3pi(1)^3, and (1,1,1,) is the center (of mass). So the force in the x direction, F_x = G*m*M*(x-a)/[( x-a)^2 + (y-b)^2 + (z-c)^2] ^(3/2) becomes F_x = 4/3*pi*(1-a)/[( 1-a)^2 + (1-b)^2 + (1-c)^2] ^(3/2), 4*Pi/3*(1-a)/((1-a)^2+(1-b)^2+(1-c)^2)^(3/2);evalf(%); (4) For the tetrahedron bounded by the coordinate planes and 2x + 3y + z = 6, with p=1, the mass will be Tripleint(1, z=0..6-2*x-3*y, y=0..-2/3*x+2, x=0..3); m:=value(%) ; (5) z_bar = 1.5 Tripleint(z, z=0..6-2*x-3*y, y=0..-2/3*x+2, x=0..3); M_xy:=value (%);z_bar:=M_xy/m; (6) y_bar = 0.5 Tripleint(y, z=0..6-2*x-3*y, y=0..-2/3*x+2, x=0..3); M_xz:=value (%);y_bar:=M_xz/m; (7) x_bar = 0.75 Tripleint(x, z=0..6-2*x-3*y, y=0..-2/3*x+2, x=0..3); M_yz:=value (%);x_bar:=M_yz/m; (8) with(plots); (9) (9) plot with center of mass p:=plot3d(6-2*x-3*y, y=0..-2/3*x+2,x=0..3,axes=normal,scaling= constrained,grid=[10,10], style=wireframe,orientation= [136,79]) : sp:=plot3d([1/2+0.03*cos(t)*sin(s),3/4+0.03*sin(t)*sin(s), 3/2+0.03*cos(s)], t=0..2*Pi,s=0..Pi,scaling=constrained,axes= normal):display(p,sp); Again, If the density is 1, then dM = 1dV (infinitesimal mass at (x,y,z).) The force of gravity on a point mass m at (a, b, c) from the infinitesmal mass dM at (x, y, z) is dF = GmdM/r^2*<x-a, y-b, z-c>/r where r = sqrt( ( x-a)^2 + (y-b)^2 + (z-c)^2 ), so dF = G*m*dM<x-a, y-b, z-c>/sqrt[ ( x-a)^2 + (y-b)^2 + (z-c)^2 ]^3 dV or dF = G*m*dM<x-a, y-b, z-c>/[( x-a)^2 + (y-b)^2 + (z-c)^2] ^(3/2) dV Picking units so that G*m = 1, the force in the x-direction is dF_x = G*m*dM*(x-a)/[( x-a)^2 + (y-b)^2 + (z-c)^2] ^(3/2) dV The total force in the x-direction is the triple integral over the solid: Tripleint((x-a)/((x-a)^2+(y-b)^2+(z-c)^2)^(3/2), z=0..6-2*x-3*y, y=0..-2/3*x+2, x=0..3); F_x:=evalf(%); (10) Tripleint((y-b)/((x-a)^2+(y-b)^2+(z-c)^2)^(3/2), z=0..6-2*x-3*y, y=0..-2/3*x+2, x=0..3); F_y:=evalf(%); (11) Tripleint((z-c)/((x-a)^2+(y-b)^2+(z-c)^2)^(3/2), z=0..6-2*x-3*y, y=0..-2/3*x+2, x=0..3); F_z:=evalf(%); (12) Comparing to the values we get by treating all the mass as if it were located at the center of mass (0.75, 0.5, 1.5) we get for the x-direction (and the true value for comparing); 6*(0.75-a)/((0.75-a)^2+(0.5-b)^2+(1.5-c)^2)^(3/2);F_x; (13) Comparing to the values we get by treating all the mass as if it were located at the center of mass (0.75, 0.5, 1.5) we get for the y-direction (and the true value for comparing); 6*(0.5-b)/((0.75-a)^2+(0.5-b)^2+(1.5-c)^2)^(3/2);F_y; (14) Comparing to the values we get by treating all the mass as if it were located at the center of mass (0.75, 0.5, 1.5) we get for the z-direction (and the true value for comparing); 6*(1.5-c)/((0.75-a)^2+(0.5-b)^2+(1.5-c)^2)^(3/2);F_z; (15) (15) Changing the place the point mass m is {changing (a, b, c) at the beginning}, the sphere will always behave as if all the mass is at the center of mass, but not so for other solids like the tetrahedron.