Homework #2

Off[General::spell];
Off[General::spell1];
Off[Solve::ifun];

Problem 1: The right way:

Note: We will use Hobbiton as our vertex, and compute 3 angles. The angle from Erebor to Dagorlad, Dagorlad to Corsairs, and Erebor to Corsairs. If the sum of the first two angles adds up to the third, the space is flat.

Import["/Net/thy2/olness/3368/ttt.bmp"];

Show[%];

rule = {
Thread[{a, b, c} -> {813, 960, 
              735}], 
Thread[{a, b, c} -> {960,  
              1112,  780}], 
Thread[{a, b, 
              c} -> {813, 1112, 1498}]
}

eq1 = {c^2 == 
          a^2  +  b^2  -  2 a b Cos[γ]}

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

result = γ/Degree  /. sol1  /. rule  // N

result[[1]]  +  result[[2]]

Problem 1: The wrong way:

rule = {Thread[{a, b, c} -> {813, 735,  960}], 
        Thread[{a, b, c} -> 
            RotateLeft[{813, 735,  960}]], 
Thread[{a, b, 
              c} -> RotateRight[{813, 735,  960}]]}

eq1 = {c^2 == 
          a^2  +  b^2  -  2 a b Cos[γ]}

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

result = γ/Degree  /. sol1  /. rule  // N

Plus  @@  result

Problem 3:

<< Miscellaneous`PhysicalConstants`

<< Miscellaneous`Units`

?Miscellaneous`PhysicalConstants`*

?PlanckConstantReduced

PlanckConstantReduced

ProtonMass

proton =  PlanckConstantReduced/2/(2 ProtonMass)  // 
        Simplify

MKS[proton/(SpeedOfLight^2)]  //. {Joule  -> Newton Meter,  
        Newton ->  Kilogram Meter/(Second^2)}

% SpeedOfLight

electron =  PlanckConstantReduced/2/(2 ElectronMass)  // 
        Simplify

MKS[electron/(SpeedOfLight^2)]  //. {Joule  -> Newton Meter,  
        Newton ->  Kilogram Meter/(Second^2)}

% SpeedOfLight

Problem 4:

result =  A/(4 π r^2) * 4 π  +  π

result  /. {A -> 0}

result  /. {A -> 4  π r^2}

Problem 5:

2^16

Problem 6

inside[n_] = 2 (π^(n/2)) (r^n)/(n Gamma[n/2])

outside[n_] = D[inside[n], r]

Table[ {n, inside[n], outside[n]}, {n, 1, 10}]

Integrate[ 1, {r, -r, r}]

D[%, r]

Integrate[ r, {r, 0, r}, {ϕ, 0, 2  π}]

D[%, r]

Integrate[ (r^2) Sin[θ], {r, 0, r}, {ϕ, 0, 
        2  π}, {θ, 0, π}]

D[%, r]

Integrate[ (r^3) Sin[θ]^2 Sin[ρ], {r, 0, 
        r}, {ϕ, 0, 2  π}, {θ, 0, π}, {ρ, 
        0, π}]

D[%, r]

Integrate[ (r^4) Sin[θ]^3 Sin[ρ]^2 
        Sin[ω], {r, 0, r}, {ϕ, 0, 2  π}, {θ, 
        0, π}, {ρ, 0, π}, {ω, 0, π}]

D[%, r]