The scientific constants package gives you quick access to information about scientific constants. We will look at one constant and the same will apply to all others.
[> # The default system is SI, so the option is not needed [> SciConG := ScientificConstants['Constant']( 'G', 'system' = 'SI' ): [> evalf( SciConG );
$6.67408 \times 10^{-11}$
[> ScientificConstants['GetError']( SciConG );
$3.1 \times 10^{-15}$
[> ScientificConstants['GetUnit']( SciConG );
$\frac{\textrm{m}^3}{\textrm{kg} \textrm{s}^2}$
[> ScientificConstants['GetUnit']( SciConG );
You can use these constants inside an equation and then evaluate them to floating-point numbers when necessary:
[> with( ScientificConstants ): [> Force := Constant( 'G' )*Constant( 'M[Earth]' )*Constant( 'M[Sun]' )/r^2;
$\frac{\textit{Constant}(G)\textit{Constant}(M_\textit{Sun})\textit{Constant}(M_\textit{Earth})}{r^2}$
[> evalf( eval( Force, r = 152.1e9 ) ); # Force at aphelion
$3.428622513 \times 10^{22}$
[> evalf( eval( Force, r = 147.1e9 ) ); # Force at perihelion
$3.665664850 \times 10^{22}$
Here are only some of the more common units you may use, and you may refer to them either by the name or the symbol:
speed_of_light_in_vacuum | c |
permeability_of_vacuum | mu[0] |
permittivity_of_vacuum | epsilon[0] |
characteristic_impedance_of_vacuum | Z[0] |
Newtonian_constant_of_gravitation | G |
Planck_constant | h |
Planck_constant_over_2pi | hbar |
Planck_mass | m[P] |
Planck_length | l[P] |
Planck_time | t[P] |
elementary_charge | e |
magnetic_flux_quantum | Phi[0] |
To see all of them, enter
[> ?Initial_Physical_Constants
All of the above constants have SI units. You can change this by adding the option 'system' = 'SystemName' where the system name is one of 'Atomic', 'CGS', 'EMU', 'ESU', 'FPS', 'MKS', 'MTS' or 'SI'.