186k views
5 votes
Compute the acceleration of gravity for a given distance from the earth's center, distcenter, assigning the result to accelgravity. the expression for the acceleration of gravity is: (g * m) / (d2), where g is the gravitational constant 6.673 x 10-11, m is the mass of the earth 5.98 x 1024 (in kg) and d is the distance in meters from the earth's center (stored in variable distcenter).

User Sole
by
8.3k points

1 Answer

1 vote
Looks like we can choose any d we want, so why not 1m? a = g*m/d^2 = (6.673*10⁻¹¹)(5.98*10²⁴)/(1²) = 3.97*10⁻¹⁴ m/s². This would occur within the earth and would certainly be non-physical if we considered general relativity, but it works. Otherwise, just choose a different d, why not 1.50*10¹¹ m, the mean distance from the earth to the sun.
User Szekelygobe
by
7.8k points