# Center of Mass w/ variable density

1. Nov 12, 2013

### scorpius1782

1. The problem statement, all variables and given/known data
A box with one corner at the origin and the opposite corner at (a,b,c). The density is:$\rho=\rho_o\frac{z^2}{c^2}$

2. Relevant equations
$r_{cm}=\frac{\int\vec{r}dm}{\int dm}$

3. The attempt at a solution
I calculated the mass:

$\int_{0,0,0}^{a,b,c}\rho_o\frac{z^2}{c^2}=\frac{abc\rho_o}{3}$

But I'm not sure what the top of the equation is suppose to mean. Am I suppose to multiply the density by the direction it is changing (z) then integrate? I can't find an example anywhere that explains it well enough so that I can understand.

Thanks for the help.

2. Nov 12, 2013

### haruspex

Top (numerator?) of which equation?
It asks for the centre of mass, so that requires three co-ordinates. In vectors, ∫ρ(r)r.dv/mass
E.g. to get the x-co-ordinate, ∫ρ(x,y,z).x.dxdydz/mass.

3. Nov 12, 2013

### scorpius1782

so I would need to do:

$\int_0^a\rho_o\frac{z^2}{c^2}x dx$
$\int_0^b\rho_o\frac{z^2}{c^2}y dy$
$\int_0^c\rho_o\frac{z^2}{c^2}z dz$

Am I understanding correctly then?

edit: also, by top equation I meant the position integral. I should just solve these 3 integrals and then divide by the mass then.

4. Nov 13, 2013

### haruspex

No, each one is a triple integral, dxdydz.

5. Nov 13, 2013

### HallsofIvy

That is
$$\int_{x=0}^1\int_{y=0}^1\int_{z= 0}^1\rho_0\frac{z}{c}dzdydx$$
By "Fubini's theorem" that can be written as a product of integrals:
$$\dfrac{\rho_0}{c}\left(\int_{x=0}^1 dx\right)\left(\int_{y= 0}^1 dy\right)\left(\int_{z= 0}^1 z dz\right)$$

6. Nov 13, 2013

### scorpius1782

This has me confused. It appears like my first equation but with (a,b,c) replaced with (1,1,1) and you've dropped the squares for z and c. Is this suppose to be another method to find the CM?

haruspex,

So, I should have something that looks like:

$\int_0^a\int_0^b\int_0^c\rho_o\frac{z^2}{c^2}x dxdydz$
$\int_0^a\int_0^b\int_0^c\rho_o\frac{z^2}{c^2}y dxdydz$
$\int_0^a\int_0^b\int_0^c\rho_o\frac{z^2}{c^2}z dxdydz$

which would give me $\hat{x}+\hat{y}+\hat{z}$ all divided by the mass I found?

If I understand it correctly now:

$\int_0^a\int_0^b\int_0^c\rho_o\frac{z^2}{c^2}x dxdydz=\frac{\rho_o}{c^2}\frac{a^2c^2b}{4}=\frac{\rho_oa^2b}{4}$
so for $\hat{x}$ I would get $\frac{\frac{\rho_oa^2b}{4}}{\frac{\rho_0abc}{3}}$

Which is just$\frac{3a}{4c}\hat{x}$

Thanks for the help.

Last edited: Nov 13, 2013
7. Nov 13, 2013

### haruspex

Yes.
I don't understand the plus signs. Each integral gives you one co-ordinate of a vector.
That doesn't look right. The dz should still be giving you a factor 1/3.

8. Nov 13, 2013

### scorpius1782

Ack, I forgot to square the z's for integration. Don't know why I did that. But, I get the gist so I'll be good from here. I just did plus instead of commas.

Thanks for all the help!