Application Center - Maplesoft

App Preview:

Centers of mass of an apple, a chocolate kiss, and a pie slice

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

cm.mws

Center of Mass Problems

Using Maple and the vec_calc Package

This worksheet shows how to find the mass and center of mass of 3-dimensional solids. As examples we find the mass and center of mass of

* An Apple

[Maple Plot]

* A Chocolate Kiss

[Maple Plot]

* A Slice of Pie

[Maple Plot]

To start the vec_calc package, execute the following commands:

> restart;

> libname:=libname,"C:/mylib/vec_calc7":

> with(vec_calc): vc_aliases:

> with(linalg):with(student):with(plots):

Warning, the protected names norm and trace have been redefined and unprotected

Warning, the name changecoords has been redefined

>

A Chocolate Kiss

In cylindrical coordinates, the top of the chocolate kiss is given by

> z0:=18-5*r^(1/3)-1/64*r^3;

z0 := 18-5*r^(1/3)-1/64*r^3

where 0 <= r ` ` <= 8 and where r and z are given in mm. We can plot the kiss using the command:

> cylinderplot( {[r,theta,z0],[r,theta,0]}, r=0..8, theta=0..2*Pi, color = brown, orientation=[0,75], scaling=constrained, style=patchnogrid, grid=[80,80], lightmodel=light2);

[Maple Plot]

Try clicking in the plot and dragging. This will rotate the plot so you can see the bottom. Also try changing the color to color=r or color=theta. This will allow you to see the bottom better.

We want to find the mass and center of mass of the kiss. We will assume the density of the kiss is the same as water, namely 1 gm/(cm^3) = 10^(-3) gm/(mm^3) . In cylindrical coordinates, the Jacobian is r . So the mass is

> Mass:=Muint(10^(-3)*r, z=0..z0, r=0..8, theta=0..2*Pi); Mass:=simplify(value(%)); evalf(%);

Mass := Int(Int(Int(1/1000*r,z = 0 .. 18-5*r^(1/3)-...

Mass := 1744/4375*Pi

1.252328592

So the mass is about 1.25 gm. By symmetry, the x and y coordinates of the center of mass are 0. To find the z coordinate, we need the z -first moment:

> zMoment:=Muint(z*10^(-3)*r, z=0..z0, r=0..8, theta=0..2*Pi); zMoment:=simplify(value(%)); evalf(%);

zMoment := Int(Int(Int(1/1000*z*r,z = 0 .. 18-5*r^(...

zMoment := 7172/4375*Pi

5.150057718

So the z coordinate of the center of mass is

> zbar:=zMoment/Mass; evalf(%);

zbar := 1793/436

4.112385321

The kiss is 18 mm tall and its center of mass is a little more than 4 mm up from the base.

>

An Apple

In spherical coordinates, the surface of the apple is given by

> rho0:=4-4*cos(phi);

rho0 := 4-4*cos(phi)

where 0 <= rho ` ` <= Pi and 0 <= theta ` ` <= 2*Pi and where r is given in cm. We can plot the kiss using the command:

> sphereplot( rho0, theta=0..2*Pi, phi=0..Pi, color = red, orientation=[0,65], scaling=constrained, style=patchnogrid, grid=[80,80], lightmodel=light2);

[Maple Plot]

Try clicking in the plot and dragging. This will rotate the plot so you can see the dimple at the top. Also try changing the color to color=phi. This will allow you to see the top better.

We want to find the mass and center of mass of the apple. We will assume the density of the kiss is the same as water, namely 1 gm/(cm^3) . In spherical coordinates, the Jacobian is

> J:=rho^2*sin(phi);

J := rho^2*sin(phi)

So the mass is

> Mass:=Muint(J, rho=0..rho0, theta=0..2*Pi, phi=0..Pi); Mass:=value(%); evalf(%);

Mass := Int(Int(Int(rho^2*sin(phi),rho = 0 .. 4-4*c...

Mass := 512/3*Pi

536.1651464

So the mass is about 536 gm. By symmetry, the x and y coordinates of the center of mass are 0. To find the z coordinate, we need the z -first moment. The z -coordinate is

> z0:=rho*cos(phi);

z0 := rho*cos(phi)

So the z -first moment is

> zMoment:=Muint(z0*J, rho=0..rho0, theta=0..2*Pi, phi=0..Pi); zMoment:=value(%); evalf(%);

zMoment := Int(Int(Int(rho^3*cos(phi)*sin(phi),rho ...

zMoment := -8192/15*Pi

-1715.728468

So the z coordinate of the center of mass is

> zbar:=zMoment/Mass; evalf(%);

zbar := -16/5

-3.200000000

That is, the center of mass is 3.2 cm below the origin.

To understand the geometrical significance of this answer, we need to know where the top and bottom of the apple are. The top occurs at the maximum of the function

> z1:=subs(rho=rho0,z0);

z1 := (4-4*cos(phi))*cos(phi)

We set the derivative equal to 0 and solve for phi :

> diff(z1,phi)=0; solve(%,phi);

4*sin(phi)*cos(phi)-(4-4*cos(phi))*sin(phi) = 0

0, 1/3*Pi, -1/3*Pi

So the top occurs at

> z=simplify(subs(phi=Pi/3,z1));

z = 1

The bottom occurs at phi = Pi where

> z=simplify(subs(phi=Pi,z1));

z = -8

So the apple is 9 cm high and the center of mass occurs 4.8 cm above the bottom.

>

A Slice of Pie

A pie is 12 cm in radius and is 3 cm deep. The top is flat but the bottom is given in cylindrical coordinate by

> z0:=3*(r/12)^4;

z0 := 1/6912*r^4

The pie is cut into 6 slices. Thus each piece is 60 degrees wide or Pi/3 radians wide.

In cylindrical coordinates, we locate one pie slice at 0 <= r ` ` <= 12 , and -Pi/6 <= theta ` ` <= Pi/6 .

We can plot the top, bottom and sides of the pie slice using the commands:

> top:=cylinderplot( [r,theta,3], r=0..12, theta=-Pi/6..Pi/6, grid=[40,40], color = wheat):

> bot:=cylinderplot( [r,theta,z0], r=0..12, theta=-Pi/6..Pi/6, grid=[40,40], color = brown):

> sides:=cylinderplot( {[r,-Pi/6,z],[r,Pi/6,z]}, r=0..12, z=z0..3, grid=[40,40], color = yellow):

> display({top,bot,sides}, orientation=[-60,80], scaling=constrained, style=patchnogrid);

[Maple Plot]

Try clicking in the plot and dragging. This will rotate the plot so you can see all sides better. Also try adding axes so that you can see the slice is symmetric across the x-axis.

We want to find the mass and center of mass of the pie slice. We will assume the density of the pie is the same as water, namely 1 gm/(cm^3) . In cylindrical coordinates, the Jacobian is r . So the mass is

> Mass:=Muint(r, z=z0..3, r=0..12, theta=-Pi/6..Pi/6); Mass:=value(%); evalf(%);

Mass := Int(Int(Int(r,z = 1/6912*r^4 .. 3),r = 0 .....

Mass := 48*Pi

150.7964474

By symmetry, the y coordinate of the center of mass is 0. To find the x and z coordinates, we need the x and z -first moments:

> xMoment:=Muint(r*cos(theta)*r, z=z0..3, r=0..12, theta=-Pi/6..Pi/6); xMoment:=value(%); evalf(%);

xMoment := Int(Int(Int(r^2*cos(theta),z = 1/6912*r^...

xMoment := 6912/7

987.4285714

> zMoment:=Muint(z*r, z=z0..3, r=0..12, theta=-Pi/6..Pi/6); zMoment:=value(%); evalf(%);

zMoment := Int(Int(Int(z*r,z = 1/6912*r^4 .. 3),r =...

zMoment := 432/5*Pi

271.4336053

So the x and z coordinates of the center of mass are

> xbar:=xMoment/Mass; evalf(%);

xbar := 144/7*1/Pi

6.548089085

> zbar:=zMoment/Mass; evalf(%);

zbar := 9/5

1.800000000

In summary, the mass is about 151 gm and the center of mass is at

> evalf([xbar,0,zbar]);

[6.548089085, 0., 1.800000000]

>