play phryzby with physics

Where the Sun and the Earth Pull Alike

solved UniversalGravitation

Q. A rocket is fired from the earth towards the sunrg,rs=rg,es-rg,re. At what distance from the earth's centre is the gravitational force on the rocketEg,rs=Eg,re zero? Mass of the sun = 2 × 10³⁰ kgms=2×1030kg, mass of the earth = 6 × 10²⁴ kgme=6×1024kg. Neglect the effect of other planets etc. (orbital radius = 1.5 × 10¹¹ mrg,es=1.5×1011m). Answer in metres.

sunm = 2×10³⁰ kgearthm = 6×10²⁴ kgrocketr = 1.5×10¹¹ mr = ?rE on earth by sunE on rocket by earthE on rocket by sun
Inputs
ms
2e+30 kg
me
6e+24 kg
rg,es
150000000000.00 m
Outputs
distancerg,re?

How it's solved

Solved with UniversalGravitation

Given

  • ms=2×1030kg
  • me=6×1024kg
  • rg,es=1.5×1011m
  • Eg,rs=Eg,re from “gravitational force on the rocket”
  • rg,rs=rg,es-rg,re from “from the earth towards the sun”

Find rg,re.

Working
  1. law of gravitation(rocket, sun)Eg,rs=G⋅msrg,rs2
  2. gravitational force on the rocketEg,rs=Eg,re
  3. law of gravitation(rocket, earth)Eg,re=G⋅merg,re2
  4. from the earth towards the sunrg,rs=rg,es-rg,re
  5. rg,re=2.594×108m
  6. rg,re≈2.6×108mto 2 significant figures
Conclusion

The sun is far heavier than the earth, so its pull falls to match the earth's only very near the earth, where the two pulls on the rocket cancel.

The web of concepts

given read from the words equation asked

The Ruby that solves it

The question and its solution are small Ruby files. The engine runs them.

question.rb
1require_relative "../physics"23question :where_the_sun_and_the_earth_pull_alike do4  kind :numerical5  describes "A rocket is fired from the earth towards the sun. %{distance} is the gravitational force on the rocket " \6            "zero? Mass of the sun = %{sun}, mass of the earth = %{earth}. Neglect the effect of other planets etc. " \7            "(orbital radius = %{orbit}). Answer in metres."8  given sun: "2e30 kg"9  given earth: "6e24 kg"10  given orbit: "1.5e11 m"11  asks distance: "At what distance from the earth's centre"12end
solution.rb
1require_relative "../questions/where_the_sun_and_the_earth_pull_alike"2require_relative "../science/gravitation/universal_gravitation"34solve :where_the_sun_and_the_earth_pull_alike, using: UniversalGravitation do5  objects :rocket, :sun, :earth67  take sun: sun.mass8  take earth: earth.mass9  take orbit: earth.separation(from: sun)1011  deduce_from "gravitational force on the rocket", rocket.gravitational_intensity(by: sun) =>12                                                   rocket.gravitational_intensity(by: earth)13  deduce_from "from the earth towards the sun", rocket.separation(from: sun) =>14                                                earth.separation(from: sun) - rocket.separation(from: earth)1516  distance = rocket.separation(from: earth)17  answer distance:, in: "m", figures: 21819  conclusion "The sun is far heavier than the earth, so its pull falls to match the earth's only very near the " \20             "earth, where the two pulls on the rocket cancel."21end
playground.rb
1require_relative "../solutions/where_the_sun_and_the_earth_pull_alike"23play_with :where_the_sun_and_the_earth_pull_alike do4  title "Where the Sun and the Earth Pull Alike"5end
The laws it drew on
quantitywrittenunitswithinfrom
gravitational constantGN m² kg⁻²—UniversalGravitation
massmkg0 … ∞UniversalGravitation
radius of the bodyRm0 … ∞UniversalGravitation
surface gravitygsm/s²—UniversalGravitation
separationrgm0 … ∞UniversalGravitation
gravitational intensityEgm/s²—UniversalGravitation
surface gravity of groundgs,gm/s²—
mass of groundmgkg0 … ∞
radius of the body of groundRgm0 … ∞
surface gravity of rocketgs,rm/s²—
mass of rocketmrkg0 … ∞
radius of the body of rocketRrm0 … ∞
surface gravity of sungs,sm/s²—
mass of sunmskg0 … ∞
radius of the body of sunRsm0 … ∞
surface gravity of earthgs,em/s²—
mass of earthmekg0 … ∞
radius of the body of earthRem0 … ∞
gravitational intensity of ground by rocketEg,grm/s²—
separation of ground from rocketrg,grm0 … ∞
gravitational intensity of ground by sunEg,gsm/s²—
separation of ground from sunrg,gsm0 … ∞
gravitational intensity of ground by earthEg,gem/s²—
separation of ground from earthrg,gem0 … ∞
gravitational intensity of rocket by groundEg,rgm/s²—
separation of rocket from groundrg,rm0 … ∞
gravitational intensity of rocket by sunEg,rsm/s²—
separation of rocket from sunrg,rsm0 … ∞
gravitational intensity of rocket by earthEg,rem/s²—
separation of rocket from earthrg,rem0 … ∞
gravitational intensity of sun by groundEg,sgm/s²—
separation of sun from groundrg,sm0 … ∞
gravitational intensity of sun by rocketEg,srm/s²—
separation of sun from rocketrg,srm0 … ∞
gravitational intensity of sun by earthEg,sem/s²—
separation of sun from earthrg,sem0 … ∞
gravitational intensity of earth by groundEg,egm/s²—
separation of earth from groundrg,em0 … ∞
gravitational intensity of earth by rocketEg,erm/s²—
separation of earth from rocketrg,erm0 … ∞
gravitational intensity of earth by sunEg,esm/s²—
separation of earth from sunrg,esm0 … ∞
gs,b=G⋅mbRb2
gravity at the surface
Eg,oo=G⋅morg,oo2
law of gravitation
gs,g=G⋅mgRg2
gravity at the surface(ground)
gs,r=G⋅mrRr2
gravity at the surface(rocket)
gs,s=G⋅msRs2
gravity at the surface(sun)
gs,e=G⋅meRe2
gravity at the surface(earth)
Eg,gr=G⋅mrrg,gr2
law of gravitation(ground, rocket)
Eg,gs=G⋅msrg,gs2
law of gravitation(ground, sun)
Eg,ge=G⋅merg,ge2
law of gravitation(ground, earth)
Eg,rg=G⋅mgrg,r2
law of gravitation(rocket, ground)
Eg,rs=G⋅msrg,rs2
law of gravitation(rocket, sun)
Eg,re=G⋅merg,re2
law of gravitation(rocket, earth)
Eg,sg=G⋅mgrg,s2
law of gravitation(sun, ground)
Eg,sr=G⋅mrrg,sr2
law of gravitation(sun, rocket)
Eg,se=G⋅merg,se2
law of gravitation(sun, earth)
Eg,eg=G⋅mgrg,e2
law of gravitation(earth, ground)
Eg,er=G⋅mrrg,er2
law of gravitation(earth, rocket)
Eg,es=G⋅msrg,es2
law of gravitation(earth, sun)
Eg,rs=Eg,re
gravitational force on the rocket
rg,rs=rg,es-rg,re
from the earth towards the sun