# Thread: Calculating differences in spheres with variable as a radius

1. ## Calculating differences in spheres with variable as a radius

I'm close to finishing this problem. This isn't strictly a calculus problem, but it seemed closer to one than to a physics problem. I first had to calculate the mass of a sphere inside a sphere. The outside sphere is denser than the inside sphere. Now I need to create a function that represents how a radius r of the inner sphere would change the mass of the sphere. Thanks in advance for any help.

2. Originally Posted by djvanthegoat
I'm close to finishing this problem. This isn't strictly a calculus problem, but it seemed closer to one than to a physics problem. I first had to calculate the mass of a sphere inside a sphere. The outside sphere is denser than the inside sphere. Now I need to create a function that represents how a radius r of the inner sphere would change the mass of the sphere. Thanks in advance for any help.
Let R denote the radius of the outer sphere and r the radius of the inner sphere. Let d denote the density of the inner sphere and D the density of the surrounding shell that means what is left from the outer sphere. I assume that only the radius of the inner sphere is variable, all other values are constant. Then the mass of the complete solid is calculated by:

$\displaystyle m(r)=\left(\frac43 \pi R^3-\frac43 \pi r^3\right) D + \frac43 \pi r^3 d = \frac43 \pi \left(\left(R^3-r^3\right) D+ r^3 d\right)$