Maxwell-Boltzmann Distribution Mathematica Based Practitioner’s Approach

Utilizing Mathematica this report shows how from a practitioner’s point of view useful quantities some known, and some unknown and fresh properties about the Maxwell-Boltzmann distribution are calculated. We shortcut circling the usage of antiquated incomplete tabulated error functions given in the textbooks and professional literature replacing them with efficient up-grades. And, utilizing the animation features of Mathematica displaying the temperature-dependence of the distribution function assists in visualizing the character of the distribution


Introduction
Reviewing a few popular undergraduate physics texts [1] [2] [3], and graduate physics texts [4] [5] as well as advanced general physics books [6] [7] reveals that sections devoted to the "Kinetic Theory of Gases" either are analyzed according to the principle of the Classical Mechanics developed by Clausius [4] or statistically via the Maxwell and Boltzmann (MB) [1].For the latter, a normalized distribution is utilized to identify the frequencies of occurrence of the number of the non-interacting molecules of an ideal gas possessing certain speeds conducive to statistical moments such as average, root-mean-square, and the speed that the ensemble is populated the most.Plots of the MB distribution for a chosen gas at different temperatures show as intuitively expected the higher temperature is associated with the faster speeds resulting in the broadening of the distribution.The brief observations summarize the scope of the applications of the MB distribution.
In this investigating report, we show utilizing a CAS (Computer Algebra System) such as Mathematica [8], we can revisit the same mentioned facts but much more.A few of these facts are fresh that are not available in the literature.In the forthcoming procedure section, we present our findings.

Procedure
We begin with MB distribution, ( ) where m, T, and v are the mass, temperature, and the speed of an individual particle (molecule) of the gas, respectively.The k is the Boltzmann constant, k = 1.38 10 −23 J/mol·K.Utilizing (1) a classic calculation yields the first and the second moments.Noting the latter is conducive to v RMS .Equation ( 1) if needed may be formatted in terms of the molar mass, m mol , and the universal ideal gas constant, R = 8.31 J/moll·K such that the ratio m/k can be replaced by the mol m R .
Applying (1) the mentioned quantities are, The common quantity listed in ( 2) is kT m .It is useful tabulating this for different values of m and temperature T. C.f. Table 1.
Table 1.The 4, 5 and 6 columns are the practical speed-related quantities given in (2).The rest of the columns are the selected temperatures and the molecular masses.The usefulness of Table 1 is e.g., one develops a feel about the value of the speeds.Comparing these speeds to the legal speed of a car on highways ~25 m/s, these are fast!Furthermore, comparing e.g., rows 1, 6, and 11 shows the impact of the temperature on the speed-related quantities.Noting, as expected, the higher the temperature the faster the speeds.Similarly, comparing e.g., row 2, 7, and 12 gives the impact of the masses.Likewise, observations can be drawn by comparing other paired rows.

( )
Another way to utilize Table 1 is by selecting a certain mass, e.g., the mass of a single H 2 molecule displays the profile of the distribution at different temperatures.This is shown in Figure 1.
Figure 1 shows the sensitivity of the distribution as a function temperature.It confirms our intuition, meaning, the lower the temperature the sharper the distribution, i.e., the higher the concentrated molecules and vice versa.The sharpest distribution in aqua is used as a reference and it is displayed in all four cases.
Curves are color-coded, the aqua is the coldest (T = 200 K), the red is the hottest (T = 900 K) and the rest are in between.
In addition to the observations, one is led to the question about the sensitivity of the ordinate of the maximum values of the distribution at its abscissa, at the v mp .
And, ordinarily, when one works with a cusped function, such as Gaussian, the qualitative measure of the sharpness of the function is determined by the width of the function at 1/e-th of its maximum height.As such, noting the MB distribution is not too far off from Gaussian, its width must be evaluated.This report quantitatively addresses these issues.The steps conducive to our goals are as follows.

Sensitivity of the Maximum Height of the MB-Distribution to Temperature
As discussed, at mp v v = the distribution given by ( 1) is at maximum.To form the needed function and to handle the calculation in the upcoming subsections we define an auxiliary function : m KT λ = .In terms of λ and m = m 0 the mass of an H 2 molecule, we evaluate the maximum height as a function of temperature.This is shown on the left panel of Figure 2.

Sensitivity of Width of the MB-Distribution to Temperature
To determine the width of the distribution and explore its temperature sensitivity we need to solve an equation that is conducive to speeds associated with the intersections of a horizontal line ( ) max 1 e and MB f are subject to (2a) and (1), respectively.This algebraic equation is not easily solvable, applying Mathematica yields to a set of complicated roots that are to be sorted.A brief outline is given.
The simplified algebraic equation given to the formal equation in Sect.2b is, where λ is defined in (2a).Solution of (3) for v yields six roots, some negative and some complex.By inspection, the acceptable positive roots with manipulation give the interested widths.For a chosen mass, m 0 these widths are temperature dependent.Their variation vs temperature, T is shown on the right panel of Figure 2.
These features shown in Figure 2 are consistent with Figure 1; nothing, these are quantitative.The left panel shows the higher the temperature the lower the maximum height.Similarly, and consistent with the left panel it shows the width of the distribution increases vs the temperature.Noting, these displayed functions are not linear.An interested reader may apply the trend lines, FindFit in Mathematica to explore the format of the continuous curve.This is left as an exercise.These two fresh features are missed in the literature.

Identification of the Speeds Conducive to the Same Population in the MB Distribution
Displayed MB distributions for various scenarios shown in Figure 1 reveal that for a chosen temperature there are always two speeds that are associated with the same population.To clarify Figure 3 includes two paired sets of such speeds.The black and the red vertical lines on the right are the v and RMS v , respec- tively.There is another paired set of speeds, the red and the black on the left.Both these sets have the same heights, corresponding to the same populations.
All the references cited have focused on the former!This observation holds for  The goal is for instance to identify the speed that is less than v (the black marked abscissa on the right) that is conducive to the same population on the left.The procedure to achieving this goal is straight forward although not doable without utilizing a CAS, specifically Mathematica.After inspection only two out of four roots of the solved equation are meaningful.For readers familiar with Mathematica codes are given for reproduction, these are, The first code solves the equation that sets the distribution equals the value of distribution at v .The third code evaluates the speed at RMS v .The output con- firms the accuracy of the computations.The output of the second code is a list of the speeds.The last two numeric in the given list are the v .These two are the same though they have been evaluated differently.The middle one is one of the roots of the equation on hand, the third one is v using (2).The same explanation holds for the third code and its output.Note, for each output the value of the first element is less than the second element.The point of the set goal is well achieved.

Evaluation of the Number of Particles within a Chosen Speed Range
Customarily, in the general practice, the interest is to utilize a distribution e.g., the MB distribution and count the number the particles at a certain speed.In the case of MB distribution substituting the chosen speed in the distribution function yields the answer.However, counting the particles within a speed range naturally requires integration.The integration of the MB distribution with the integration limits specified by speed range is conducive to the error function.This lends itself to relying on the tabulated numeric values of the error function with severe limitations [9].
Here, by way of example utilizing Mathematica's symbolic and then numeric capabilities, we bypass the antiquated usage of tabulated information.We show two detailed cases.The first one does the integration within the range of zero to v , and the second within/to RMS v .The same approach may be applied to any desired speed range.To pursue these goals for the sake of simplicity (1) and ( 2) are reformulated in terms of the aforementioned λ.
Symbolic integration of both cases is, As noted, the output is given in error functions.Mathematica uses Erf[] for the error function.As shown, specific error functions are needed.By specifying the value for the λ that calls for a certain temperature and molecular mass we for instance apply m = m N2 (nitrogen) at T = 200 K.
The numeric values of the above integrations are 0.53305 and 0.0753246.For instance, assuming the number of molecules is 5000 the population of the molecules is 2665, and 377, respectfully.These are meaningful numbers because the speed range of the first integration is much wider than the second accommodating much more molecules.

Conclusion
The main goal of crafting this investigating practical report is to show how by utilizing a Computer Algebra System, such as Mathematica many of the traditional quantities associated with Maxwell-Boltzmann distribution easily are calculated.As shown our approach explores issues affiliated with MB distribution that are fresh and not discussed in the published textbooks nor researched-based literature.Mathematica codes are provided so that the interested reader may practice the issues.The interested reader may find [10] [11] resourceful in making the embedded graphs.

Figure 1 .
Figure 1.Headings of the plots are the temperatures in Kelvin.The common sharp aqua curve is the distribution at a low-temperature T = 200 K.

Figure 2 .
Figure 2. The left and the right plates are the sensitivity of the maximum height and the width of the MB-distribution as a function temperature, respectively.

Figure 3 .
Figure 3.A plot of the MB distribution and a paired two sets of speeds corresponding to the same populations.