Application Center - Maplesoft

# VecCalc: A package for Vector Calculus

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

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

* A Chocolate Kiss

* A Slice of Pie

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;

where and where and 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);

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 = . In cylindrical coordinates, the Jacobian is . So the mass is

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

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

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

So the coordinate of the center of mass is

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

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);

where and and where 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);

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 . In spherical coordinates, the Jacobian is

> 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(%);

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

> z0:=rho*cos(phi);

So the -first moment is

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

So the coordinate of the center of mass is

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

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);

We set the derivative equal to 0 and solve for :

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

So the top occurs at

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

The bottom occurs at where

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

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;

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

In cylindrical coordinates, we locate one pie slice at , and .

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);

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 . In cylindrical coordinates, the Jacobian is . So the mass is

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

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

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

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

So the and coordinates of the center of mass are

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

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

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

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

>