Last Day: some interesting integrals!

Andy Long
Spring, 2018

Volume of a torus:

https://www.google.com/search?q=volume+of+a+torus
Notice that it can be written ( π(r^2))(2πR) -- the area of the small circle, times the circumference of the larger!

torusVolume=2*Pi*Integrate[(Sqrt[r^2-x^2]+R^2)^2-(-Sqrt[r^2-x^2]+R^2)^2,{x,0,r}]

torusVolume=8*Pi*R*Integrate[Sqrt[r^2-x^2],{x,0,r}]

Time to State Route 126:

speeds={60,60,60,60,60,60,60,60};
invspeeds=1/speeds;
lrr=60.0*Total[Part[invspeeds,1;;7]]
rrr=60.0*Total[Part[invspeeds,2;;8]]
trap=Mean[{lrr,rrr}]

speeds={60,50,30,45,60,55,60,70};
invspeeds=1/speeds;
lrr=60.0*Total[Part[invspeeds,1;;7]]
rrr=60.0*Total[Part[invspeeds,2;;8]]
trap=Mean[{lrr,rrr}]

Work to lift water to a spherical tank, 20 meters up (to the center), of radius 2 meters:

rho=1000 (* kg/m^3 *)
accelerationGravity=9.81 (* m/s/s *)
g=accelerationGravity
waterLiftWork=Pi*rho*g*Integrate[(2^2-(y-20)^2)y,{y,18,22}]

Mass of the Atmosphere: 

According to the National Center for Atmospheric Research, “The total mean mass of the atmosphere is 5.1480 ×1018 kg....” Notice the strange scale for the mass density:

Clear[rho]
earthRadius=6360 (* km *);
unitConversion=100^3/1000 *1000^3;
atmosphericDensity[r_]:=10^(-3(1+r/50)) 
(* We multiply atmosphericDensity in g/cm^3 by kg/(1000 gm) *(100 cm)^3/m^3 * (1000m)^3/km^3 to get rho: *)
(* rho is in in kg/km^3, from gm/cm^3 *)
rho[r_]:=unitConversion *atmosphericDensity[r]
(* 4.524*10^{-5} was given in an exercise as the average mass density of the atmosphere, in gm/cm^3: *)
roughEstimate= unitConversion * 4.524*10^{-5}*4/3*Pi*((earthRadius+150)^3-earthRadius^3)

Plot[Log[10,atmosphericDensity[r]],{r,0,150},PlotLabel->"Model for the power of 10 of Atmospheric Mass Density"]
N[ 4 Pi Integrate[rho[r](r+earthRadius)^2,{r,0,150}]]