Homework #3:

Off[Clear::wrsym]
Off[General::spell]
Off[General::spell1]

Setup:

colors = {red, green, blue, cyan, magenta, yellow, 
            black} = 
{RGBColor[1, 0, 
              0]
, RGBColor[0, 1, 0]
, 
            RGBColor[0, 0, 1]
, 
            CMYKColor[1, 0, 0, 0]
, 
            CMYKColor[0, 1, 0, 0]
, 
            CMYKColor[0, 0, 1, 0]
, 
            CMYKColor[0, 0, 0, 
              1]
};
Plot[Table[i x, {i, 1, 7}]  // Evaluate, {x, 0, 1}, 
        PlotStyle -> colors];

Protect[{colors, red, green, blue, cyan, magenta, yellow, 
          black}];

Problem #1:

Right-Handed Coordinate system:

{x, y, z} = DiagonalMatrix[{1, 1, 1}]

s = Cross[x, y]

s . z

Left-Handed Coordinate system: 
Invert all axes.

{x, y, z} = - DiagonalMatrix[{1, 1, 1}]

s = Cross[x, y]

s . z

Problem #2:(TEXT #2)

Clear["Global`*"]

<< Miscellaneous`PhysicalConstants`
<< Miscellaneous`Units`

?Miscellaneous`PhysicalConstants`*

The formula for resolving power is: λ /a≃ Sin[θ]≃θ, where a is the apperature. From the text, Fig.1, the parallax angle is: θ = d/D where d = 1a.u., and D is the distance to the star.

eq1 =  λ/a  == 
        1.22  θ
eq2 =  θ  ==  d /D

sol1 =  Solve[{eq1, eq2}, {D, θ}][[1]]

EarthSunDistance =  500.  Second * SpeedOfLight

\(distance = \ \(D\  /. sol1\)\  /. {a -> \ 200\ Inch, \ 
          d -> EarthSunDistance\ , \ λ\  -> \ 
            5000\ Angstrom}\)

distance = MKS[distance]

Convert[distance, LightYear]

Problem #3:(TEXT #3)

Clear["Global`*"]

<< Graphics`Graphics`

eq1 =  ℓ/(Subscript[ℓ, ret]) ==  
        (100. ^(((Subscript[m, ref]) - M)/5))

(Subscript[ℓ, ret]) =  2.52 *(10^(-8)) Watt/(Meter^2)

sol1 =  Solve[{eq1}, {ℓ}][[1]]

L  =  ℓ 4 π (((10 Parsec))^2)

L =  MKS[L  /. sol1 /. {(Subscript[m, ref]) -> 0}]

LinearLogPlot[L /Watt  // Evaluate, {M, 0, 25}, 
        AxesLabel -> {"Magnitude M", "Luminosity L"}];

Plot[Log[10. , L/Watt ] // Evaluate, {M, 0, 25}, 
        AxesLabel -> {"Magnitude M", "Luminosity L"}];

Problem #4:(TEXT #4)

eq1 = 
      m  -  M  ==  5 Log[
            10. ,  D/10 / Parsec]

sol1 =  Solve[eq1, m][[1]]

m  /. sol1  /. {M ->  4.72,  
        D ->  3 * (10^(4 )) Parsec}

Yes, m is just above 22.7. If we increase D by (10^3)

m  /. sol1  /. {M ->  4.72,  
        D -> 
          (10^3) *  3 * (10^(4 )) Parsec}

Problem #5:(TEXT #5)

Clear["Global`*"]

Outside:

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

sol1= Solve[eq1, v][[2]]

rules = {G -> 1, ρ -> 1, 
        M -> 4/3  π}

p1 = 
        Plot[v  /. sol1  //. rules  // Evaluate, {r, 1, 3}, 
          PlotStyle -> {Thickness[0.010], red}];

Inside:

eq1 =  
      m (v^2)/r  ==  G M m/(r^2)  //. {M  ->  ρ Volume,  
          Volume  -> (4/3) π (r^3)}

sol1= Solve[eq1, v][[2]]

v  /. sol1  //. rules

p2 = 
        Plot[v  /. sol1  //. rules  // Evaluate, {r, 0, 1}, 
          PlotStyle -> {Thickness[0.010], green}];

Show[p1, p2];

Problem #6:(TEXT #8)

Clear["Global`*"]

<< Miscellaneous`PhysicalConstants`

(Subscript[ϵ, 0]) = VacuumPermittivity;

forceE =  k (Subscript[q, 1]) (Subscript[q, 2])/(r^2)
forceG  =  G (Subscript[m, 1]) (Subscript[m, 2])/(r^2)

moonMass =  
        7.36 * (10^(22 )) 
          Kilogram;
earthMoonDistance =  3.84 * (10^8) Meter;

lhs =  
      forceG  /. {G -> GravitationalConstant,  
          (Subscript[m, 1]) -> EarthMass,  (Subscript[m, 2]) ->  moonMass,  
          r ->  earthMoonDistance}

rhs =  
      forceE  //. {(Subscript[q, 1]) ->  κ (Subscript[m, 1])/ProtonMass * 
              ElectronCharge, 
          (Subscript[q, 2]) ->  κ (Subscript[m, 2])/ProtonMass * ElectronCharge, 
          (Subscript[m, 1]) -> EarthMass,  
(Subscript[m, 2]) ->  
            moonMass, 
k ->   1/(4  π (Subscript[ϵ, 0])), 
r ->  
            earthMoonDistance, 
Ampere ->  
            Coulomb/Second, 
Coulomb ->  
            Joule/Volt, 
Joule ->  
            Newton Meter
}

Solve[lhs  ==  rhs, κ][[2]]

Problem #7:

Clear["Global`*"]

<< Miscellaneous`PhysicalConstants`

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

eq2 =  v  ==  H r

eq3 =  ρ == M/volume

volume  =  (4/3) π (r^3)

sol1 =  Solve[{eq1, eq2, eq3}, {ρ, M, v}][[1]]

{GravitationalConstant, HubbleConstant}

(Subscript[ρ, CRITICAL])  =  ρ  /. 
            sol1  /. {G -> GravitationalConstant,  
            H -> HubbleConstant}  /. {Newton ->  
            Kilogram Meter/(Second^2)}

(Subscript[ρ, GAL]) =  ((3.  10^-28 Kilogram)/(Meter^3))

ratio =  (Subscript[ρ, GAL])/(Subscript[ρ, CRITICAL])

ratio * 100