# Center of Mass of Non-Uniform Rod Using Piecewise-Defined Function?

1. Nov 24, 2015

### Chrono G. Xay

How would one go about finding the center of mass of a non-uniform rod when its cross-section has been modeling using a piecewise-defined function?

For a specific case let's use a drumstick, noting its volume as a sum of half of a sphere (the 'butt' end), a cylinder (the 'shaft'), the majority of half of an ellipsoid (the 'shoulder'), and the majority of either a smaller sphere or smaller ellipsoid.

With an ellipsoidal tip, the piecewise-defined function for its cross-section is given by:

f(x) = sqrt( (3)^2 - ( x + 97 )^2 ), x<-97;
f(x) = 3, -97 < x < 0;
f(x) = (3)*sqrt( 1 - ( x / 36 )^2 ), 0<x<32.8456;
f(x) = (2)*sqrt( 1 - ( ( x - 36 ) / 4 )^2 ), 32.8456<x=<40

(The value "32.8456" was obtained using equations related to the 'vesica pisces')

Now... If I were to take the integral of each piece... could I not easily compute the volume of the drumstick by squaring my sum and multiplying the result by π?

That might get me the volume, but I need to construct an equation for the object's linear density... I have read about one function called 'unit step' and another called 'heaviside', but am not sure which one would be appropriate, let alone how to input my pieces into the process...

The goal I am shooting for, assuming I can acquire an equation for the 'linear density' and 'center of mass' is to find the 'center of percussion'...

2. Nov 24, 2015

### Staff: Mentor

Integrating over x is the right idea. But you want to sum volume elements. Don't sum first and square later! Slicing the stick into thin disks of differential width dx, each having a cross sectional area related to the radius at the x location. So $dv = \pi f(x)^2 dx$. Integrate to sum up all the volume elements. So, sum the squares rather than squaring the sums!

If the material is of uniform density (such as a uniform piece of wood), multiply the volume element by that density $\rho$ to yield the mass of that volume element. So then each mass element is $dm = \rho \pi f(x)^2 dx$.

You should be able to work out how to find the linear mass density and center of gravity with the above machinery

3. Nov 27, 2015

### Chrono G. Xay

But in order to obtain the equation for a non-uniform rod's linear density, do I not have to take the piecewise function modeling its cross-section, write the equation in unit step notation, take the Laplace transform, and so on?

4. Nov 27, 2015

### Staff: Mentor

I don't see why you would need such a lot of mathematical machinery to do so. If the material that the object is made from is of a uniform density and you have its profile, then the rest seems to be accessible by routine methods. Given the cross-sectional area of the "rod" at some location along its length, the then the linear density there should be a simple calculation.

5. Nov 27, 2015

### Chrono G. Xay

I have not done this kind of thing before, so this is all new to me.

Can you explain some of the steps in the routine method you mentioned so that I can look them up? Someone I know had suggested going through a rather drawn-out process of plotting--inaccurate--points using the shadow of the object and having a computer approximate an equation connecting them all, which honestly sounds ridiculous. For the 'real world' volume it would be more accurate to measure how much water the rod pushes out of a graduated cylinder that had been filled to the very top.

I have watched a *several* videos online focused on finding the 'center of mass' of a non-uniform rod, and none of them had to model an object from the ground up, which might have involved the use of piecewise functions. They all had nice, neat, continuous functions.

...Come to think of it, if I just had an equation modeling the cross-section of the 'volume of revolution', wouldn't I just need to find the 'center of mass' along the cross-section's length? Nevertheless, it seems as though the multiple pieces would have to be written as a single, continuous function before anything else could be done...

Last edited: Nov 27, 2015
6. Nov 28, 2015

### Staff: Mentor

How the function is defined is not so important. A piecewise function can be treated in the same manner as a single continuous function except that you split the integral into sections that cover the individual domains of the function's pieces.

For example: Suppose your piecewise continuous function was defined as:

$f(x) = \left\{ \begin{array}{lr} 2 & : 0 \le x \le 3 \\ 2 + x/3 & : 3 < x \le 6 \\ 4 - (x - 6)^2 & : 6 \le x \le 8 \\ 0 & Otherwise \end{array} \right.$

Which would give a profile like this:

Then for the volume an integration can be set up as:
$$V = \pi \int_0^3 2^2~dx + \pi \int_3^6 \left(2 + \frac{x}{3} \right)^2~dx + \pi \int_6^8 (4 - (x - 6)^2)^2~dx$$
Don't worry overly much about mathematical details like limits at the domain intersections -- this is supposedly a model of a real-world object, so it's an approximation to begin with. Do the integrations and you've got your volume.

Set up a similar integration to find the centroid, etc.
Yes, you just need to locate the center of mass along your rod's length since it is is rotationally symmetric about its lengthwise axis. No, you don't need to worry about re-writing the function. Carry out the integrations over the domains of the pieces.