kill(all)$

van=facebook.com/LearningCalculus$

load(physical_constants)$

      Radius of a Black Hole of mass M:
      (%G is the gravitational constant, %c is the speed of light)

r(M):=(2*%G*M)/%c^2;

      Volume of a Black Hole

V(R):=4*%pi*R^3/3;

      The largest known black hole, SDSS J140821 has a mass of 196 billion suns.
      What is its radius?
      What is its density?

      First we will do the sun Schwartzchild radius and density:
      - First some symbolic housekeeping, define mass and radius of sun.

declare("☉", alphabetic)$
declare_constvalue(%M☉, 1.989 * 10^30 `kg);
declare_constvalue(%R☉, 6.955 * 10^8  `m );

      If sun were a black hole its radius would be:

r(M☉);
constvalue(r(%M☉));

      Density is Mass per Unit Volume

Rho(M,V):=M/V $

declare("☉", alphabetic)$
declare_constvalue(%M☉, 1.989 * 10^30 `kg);
declare_constvalue(%R☉, 6.955 * 10^8  `m );

      Now the density of the sun:

Rho(%M☉,V(%R☉));
float(constvalue(%));

      Check our work, multiply black hole density by volume to get mass:

V(%R☉)*Rho((%M☉),V(%R☉));
float(constvalue(%));

      Now we do the big black hole:
      - First symbol definition and mass assignment:

declare("◉", alphabetic)$
declare_constvalue(%M◉, (196*10^9) * constvalue(%M☉));

      - Now Schwartzchild radius computation:

r(%M◉);
float(constvalue(r(%M◉)));
declare_constvalue(%R◉, % )$

      How big is that in Astronomical Units (Earth-Sun Distance)
      For reference the Earth-Pluto Distance is 39.5 AU.

declare_constvalue(%AU, 1.496e+11 `m)$
r(%M◉)/%AU;
float(constvalue(%));
%/39.5;

      - Now Density:

Rho(%M◉,V(%R◉));
float(constvalue(%));
declare_constvalue(Rho◉,%)$

      What would be the equivlent altitude on earth for that density?

declare("⊕", alphabetic)$
declare_constvalue(Rho⊕,1.225 `kg/m^3);

density:constvalue(Rho◉)=constvalue(Rho⊕)*%e^(-h/8400),h;

ratprint:false$
solve(density,h)$

h:rhs(first(solve(Rho◉=Rho⊕*%e^(-h/8400),h))) `m;

float(constvalue(h));

%``feet;