1) Sun & Earth

Part a)

Clear["Global`*"]

(* The answers *)
mSunAnswer=2 (10^30);
mEarthAnswer=6 (10^24);

earthOrbit=1.49 (10^8) km;
moonOrbit=3.8 (10^5)km;m

eq1= {((G m1 m2)/(r^2))== m1 ((v^2)/r), v==((2π r)/period)};

sol=Solve[eq1,{m2,v}][[1]]

mass= m2 /.sol

mSun= mass /.{r->earthOrbit, period->365.25 days}

mEarth= mass /.{r->moonOrbit, period->27.3 days}

(mSun/mEarth) //ScientificForm

(mSunAnswer/mEarthAnswer)  //N//ScientificForm

Part b) Measure relative to the center of the sun

Clear["Global`*"]

mSun=2.0 (10^30);
mEarth=6.0 (10^24);
dEarthSun=149. (10^9);
radiusSun=696 (10^6);

reducedMass=((mSun mEarth)/(mSun + mEarth))

(reducedMass/mSun)

Part c) Measure relative to the center of the sun

Clear["Global`*"]

mSun=2.0 (10^30);
mEarth=6.0 (10^24);
dEarthSun=149. (10^9);
radiusSun=696 (10^6);

rcms=((mSun *0 + mEarth dEarthSun)/(mSun + mEarth))

(rcms/radiusSun)

2) Orbits

Clear["Global`*"]

?PolarPlot

r[θ_,e_:0,a_:1]=((a(1-(e^2)))/(1+e Cos[θ]))

Plot[{r[θ,0.0],r[θ,0.3],r[θ,0.7],r[θ,0.9],r[θ,1.1]} //Abs //Evaluate,{θ,0,4π},PlotStyle->{Red,Green,Blue,Magenta,Cyan},PlotRange->{0,Automatic}]

PolarPlot[{r[θ,0.0],r[θ,0.3],r[θ,0.7],r[θ,0.9],r[θ,1.1]} //Abs //Evaluate,{θ,0,4π},PlotStyle->{Red,Green,Blue,Magenta,Cyan},PlotRange->Automatic]

eq1=D[r[θ,e,a],θ]==0

Solve[eq1,θ] /.{C[_]:>0}

3) Small Meteroid

Clear["Global`*"]

Part a)

eq1= ((G M m)/(r^2))== m ((v^2)/r);
vSol=Solve[eq1,v][[2]]

angMom= m r v /.vSol

energy0 = (1/2)m (v^2)- ((G M m)/r) /.vSol

Part b) After explosing, v is the same, the mass of the Sun “M” reduces from M -> κ M, where we will determin κ. If it is just barely bound, the new energy will be zero.

energy1=  (1/2)m (v^2)- ((G κ M m)/r) /.vSol

Solve[ energy1 ==0,κ][[1]]

Part 3) We will conserve energy and angular Momentum

energy2= energy1 /.{κ->3/4}

angMom == m rMax vMax

kineticEnergyMax = (1/2)m (vMax^2)

potentialEnergyMax = - ((G κ M m)/rMax)  /.{κ->3/4}

totalEnergy = kineticEnergyMax + potentialEnergyMax

eqs = { angMom == m rMax vMax, energy2 == totalEnergy}

Solve[eqs,{rMax,vMax}][[1]]

4) Haleys Comet

Clear["Global`*"]

kepler= (period^2) == α (r^3)

eqEarth= kepler /.{period-> 1year, r-> 1 au }

eqComet= kepler /.{period-> 75.6year, r-> (((0.570+rMax))/2) au }

eqs={eqEarth,eqComet}

Solve[eqs,{α,rMax}]

5) Escape Velocity

Clear["Global`*"]

mSun=2 (10^30);
mEarth=6 (10^24);
rEarth= 6000 (10^3);

eq1= ((-G M m)/r)+ (1/2)m (v^2)

sol= Solve[eq1==0,v][[2]]

values={G->6.67 (10^(-11)),c->3.0 (10^8)}

v /.sol  /.values /.{r->rEarth,M->mEarth}

eq2= c == v /.sol

cSol=Solve[eq2,r][[1]]

r /.cSol /.values/.{M->mEarth}

r /.cSol /.values/.{M->mSun}