# How Can Gravity Be Expressed as a Function of Density?

• Nikitin
In summary: The gravitational pull is almost a constant G anywhere on Earth's surface, assuming a uniform density.
Nikitin
Hi, I'm just playing a bit with the numbers... The gravitational strength of a planet really depends on its density, but I'm wondering how I'm supposed to create a formula where gravity is the function of a planet's average density..

M= mass of planet. G= Newton's gravitational constant. r= average radius of planet.

Strength of a gravitational field: M*G/r^2 = g. Density of a planet: M/[(4/3)pi*r^3] = density

How can I create a function for g where density is the variable?

The closest I'm coming to is g(density)= (density*4*pi/3)*G*r, and this is by incerting the M=density*[(4/3)pi*r^3] into the strength of a gravitational field formula.

And all help is appreciated ;) Thank you in advance

Last edited:
Yah you can't really do that. Actually, you'll never be able to do that with anything built using calculus. Something like a density is basically giving you infinitesimal information at some infinitesimal volume element at some point in space. It's impossible to expand this to some value that normally requires an integration over the whole or even part of the space in question.

Edit: The formula you got had a huge assumption: constant density. This works because for constant functions, what happens at one point happens at all points and no integration is required (or well, actually your "M" was an implied integration!)

Last edited:
Nikitin said:
The closest I'm coming to is g(density)= (density*4*pi/3)*G*r, and this is by incerting the M=density*[(4/3)pi*r^3] into the strength of a gravitational field formula.
That looks fine to me. What don't you like about that formula?

Nikitin said:
The closest I'm coming to is g(density)= (density*4*pi/3)*G*r, and this is by incerting the M=density*[(4/3)pi*r^3] into the strength of a gravitational field formula.

That gives you g at any point INSIDE of the planet, assuming constant density. Remember that when you're outside of a spherical object (of uniform density) the mass of the entire thing can be treated as if it were all concentrated at a single point at its center, so once you're outside of the thing the density is no longer important. For example, if the sun were replaced by an object of equal mass but the size of the moon, our orbit around the object would be unaffected.

So, with constant density you get the following:

$$g=\begin{cases} - \frac{4}{3} \pi G \rho r & \text{ if } r\leq R \\ -GM/r^2 & \text{ if } r\geq R \end{cases}$$

Where R is the radius of the planet, ρ is the density, M is the mass of the planet, and r is your distance from the center.If you allow the density to vary, then things get a lot more complicated. In rectangular coordinates, the density is a function of position: ρ(x,y,z). You then get:

$$g =- \frac{G}{r^2}\int_V \rho~dV$$

where $V=\frac{4}{3}\pi r^3$.

hmm guys after checking my question properly I find that it is kind of silly. Density doesn't really say anything about the mass of a sphere, you'd need to know both the density and radius to find the gravity on the surface.

Afterall, the gravitational pull of a sphere 2 centimetres in diameter would be pretty meagre if the density/mass isn't high enough.

Superstring said:
That gives you g at any point INSIDE of the planet, assuming constant density. Remember that when you're outside of a spherical object (of uniform density) the mass of the entire thing can be treated as if it were all concentrated at a single point at its center, so once you're outside of the thing the density is no longer important. For example, if the sun were replaced by an object of equal mass but the size of the moon, our orbit around the object would be unaffected.

So, with constant density you get the following:

$$g=\begin{cases} - \frac{4}{3} \pi G \rho r & \text{ if } r\leq R \\ -GM/r^2 & \text{ if } r\geq R \end{cases}$$

Where R is the radius of the planet, ρ is the density, M is the mass of the planet, and r is your distance from the center.If you allow the density to vary, then things get a lot more complicated. In rectangular coordinates, the density is a function of position: ρ(x,y,z). You then get:

$$g =- \frac{G}{r^2}\int_V \rho~dV$$

where $V=\frac{4}{3}\pi r^3$.

Why would the formula give the gravity inside the sphere? I'm not quite sure.. it's the same formula as Newton's just changed a little. And Newton's formula doesn't really work for inside a sphere, does it??

And a final thing: the density of most plantets is pretty constant is it not? The gravitational pull is almost a constant G anywhere on Earth's surface.

Last edited:
Nikitin said:
And a final thing: the density of most plantets is pretty constant is it not? The gravitational pull is almost a constant G anywhere on Earth's surface.
Not at all! The density of the Earth varies from 2.6 gm/cc at the surface to 13.1 gm/cc at the center. And that's for a rocky planet. For the gas giant planets the range is much, much greater.

Nikitin said:
Why would the formula give the gravity inside the sphere? I'm not quite sure.. it's the same formula as Newton's just changed a little. And Newton's formula doesn't really work for inside a sphere, does it??

Because the mass that is pulling on you is a function of how far you are from the center. If you are at a distance r from the planet's center, the only mass that effects you gravitationally is the mass contained by a (imaginary) spherical surface of radius r. The rest of the mass of the planet (any mass "above" this distance r) has no effect on you at all because everything cancels out.

Is the following wrong? (as a whole please, the general picture.)

The idea that gravitational force is somehow proportional to mass density and distance (or r) seems obvious and yet to some extent seems flawed.

The relationship would be better described as, gravitational force is proportional to the absolute amount of mass and the distance from the center of mass to the point where the force is to be determined.

As example, consider the density of the Earth as compared to the density of Jupiter. The Earth has a higher mass density than Jupiter, while Jupiter has a far greater volume of mass by far. If the Earth's density were suddenly changed to be equivalent to that of Jupiter. It radius would increase and the gravitational force at its new surface would decrease.

While it is true that given a defined mass, the gravitational force at its surface will be proportional to its density, the gravitational force itself appears to be a general function of the absolute mass involved rather than its density.

Nikitin said:
hmm guys after checking my question properly I find that it is kind of silly. Density doesn't really say anything about the mass of a sphere, you'd need to know both the density and radius to find the gravity on the surface.

Upon integration it tells you everything about the mass ;)
Why would the formula give the gravity inside the sphere? I'm not quite sure.. it's the same formula as Newton's just changed a little. And Newton's formula doesn't really work for inside a sphere, does it??

Sure it does, the details just weren't given.

You can calculate the gravitational acceleration given by a the Poisson equation $\nabla \dot \bf{g} = 4\pi G\rho$.

Assuming a spherically symmetric mass distribution, you can use gauss' law and the problem becomes simple. Due to gauss' law, integrating over the volume gives you

$4\pi {\bf g} r^2 = 4\pi G \int_0^r \rho(r') r'^2 sin(\theta) dr' d\theta d\phi$

where you integrate only up to the radius that you're testing the gravity at. So again, assuming spherical symmetry, the integration becomes

${\bf g} ={{4\pi G}\over{r^2}} \int_0^r\rho(r') r'^2 dr'$

This is typically what you're left with. If $\rho$ is constant, that is $\rho = {{3M}\over{4\pi R^3}}$ where big R is the total radius of your constant density sphere, what you get is what Nikitin wrote down. Notice that as long as the density is spherically symmetric, it doesn't actually matter what is happening at a radius beyond your test mass!

If your spherical symmetry is broken, Gauss' law doesn't allow you to do the nice little trick that simplifies this tremendously.

EDIT: Ok I think I got everything right... I should be doing this on pencil adn paper first before posting!

allright, thanks people but there's this:

D H said:
Not at all! The density of the Earth varies from 2.6 gm/cc at the surface to 13.1 gm/cc at the center. And that's for a rocky planet. For the gas giant planets the range is much, much greater.

ouch! yeh of course.. was late yesterday

But what i was thinking, was the average density of a block of Earth below my feet going down to the earth-centre would be circa the same if I was living in Greenland as if I was living in Egypt.

So what is the problems about using density to calculate gravity (outside the planet)? other than the fact that it is impractical of course.

Nikitin said:
allright, thanks people but there's this:
ouch! yeh of course.. was late yesterday

But what i was thinking, was the average density of a block of Earth below my feet going down to the earth-centre would be circa the same if I was living in Greenland as if I was living in Egypt.

So what is the problems about using density to calculate gravity (outside the planet)? other than the fact that it is impractical of course.

One of my old professors has the propensity to tell her students "You're Working Too Hard!". And that's what I will tell you.

Outside the planet (assuming spherical symmetry), the ONLY thing you care about is the total mass of that planet, nothing else. So why should you care about the density, considering that knowing that fact will STILL not give you the gravity without knowing the volume (which ultimately leads you to the total mass anyway!). So your insistence to want to do it THIS way is puzzling, since it is just more work for not a whole lot of gain.

Zz.

Nikitin said:
But what i was thinking, was the average density of a block of Earth below my feet going down to the earth-centre would be circa the same if I was living in Greenland as if I was living in Egypt.

So what is the problems about using density to calculate gravity (outside the planet)? other than the fact that it is impractical of course.

Any real planet's density function could be ridiculously complicated depending on how accurate you want to make it. You either have to make the assumption the density is constant, the density is very approximately modeled by some function, or the density is completely indescribable using a nice, smooth mathematical function.

The 1st is trivial, the second is unrealistic and unable to do what you want to do, the third requires numerical integration. You are not going to be able to determine a way to basically say ${\bf g} = f(\rho)$

What you're basically trying to do is ask for a property, the gravitational acceleration, that requires knowledge of the whole system, by using just the density, which unless you integrate, can only give you information about what is happening at your test mass's position.

ok thx

Nikitin said:
But what i was thinking, was the average density of a block of Earth below my feet going down to the earth-centre would be circa the same if I was living in Greenland as if I was living in Egypt.

So what is the problems about using density to calculate gravity (outside the planet)? other than the fact that it is impractical of course.
The Preliminary Earth Reference Model gives a picture of the interior of the Earth in terms of density and gravitational acceleration. See http://geophysics.ou.edu/solid_earth/prem.html .

However, that picture isn't very useful for determining gravitation at or above the Earth's surface. The reverse mapping is extremely useful. Local variations in gravitation can point to interesting geological formations. For example, gravitation above a salt dome will be anomalously low due to the low density of salt. Since salt domes are highly correlated with natural gas and oil deposits, finding such gravity anomalies is of high interest to petroleum engineers.

Dense rock such as basalt will result in anomalously high gravitation. Here's a false color gravity anomaly map of Iowa:

That ridge running diagonally across Iowa is a part of the (failed) Midcontinent Rift System. 1.1 billion years ago the North American plate started to split in half. That diagonal ridge results from the basalt that filled the rift as it was forming.

ZapperZ said:
One of my old professors has the propensity to tell her students "You're Working Too Hard!". And that's what I will tell you.
Exactly. And working in the wrong direction to boot. We don't have a good enough model of density to do what the OP wants. It's rather hard (rather impossible) to get sensors deep into the interior of the Earth. Scientists have to infer interior density rather measure it. Models of the Earth's gravity field are one of the tools that scientists use.

Outside the planet (assuming spherical symmetry), the ONLY thing you care about is the total mass of that planet, nothing else.
And if you don't assume spherical symmetry (which you had better not assume if you want to model the orbits of artificial satellites about the Earth), a density model won't be of much help. However, a model of the Earth's non-spherical gravity field is one of the things that does lead to a density model.

Last edited by a moderator:
D H said:
And if you don't assume spherical symmetry (which you had better not assume if you want to model the orbits of artificial satellites about the Earth), a density model won't be of much help. However, a model of the Earth's non-spherical gravity field is one of the things that does lead to a density model.
bold emphasis mine

Here the density model is really only an indicator of the unequal distribution of the total mass. Density itself should be considered only to the extent that it is associated with the total mass and the distribution of total mass. Mass distribution or variations in density affect where the center of mass is and where it appears to be from different positions in an orbit. But the density itself is only an indicator of variations in distribution and where one is concerned with the force of gravitation at or near the surface of a gravitational body and then only because it is an indicator of the total mass involved. Correct?

It took me a long time to understand that density was only, in the case of gravity, an indicator of total mass and it had no real direct connection to the force of gravity aside from the total mass involved and how it is distributed in rocky or dynamic gaseous gravitational objects.

First impressions are that density is directly involved. As the density of a given volume of mass is increased the gravitational force its surface also increase, but so does the distance between that surface and the center of mass. Again, the density is secondary to the total mass involved which has not changed.

I may not be stating this clearly but it is accurate, is it not?

The total mass is the only relevant parameter for a spherically symmetric density. For density that is not spherically symmetric the field cannot simply be modeled by the total mass.

IMO, the density is primary, and it is only in the special case of spherical symmetry that the density can be neglected in favor of the total mass.

http://en.wikipedia.org/wiki/Gauss'_law_for_gravity#Differential_form

Last edited:
I may be wrong but when I was looking at black holes some time ago it seemed to me that density was the most important, re shwartzchild radius which seems to mean that any mass can cause a black hole if compressed enough, including the Earth resulting in a gravitational pull where the escape velocity exceeds the speed of light. So as density decreases you are pushed further away from the center resulting in lower gravitational force at the surface and so lower escape velocities. Although gravity does not seem to be stated as such.

OnlyMe said:
Here the density model is really only an indicator of the unequal distribution of the total mass. Density itself should be considered only to the extent that it is associated with the total mass and the distribution of total mass. Mass distribution or variations in density affect where the center of mass is and where it appears to be from different positions in an orbit. But the density itself is only an indicator of variations in distribution and where one is concerned with the force of gravitation at or near the surface of a gravitational body and then only because it is an indicator of the total mass involved. Correct?
That is correct for an object with a spherical density distribution (i.e., density is a function of radial distance from the center of mass only). It is incorrect if the mass does not have a spherical density distribution.
DaleSpam said:
IMO, the density is primary, and it is only in the special case of spherical symmetry that the density can be neglected in favor of the total mass.

http://en.wikipedia.org/wiki/Gauss'_law_for_gravity#Differential_form
I agree with you that density variations must be modeled if you are going to use Gauss' law to compute gravitation for a body that does not have a spherically symmetric density function. I disagree in the sense that nobody (practically nobody) uses Gauss' law to compute gravitation toward something like a planet or a star. Density models with sufficient accuracy to properly represent orbits just don't exist, and even if one did exist it would be too hard to use.

What is typically used instead is a spherical harmonics model of gravitation for planets and the Sun. Orbits can be computed directly from the spherical harmonics model, and the spherical harmonics model can be fine-tuned to yield a best fit to observed data. There is no need to go to a density model.

That said, spherical harmonics models are not such a good fit for things that aren't particularly spherical such as lumpy, misshapen potatoes or asteroids. There is some interesting work on developing gravitational models for asteroids based on observed shape. The shape model combined with an assumed density model (typically constant density, but not always) yields a gravitational model. Gauss' law is not used directly in the sense that one integrates over the resultant volume. It is used indirectly to yield the equation for the gravitational acceleration toward a pyramid.

DaleSpam said:
The total mass is the only relevant parameter for a spherically symmetric density. For density that is not spherically symmetric the field cannot simply be modeled by the total mass.

IMO, the density is primary, and it is only in the special case of spherical symmetry that the density can be neglected in favor of the total mass.

http://en.wikipedia.org/wiki/Gauss'_law_for_gravity#Differential_form

Dale, I don't believe we are really in any functional disagreement. Density distribution does play a role in the shape of a gravitational field. I just look at density in this circumstance as an indicator of the distribution of the involved mass.

John15 said:
I may be wrong but when I was looking at black holes some time ago it seemed to me that density was the most important, re shwartzchild radius which seems to mean that any mass can cause a black hole if compressed enough, including the Earth resulting in a gravitational pull where the escape velocity exceeds the speed of light. So as density decreases you are pushed further away from the center resulting in lower gravitational force at the surface and so lower escape velocities. Although gravity does not seem to be stated as such.

I see nothing wrong with this. BHs are generally treated as uniform in mass distribution. Essentially as perfect fluids or condensed matter models, in which the distribution of mass is uniform relative to an outside frame of reference. The second, example above just assumes the same conditions that the involved mass is uniform in distribution.

In both cases, mass density is proportional to the force of gravitation at the surface of the involved mass, assuming a spherical gravitational source.

## 1. What is gravity as a function of density?

Gravity as a function of density refers to the relationship between the density of an object and the gravitational force it experiences. This can be described by the formula F = G(m1m2)/r^2, where F is the gravitational force, G is the universal gravitational constant, m1 and m2 are the masses of the two objects, and r is the distance between them.

## 2. How does density affect gravity?

Density affects gravity by influencing the mass of an object, which in turn affects the gravitational force it experiences. Objects with higher densities have more mass per unit volume, and therefore a greater gravitational force acting on them compared to objects with lower densities.

## 3. Can density change the strength of gravity?

Yes, density can change the strength of gravity. As mentioned before, the higher the density of an object, the greater its mass and therefore the greater the gravitational force acting on it. This is why objects with higher densities, such as planets, have stronger gravitational forces compared to less dense objects like asteroids.

## 4. How does the density of Earth affect the strength of its gravity?

The density of Earth does play a role in the strength of its gravity. However, it is not the only factor. Earth's mass and the distance between objects are also important. Earth's average density is about 5.51 grams per cubic centimeter, which contributes to its strength of gravity being approximately 9.8 meters per second squared.

## 5. Is there a limit to how high density can affect gravity?

There is no limit to how high density can affect gravity. As the density of an object increases, its mass also increases, resulting in a stronger gravitational force. However, at extremely high densities, such as those found in black holes, the laws of physics as we know them may break down, making it difficult to accurately predict the effects of gravity.

• Introductory Physics Homework Help
Replies
9
Views
899
• Other Physics Topics
Replies
12
Views
2K
• Introductory Physics Homework Help
Replies
1
Views
554
• Introductory Physics Homework Help
Replies
7
Views
305
• Introductory Physics Homework Help
Replies
4
Views
791
• Introductory Physics Homework Help
Replies
24
Views
720
• Other Physics Topics
Replies
4
Views
1K
Replies
15
Views
2K
• Other Physics Topics
Replies
1
Views
1K
• Classical Physics
Replies
6
Views
714