Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

derivation: Boyle's law, advanced; rewrite of chem.libretexts.org #19

Open
bhpayne opened this issue Jan 26, 2025 · 6 comments
Open

derivation: Boyle's law, advanced; rewrite of chem.libretexts.org #19

bhpayne opened this issue Jan 26, 2025 · 6 comments
Assignees

Comments

@bhpayne
Copy link
Member Author

bhpayne commented Jan 26, 2025

prompt to Gemini 2.0 Flash Thinking Experimental 01-21, https://aistudio.google.com/prompts/

Convert the following HTML content to a single Latex document.

<P>Derive Boyle's Law rigorously. We consider the collisions of gas molecules with a small portion of the wall of their container. We suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. We denote both the segment of the wall and its area as \(A\). \(A\) can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.</p>

<P>Let the volume of the container be \(V\) and the number of gas molecules in the container be \(N\). We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within \(A\). We begin our observations at time \(t=0\) and suppose that the collision occurs at time \(t\).</p>


<P>As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time \(t=0\). We orient the axes of this coordinate system so that the \(xy\)-plane is parallel to the plane of \(A\), and the z-axis is pointed toward the wall. Then the unit vector along the \(z\)-axis and a vector perpendicular to \(A\) are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is \(\left(v^*,{\theta }^*,{\varphi }^*\right)\). The vector \(\mathop{v^*}\limits^{\rightharpoonup}t\), drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time \(t\). The \(z\)-component of the molecular velocity vector is normal to the plane of \(A\) at the point of impact; the magnitude of the\(\ z\)-component \(v^*{\mathrm{cos} {\theta }^*\ }\). The perpendicular distance from the plane of <em>A</em> to the \(xy\)-plane of the Cartesian system is \(v^*t{\mathrm{cos} {\theta }^*\ }\).</p>

<P>We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is \(v_z=v^*{\mathrm{cos} {\theta }^*\ }\). Afterward, it is \(v_z={-v}^*{\mathrm{cos} {\theta }^*\ }\). Only this change in the \(v_z\) component contributes to the force on the wall within \(A\). (The \(v_x\) and \(v_y\) components are not changed by the collision.) During the collision, the molecule&rsquo;s momentum change is \({-2mv}^*{\mathrm{cos} {\theta }^*\ }\). During our period of observation, the average force on the molecule is thus \({\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}\). The force that the molecule exerts on the wall is \({\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}\), and hence the contribution that this particular collision&mdash;by one molecule traveling at velocity \(v^*\)&mdash; makes to the pressure on the wall is</p>

<P>\[P_1\left(v^*\right)=\frac{2mv^* \mathrm{cos} {\theta }^*\ }{At} \nonumber \]</p>

<P>We want to find the pressure on segment \(A\) of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are \(v^*\), \({\theta }^*\), and \({\varphi }^*\), and whose location at time \(t=0\) enables it to reach \(A\) within time \(t\), makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all <em>N</em> of the molecules in the volume, \(V\), are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach \(A\) within time \(t\) by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of \(A\). This tube also cuts the \(xy\)-plane (the \(z=0\) plane) of our coordinate system in such a way as to make an exact replica of \(A\) in this plane. Call this replica \(A^o\).</p>

<P>The area of \(A^o\) is \(A\); the plane of \(A^o\) is parallel to the plane of \(A\); and the perpendicular distance between the plane of \(A\) and the plane of \(A^o\) is \(v^*t{\mathrm{cos} {\theta }^*\ }\). The volume of this tube is therefore \({Av}^*t{\mathrm{cos} {\theta }^*\ }\). Since there are \({N}/{V}\) molecules per unit volume, the total number of molecules in the tube is \({\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}\). When we assume that every molecule has velocity components \(v^*\), \({\theta }^*\), and \({\varphi }^*\), all of the molecules in the tube reach \(A\) within time \(t\), because each of them travels parallel to the selected molecule, and each of them is initially at least as close to \(A\) as is the selected molecule. Therefore, each molecule in the tube contributes \(P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}\) to the pressure at \(A\). The total pressure is the pressure per molecule multiplied by the number of molecules:</p>

<P>\[\left(\frac{2mv^* \mathrm{cos} {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \mathrm{cos} {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \mathrm{cos} {\theta }^*\right)^2}{V} \nonumber \]</p>

<P>However, the molecular velocities are not all the same, and the pressure contribution \({2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}\) is made only by that fraction of the molecules whose velocity components lie in the intervals \({\theta }^*&lt;\theta &lt;{\theta }^*+d\theta\) and \({\varphi }^*&lt;\varphi &lt;{\varphi }^*+d\varphi\). This fraction is</p>

<P>\[\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \mathrm{sin} {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\mathrm{exp}\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\mathrm{sin} {\theta }^*dvd\theta d\varphi \nonumber \]</p>

<P>so that the pressure contribution from molecules whose velocity components lie in these ranges is</p>

<P>\[dP=\frac{2mN\left(v^* \mathrm{cos} {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\mathrm{exp}\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \mathrm{sin} {\theta }^*dvd\theta d\varphi \nonumber \]</p>

<P>The total pressure at \(A\) is just the sum of the contributions from molecules with all possible combinations of velocities \(v^*\), \({\theta }^*\), and \({\varphi }^*\). To find this sum, we integrate over all possible velocity vectors. The allowed values of \(v\) are \(0\le v&lt;\infty\). There are no constraints on the values of \(\varphi\); we have \(0\le \varphi &lt;2\pi\). However, since all of the impacting molecules must have a velocity component in the positive <em>z</em>-direction, the possible values of \(\theta\) lie in the interval \(0\le \theta &lt;{\pi }/{2}\). We designate the velocity of the original molecule as \(\left(v^*,{\theta }^*,{\varphi }^*\right)\) and retain this notation to be as specific as possible in describing the tube bounded by \(A\) and \(A^o\). However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressurepressure:on wall at \(A\) becomes</p>

<P>\[P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times \nonumber \]</p>

<P>\[\int^{\infty }_0 v^4exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \mathrm{cos}^2 \theta \ \mathrm{sin} \theta \  d\theta \int^{2\pi }_0 d\varphi \nonumber \]</p>

<P>\[=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda  \nonumber \]</p>

<P>and the pressure&ndash;volume product becomes</p>

<P>\[PV=\frac{mN}{\lambda } \nonumber \]</p>

<P>Since \(m,\) \(N\), and \(\lambda\) are constants, this is Boyle&rsquo;s law. Equating this pressure&ndash;volume product to that given by the ideal gas equation, we have \({mN}/{\lambda }=NkT\) so that</p>

<P>\[\lambda =\frac{m}{kT} \nonumber \]</p>

<P>Finally, the <strong><em>Maxwell-Boltzmann </em></strong><strong><em>equation</em></strong> becomes</p>

<P>\[\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\mathrm{exp}\left(\frac{-mv^2}{2kT}\right) \nonumber \]</p>

<P>and the probability density becomes</p>

<P>\[\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\mathrm{exp}\left(\frac{-mv^2}{2kT}\right) \nonumber \]</p>

<P>This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are \(\left(v^*,{\theta }^*,{\varphi }^*\right)\) creates a pressure \({2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}\) on the area \(A\) with a probability of \(Av^*t\mathrm{cos} {\theta }^*/{V}\). (The latter term is the probability that a molecule, whose velocity is \(\left(v^*,{\theta }^*,{\varphi }^*\right)\), is, at time \(t=0\), in a location from which it can reach \(A\) within time \(t.\) If the molecule is to hit the wall within time \(t\), at time \(t=0\) the molecule must be within the tubular segment of volume is \(Av^*t\mathrm{cos} {\theta }^*\). The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product</p>

<P>\[\left(\frac{2mv^*\mathrm{cos} {\theta }^*}{At}\right)\left(\frac{Av^*t \mathrm{cos} {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \mathrm{cos} {\theta }^* \right)^2 \nonumber \]</p>

<P>is the pressure contribution of a molecule with velocity \(\left(v^*,{\theta }^*,{\varphi }^*\right)\), when \({\theta }^*\) is in the interval \(0\le {\theta }^*&lt;{\pi }/{2}\). The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.</p>

<P>It is useful to view the Maxwell-Boltzmann equation as the product of a term</p>

<P>\[\mathrm{exp}\left({-mv^2}/{2kT}\right) \nonumber \]</p>

<P>&mdash;called the <strong><em>Boltzmann </em></strong><strong><em>factor</em></strong>Boltzmann factor&mdash;and a pre-exponential term that is proportional to the <strong><em>number of ways</em></strong> that a molecule can have a given velocity, \(v\). If there were no constraints on a molecule&rsquo;s speed, we would expect that the number of molecules with speeds between \(v\) and \(v+dv\) would increase as \(v\) increases, because the probability that a molecule has a speed between \(v\) and \(v+dv\) is proportional to the volume in velocity space of a spherical shell of thickness \(dv\). The volume of a spherical shell of thickness \(dv\) is \(4\pi v^2dv\), which increases as the square of \(v\). However, the number of molecules with large values of \(v\) is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor introduces this constraint. A molecule whose mass is m and whose scalar velocity is \(v\) has kinetic energy \(\epsilon ={mv^2}/{2}\). The Boltzmann factor is often written as \(\mathrm{exp}\left({-\epsilon }/{kT}\right)\).</p>

thoughts

The user wants to convert HTML content into a single LaTeX document.
The HTML content is a derivation of Boyle's law.
The HTML content includes math formulas in Latex format, wrapped in \(...\) and \[...\).
The HTML content is structured with <P> tags for paragraphs.

Steps:

  1. Create a basic LaTeX document structure.
  2. Replace HTML paragraph tags <P> with LaTeX paragraph breaks \par.
  3. Copy the text content and math formulas from the HTML to the LaTeX document.
  4. Ensure all math formulas are correctly placed within math environments.
  5. Add a document class and \begin{document} and \end{document} tags.

Let's start by creating a basic LaTeX document structure.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}

% Content will be inserted here

\end{document}

Now, let's process the HTML content paragraph by paragraph and convert it to LaTeX.

Paragraph 1:
HTML: <P>Derive Boyle's Law rigorously. We consider the collisions of gas molecules with a small portion of the wall of their container. We suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. We denote both the segment of the wall and its area as \(A\). \(A\) can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.</p>
LaTeX: Derive Boyle's Law rigorously. We consider the collisions of gas molecules with a small portion of the wall of their container. We suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. We denote both the segment of the wall and its area as \(A\). \(A\) can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.\par

Paragraph 2:
HTML: <P>Let the volume of the container be \(V\) and the number of gas molecules in the container be \(N\). We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within \(A\). We begin our observations at time \(t=0\) and suppose that the collision occurs at time \(t\).</p>
LaTeX: Let the volume of the container be \(V\) and the number of gas molecules in the container be \(N\). We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within \(A\). We begin our observations at time \(t=0\) and suppose that the collision occurs at time \(t\).\par

Paragraph 3:
HTML: <P>As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time \(t=0\). We orient the axes of this coordinate system so that the \(xy\)-plane is parallel to the plane of \(A\), and the z-axis is pointed toward the wall. Then the unit vector along the \(z\)-axis and a vector perpendicular to \(A\) are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is \(\left(v^*,{\theta }^*,{\varphi }^*\right)\). The vector \(\mathop{v^*}\limits^{\rightharpoonup}t\), drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time \(t\). The \(z\)-component of the molecular velocity vector is normal to the plane of \(A\) at the point of impact; the magnitude of the\(\ z\)-component \(v^*{\mathrm{cos} {\theta }^*\ }\). The perpendicular distance from the plane of <em>A</em> to the \(xy\)-plane of the Cartesian system is \(v^*t{\mathrm{cos} {\theta }^*\ }\).</p>
LaTeX: As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time \(t=0\). We orient the axes of this coordinate system so that the \(xy\)-plane is parallel to the plane of \(A\), and the z-axis is pointed toward the wall. Then the unit vector along the \(z\)-axis and a vector perpendicular to \(A\) are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is \(\left(v^*,{\theta }^*,{\varphi }^*\right)\). The vector \(\mathop{v^*}\limits^{\rightharpoonup}t\), drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time \(t\). The \(z\)-component of the molecular velocity vector is normal to the plane of \(A\) at the point of impact; the magnitude of the \(z\)-component \(v^*{\mathrm{cos} {\theta }^*\ }\). The perpendicular distance from the plane of \textit{A} to the \(xy\)-plane of the Cartesian system is \(v^*t{\mathrm{cos} {\theta }^*\ }.\par (Note: italicize A in "plane of A")

Paragraph 4:
HTML: <P>We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is \(v_z=v^*{\mathrm{cos} {\theta }^*\ }\). Afterward, it is \(v_z={-v}^*{\mathrm{cos} {\theta }^*\ }\). Only this change in the \(v_z\) component contributes to the force on the wall within \(A\). (The \(v_x\) and \(v_y\) components are not changed by the collision.) During the collision, the molecule&rsquo;s momentum change is \({-2mv}^*{\mathrm{cos} {\theta }^*\ }\). During our period of observation, the average force on the molecule is thus \({\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}\). The force that the molecule exerts on the wall is \({\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}\), and hence the contribution that this particular collision&mdash;by one molecule traveling at velocity \(v^*\)&mdash; makes to the pressure on the wall is</p>
LaTeX: We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is \(v_z=v^*{\mathrm{cos} {\theta }^*\ }\). Afterward, it is \(v_z={-v}^*{\mathrm{cos} {\theta }^*\ }\). Only this change in the \(v_z\) component contributes to the force on the wall within \(A\). (The \(v_x\) and \(v_y\) components are not changed by the collision.) During the collision, the molecule's momentum change is \({-2mv}^*{\mathrm{cos} {\theta }^*\ }\). During our period of observation, the average force on the molecule is thus \({\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}\). The force that the molecule exerts on the wall is \({\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}\), and hence the contribution that this particular collision—by one molecule traveling at velocity \(v^*\)—makes to the pressure on the wall is\par (Note: replace ’ with ', and — with ---)

Paragraph 5:
HTML: <P>\[P_1\left(v^*\right)=\frac{2mv^* \mathrm{cos} {\theta }^*\ }{At} \nonumber \]</p>
LaTeX: \[P_1\left(v^*\right)=\frac{2mv^* \cos {\theta }^*\ }{At} \] (Remove \nonumber as we don't need equation numbering here).

Paragraph 6:
HTML: <P>We want to find the pressure on segment \(A\) of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are \(v^*\), \({\theta }^*\), and \({\varphi }^*\), and whose location at time \(t=0\) enables it to reach \(A\) within time \(t\), makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all <em>N</em> of the molecules in the volume, \(V\), are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach \(A\) within time \(t\) by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of \(A\). This tube also cuts the \(xy\)-plane (the \(z=0\) plane) of our coordinate system in such a way as to make an exact replica of \(A\) in this plane. Call this replica \(A^o\).</p>
LaTeX: We want to find the pressure on segment \(A\) of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are \(v^*\), \({\theta }^*\), and \({\varphi }^*\), and whose location at time \(t=0\) enables it to reach \(A\) within time \(t\), makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all \textit{N} of the molecules in the volume, \(V\), are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach \(A\) within time \(t\) by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of \(A\). This tube also cuts the \(xy\)-plane (the \(z=0\) plane) of our coordinate system in such a way as to make an exact replica of \(A\) in this plane. Call this replica \(A^o\).\par (Note: italicize N in "all N of the molecules")

Paragraph 7:
HTML: <P>The area of \(A^o\) is \(A\); the plane of \(A^o\) is parallel to the plane of \(A\); and the perpendicular distance between the plane of \(A\) and the plane of \(A^o\) is \(v^*t{\mathrm{cos} {\theta }^*\ }\). The volume of this tube is therefore \({Av}^*t{\mathrm{cos} {\theta }^*\ }\). Since there are \({N}/{V}\) molecules per unit volume, the total number of molecules in the tube is \({\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}\). When we assume that every molecule has velocity components \(v^*\), \({\theta }^*\), and \({\varphi }^*\), all of the molecules in the tube reach \(A\) within time \(t\), because each of them travels parallel to the selected molecule, and each of them is initially at least as close to \(A\) as is the selected molecule. Therefore, each molecule in the tube contributes \(P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}\) to the pressure at \(A\). The total pressure is the pressure per molecule multiplied by the number of molecules:</p>
LaTeX: The area of \(A^o\) is \(A\); the plane of \(A^o\) is parallel to the plane of \(A\); and the perpendicular distance between the plane of \(A\) and the plane of \(A^o\) is \(v^*t{\mathrm{cos} {\theta }^*\ }\). The volume of this tube is therefore \({Av}^*t{\mathrm{cos} {\theta }^*\ }\). Since there are \({N}/{V}\) molecules per unit volume, the total number of molecules in the tube is \({\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}\). When we assume that every molecule has velocity components \(v^*\), \({\theta }^*\), and \({\varphi }^*\), all of the molecules in the tube reach \(A\) within time \(t\), because each of them travels parallel to the selected molecule, and each of them is initially at least as close to \(A\) as is the selected molecule. Therefore, each molecule in the tube contributes \(P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}\) to the pressure at \(A\). The total pressure is the pressure per molecule multiplied by the number of molecules:\par

Paragraph 8:
HTML: <P>\[\left(\frac{2mv^* \mathrm{cos} {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \mathrm{cos} {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \mathrm{cos} {\theta }^*\right)^2}{V} \nonumber \]</p>
LaTeX: \[\left(\frac{2mv^* \cos {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \cos {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \cos {\theta }^*\right)^2}{V} \]

Paragraph 9:
HTML: <P>However, the molecular velocities are not all the same, and the pressure contribution \({2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}\) is made only by that fraction of the molecules whose velocity components lie in the intervals \({\theta }^*&lt;\theta &lt;{\theta }^*+d\theta\) and \({\varphi }^*&lt;\varphi &lt;{\varphi }^*+d\varphi\). This fraction is</p>
LaTeX: However, the molecular velocities are not all the same, and the pressure contribution \({2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}\) is made only by that fraction of the molecules whose velocity components lie in the intervals \({\theta }^*<\theta <{\theta }^*+d\theta\) and \({\varphi }^*<\varphi <{\varphi }^*+d\varphi\). This fraction is\par (Note: use < and > directly for less than and greater than)

Paragraph 10:
HTML: <P>\[\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \mathrm{sin} {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\mathrm{exp}\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\mathrm{sin} {\theta }^*dvd\theta d\varphi \nonumber \]</p>
LaTeX: \[\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \sin {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi \]

Paragraph 11:
HTML: <P>so that the pressure contribution from molecules whose velocity components lie in these ranges is</p>
LaTeX: so that the pressure contribution from molecules whose velocity components lie in these ranges is\par

Paragraph 12:
HTML: <P>\[dP=\frac{2mN\left(v^* \mathrm{cos} {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\mathrm{exp}\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \mathrm{sin} {\theta }^*dvd\theta d\varphi \nonumber \]</p>
LaTeX: \[dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi \]

Paragraph 13:
HTML: <P>The total pressure at \(A\) is just the sum of the contributions from molecules with all possible combinations of velocities \(v^*\), \({\theta }^*\), and \({\varphi }^*\). To find this sum, we integrate over all possible velocity vectors. The allowed values of \(v\) are \(0\le v&lt;\infty\). There are no constraints on the values of \(\varphi\); we have \(0\le \varphi &lt;2\pi\). However, since all of the impacting molecules must have a velocity component in the positive <em>z</em>-direction, the possible values of \(\theta\) lie in the interval \(0\le \theta &lt;{\pi }/{2}\). We designate the velocity of the original molecule as \(\left(v^*,{\theta }^*,{\varphi }^*\right)\) and retain this notation to be as specific as possible in describing the tube bounded by \(A\) and \(A^o\). However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressurepressure:on wall at \(A\) becomes</p>
LaTeX: The total pressure at \(A\) is just the sum of the contributions from molecules with all possible combinations of velocities \(v^*\), \({\theta }^*\), and \({\varphi }^*\). To find this sum, we integrate over all possible velocity vectors. The allowed values of \(v\) are \(0\le v<\infty\). There are no constraints on the values of \(\varphi\); we have \(0\le \varphi <2\pi\). However, since all of the impacting molecules must have a velocity component in the positive \textit{z}-direction, the possible values of \(\theta\) lie in the interval \(0\le \theta <{\pi }/{2}\). We designate the velocity of the original molecule as \(\left(v^*,{\theta }^*,{\varphi }^*\right)\) and retain this notation to be as specific as possible in describing the tube bounded by \(A\) and \(A^o\). However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressurepressure:on wall at \(A\) becomes\par (Note: italicize z in "positive z-direction")

Paragraph 14:
HTML: <P>\[P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times \nonumber \]</p>
LaTeX: \[P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times \]

Paragraph 15:
HTML: <P>\[\int^{\infty }_0 v^4exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \mathrm{cos}^2 \theta \ \mathrm{sin} \theta \ d\theta \int^{2\pi }_0 d\varphi \nonumber \]</p>
LaTeX: \[\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \ d\theta \int^{2\pi }_0 d\varphi \]

Paragraph 16:
HTML: <P>\[=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda \nonumber \]</p>
LaTeX: \[=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda \]

Paragraph 17:
HTML: <P>and the pressure&ndash;volume product becomes</p>
LaTeX: and the pressure–volume product becomes\par (Note: replace – with --)

Paragraph 18:
HTML: <P>\[PV=\frac{mN}{\lambda } \nonumber \]</p>
LaTeX: \[PV=\frac{mN}{\lambda } \]

Paragraph 19:
HTML: <P>Since \(m,\) \(N\), and \(\lambda\) are constants, this is Boyle&rsquo;s law. Equating this pressure&ndash;volume product to that given by the ideal gas equation, we have \({mN}/{\lambda }=NkT\) so that</p>
LaTeX: Since \(m,\) \(N\), and \(\lambda\) are constants, this is Boyle's law. Equating this pressure–volume product to that given by the ideal gas equation, we have \({mN}/{\lambda }=NkT\) so that\par (Note: replace ’ with ', and – with --)

Paragraph 20:
HTML: <P>\[\lambda =\frac{m}{kT} \nonumber \]</p>
LaTeX: \[\lambda =\frac{m}{kT} \]

Paragraph 21:
HTML: <P>Finally, the <strong><em>Maxwell-Boltzmann </em></strong><strong><em>equation</em></strong> becomes</p>
LaTeX: Finally, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes\par (Note: use \textbf{\textit{...}} for bold and italic text)

Paragraph 22:
HTML: <P>\[\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\mathrm{exp}\left(\frac{-mv^2}{2kT}\right) \nonumber \]</p>
LaTeX: \[\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \]

Paragraph 23:
HTML: <P>and the probability density becomes</p>
LaTeX: and the probability density becomes\par

Paragraph 24:
HTML: <P>\[\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\mathrm{exp}\left(\frac{-mv^2}{2kT}\right) \nonumber \]</p>
LaTeX: \[\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \]

Paragraph 25:
HTML: <P>This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are \(\left(v^*,{\theta }^*,{\varphi }^*\right)\) creates a pressure \({2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}\) on the area \(A\) with a probability of \(Av^*t\mathrm{cos} {\theta }^*/{V}\). (The latter term is the probability that a molecule, whose velocity is \(\left(v^*,{\theta }^*,{\varphi }^*\right)\), is, at time \(t=0\), in a location from which it can reach \(A\) within time \(t.\) If the molecule is to hit the wall within time \(t\), at time \(t=0\) the molecule must be within the tubular segment of volume is \(Av^*t\mathrm{cos} {\theta }^*\). The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product</p>
LaTeX: This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are \(\left(v^*,{\theta }^*,{\varphi }^*\right)\) creates a pressure \({2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}\) on the area \(A\) with a probability of \(Av^*t\mathrm{cos} {\theta }^*/{V}\). (The latter term is the probability that a molecule, whose velocity is \(\left(v^*,{\theta }^*,{\varphi }^*\right)\), is, at time \(t=0\), in a location from which it can reach \(A\) within time \(t.\) If the molecule is to hit the wall within time \(t\), at time \(t=0\) the molecule must be within the tubular segment of volume is \(Av^*t\mathrm{cos} {\theta }^*\). The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product\par

Paragraph 26:
HTML: <P>\[\left(\frac{2mv^*\mathrm{cos} {\theta }^*}{At}\right)\left(\frac{Av^*t \mathrm{cos} {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \mathrm{cos} {\theta }^* \right)^2 \nonumber \]</p>
LaTeX: \[\left(\frac{2mv^*\cos {\theta }^*}{At}\right)\left(\frac{Av^*t \cos {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2 \]

Paragraph 27:
HTML: <P>is the pressure contribution of a molecule with velocity \(\left(v^*,{\theta }^*,{\varphi }^*\right)\), when \({\theta }^*\) is in the interval \(0\le {\theta }^*&lt;{\pi }/{2}\). The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.</p>
LaTeX: is the pressure contribution of a molecule with velocity \(\left(v^*,{\theta }^*,{\varphi }^*\right)\), when \({\theta }^*\) is in the interval \(0\le {\theta }^*<{\pi }/{2}\). The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.\par

Paragraph 28:
HTML: <P>It is useful to view the Maxwell-Boltzmann equation as the product of a term</p>
LaTeX: It is useful to view the Maxwell-Boltzmann equation as the product of a term\par

Paragraph 29:
HTML: <P>\[\mathrm{exp}\left({-mv^2}/{2kT}\right) \nonumber \]</p>
LaTeX: \[\exp\left({-mv^2}/{2kT}\right) \]

Paragraph 30:
HTML: <P>&mdash;called the <strong><em>Boltzmann </em></strong><strong><em>factor</em></strong>Boltzmann factor&mdash;and a pre-exponential term that is proportional to the <strong><em>number of ways</em></strong> that a molecule can have a given velocity, \(v\). If there were no constraints on a molecule&rsquo;s speed, we would expect that the number of molecules with speeds between \(v\) and \(v+dv\) would increase as \(v\) increases, because the probability that a molecule has a speed between \(v\) and \(v+dv\) is proportional to the volume in velocity space of a spherical shell of thickness \(dv\). The volume of a spherical shell of thickness \(dv\) is \(4\pi v^2dv\), which increases as the square of \(v\). However, the number of molecules with large values of \(v\) is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor introduces this constraint. A molecule whose mass is m and whose scalar velocity is \(v\) has kinetic energy \(\epsilon ={mv^2}/{2}\). The Boltzmann factor is often written as \(\mathrm{exp}\left({-\epsilon }/{kT}\right)\).</p>
LaTeX: —called the \textbf{\textit{Boltzmann}} \textbf{\textit{factor}}—and a pre-exponential term that is proportional to the \textbf{\textit{number of ways}} that a molecule can have a given velocity, \(v\). If there were no constraints on a molecule's speed, we would expect that the number of molecules with speeds between \(v\) and \(v+dv\) would increase as \(v\) increases, because the probability that a molecule has a speed between \(v\) and \(v+dv\) is proportional to the volume in velocity space of a spherical shell of thickness \(dv\). The volume of a spherical shell of thickness \(dv\) is \(4\pi v^2dv\), which increases as the square of \(v\). However, the number of molecules with large values of \(v\) is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor introduces this constraint. A molecule whose mass is m and whose scalar velocity is \(v\) has kinetic energy \(\epsilon ={mv^2}/{2}\). The Boltzmann factor is often written as \(\exp\left({-\epsilon }/{kT}\right)\).\par (Note: replace ’ with ', and — with --)

Combine all parts into the LaTeX document.
Final check for any missed conversions or errors.

response

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}

Derive Boyle's Law rigorously. We consider the collisions of gas molecules with a small portion of the wall of their container. We suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. We denote both the segment of the wall and its area as \(A\). \(A\) can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.\par

Let the volume of the container be \(V\) and the number of gas molecules in the container be \(N\). We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within \(A\). We begin our observations at time \(t=0\) and suppose that the collision occurs at time \(t\).\par

As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time \(t=0\). We orient the axes of this coordinate system so that the \(xy\)-plane is parallel to the plane of \(A\), and the z-axis is pointed toward the wall. Then the unit vector along the \(z\)-axis and a vector perpendicular to \(A\) are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is \(\left(v^*,{\theta }^*,{\varphi }^*\right)\). The vector \(\mathop{v^*}\limits^{\rightharpoonup}t\), drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time \(t\). The \(z\)-component of the molecular velocity vector is normal to the plane of \(A\) at the point of impact; the magnitude of the \(z\)-component \(v^*{\mathrm{cos} {\theta }^*\ }\). The perpendicular distance from the plane of \textit{A} to the \(xy\)-plane of the Cartesian system is \(v^*t{\mathrm{cos} {\theta }^*\ }.\par

We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is \(v_z=v^*{\mathrm{cos} {\theta }^*\ }\). Afterward, it is \(v_z={-v}^*{\mathrm{cos} {\theta }^*\ }\). Only this change in the \(v_z\) component contributes to the force on the wall within \(A\). (The \(v_x\) and \(v_y\) components are not changed by the collision.) During the collision, the molecule's momentum change is \({-2mv}^*{\mathrm{cos} {\theta }^*\ }\). During our period of observation, the average force on the molecule is thus \({\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}\). The force that the molecule exerts on the wall is \({\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}\), and hence the contribution that this particular collision---by one molecule traveling at velocity \(v^*\)---makes to the pressure on the wall is\par

\[P_1\left(v^*\right)=\frac{2mv^* \cos {\theta }^*\ }{At} \]

We want to find the pressure on segment \(A\) of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are \(v^*\), \({\theta }^*\), and \({\varphi }^*\), and whose location at time \(t=0\) enables it to reach \(A\) within time \(t\), makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all \textit{N} of the molecules in the volume, \(V\), are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach \(A\) within time \(t\) by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of \(A\). This tube also cuts the \(xy\)-plane (the \(z=0\) plane) of our coordinate system in such a way as to make an exact replica of \(A\) in this plane. Call this replica \(A^o\).\par

The area of \(A^o\) is \(A\); the plane of \(A^o\) is parallel to the plane of \(A\); and the perpendicular distance between the plane of \(A\) and the plane of \(A^o\) is \(v^*t{\mathrm{cos} {\theta }^*\ }\). The volume of this tube is therefore \({Av}^*t{\mathrm{cos} {\theta }^*\ }\). Since there are \({N}/{V}\) molecules per unit volume, the total number of molecules in the tube is \({\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}\). When we assume that every molecule has velocity components \(v^*\), \({\theta }^*\), and \({\varphi }^*\), all of the molecules in the tube reach \(A\) within time \(t\), because each of them travels parallel to the selected molecule, and each of them is initially at least as close to \(A\) as is the selected molecule. Therefore, each molecule in the tube contributes \(P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}\) to the pressure at \(A\). The total pressure is the pressure per molecule multiplied by the number of molecules:\par

\[\left(\frac{2mv^* \cos {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \cos {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \cos {\theta }^*\right)^2}{V} \]

However, the molecular velocities are not all the same, and the pressure contribution \({2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}\) is made only by that fraction of the molecules whose velocity components lie in the intervals \({\theta }^*<\theta <{\theta }^*+d\theta\) and \({\varphi }^*<\varphi <{\varphi }^*+d\varphi\). This fraction is\par

\[\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \sin {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi \]

so that the pressure contribution from molecules whose velocity components lie in these ranges is\par

\[dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi \]

The total pressure at \(A\) is just the sum of the contributions from molecules with all possible combinations of velocities \(v^*\), \({\theta }^*\), and \({\varphi }^*\). To find this sum, we integrate over all possible velocity vectors. The allowed values of \(v\) are \(0\le v<\infty\). There are no constraints on the values of \(\varphi\); we have \(0\le \varphi <2\pi\). However, since all of the impacting molecules must have a velocity component in the positive \textit{z}-direction, the possible values of \(\theta\) lie in the interval \(0\le \theta <{\pi }/{2}\). We designate the velocity of the original molecule as \(\left(v^*,{\theta }^*,{\varphi }^*\right)\) and retain this notation to be as specific as possible in describing the tube bounded by \(A\) and \(A^o\). However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressurepressure:on wall at \(A\) becomes\par

\[P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times \]

\[\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \  d\theta \int^{2\pi }_0 d\varphi \]

\[=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda  \]

and the pressure–volume product becomes\par

\[PV=\frac{mN}{\lambda } \]

Since \(m,\) \(N\), and \(\lambda\) are constants, this is Boyle's law. Equating this pressure–volume product to that given by the ideal gas equation, we have \({mN}/{\lambda }=NkT\) so that\par

\[\lambda =\frac{m}{kT} \]

Finally, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes\par

\[\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \]

and the probability density becomes\par

\[\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \]

This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are \(\left(v^*,{\theta }^*,{\varphi }^*\right)\) creates a pressure \({2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}\) on the area \(A\) with a probability of \(Av^*t\mathrm{cos} {\theta }^*/{V}\). (The latter term is the probability that a molecule, whose velocity is \(\left(v^*,{\theta }^*,{\varphi }^*\right)\), is, at time \(t=0\), in a location from which it can reach \(A\) within time \(t.\) If the molecule is to hit the wall within time \(t\), at time \(t=0\) the molecule must be within the tubular segment of volume is \(Av^*t\mathrm{cos} {\theta }^*\). The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product\par

\[\left(\frac{2mv^*\cos {\theta }^*}{At}\right)\left(\frac{Av^*t \cos {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2 \]

is the pressure contribution of a molecule with velocity \(\left(v^*,{\theta }^*,{\varphi }^*\right)\), when \({\theta }^*\) is in the interval \(0\le {\theta }^*<{\pi }/{2}\). The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.\par

It is useful to view the Maxwell-Boltzmann equation as the product of a term\par

\[\exp\left({-mv^2}/{2kT}\right) \]

—called the \textbf{\textit{Boltzmann}} \textbf{\textit{factor}}—and a pre-exponential term that is proportional to the \textbf{\textit{number of ways}} that a molecule can have a given velocity, \(v\). If there were no constraints on a molecule's speed, we would expect that the number of molecules with speeds between \(v\) and \(v+dv\) would increase as \(v\) increases, because the probability that a molecule has a speed between \(v\) and \(v+dv\) is proportional to the volume in velocity space of a spherical shell of thickness \(dv\). The volume of a spherical shell of thickness \(dv\) is \(4\pi v^2dv\), which increases as the square of \(v\). However, the number of molecules with large values of \(v\) is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor introduces this constraint. A molecule whose mass is m and whose scalar velocity is \(v\) has kinetic energy \(\epsilon ={mv^2}/{2}\). The Boltzmann factor is often written as \(\exp\left({-\epsilon }/{kT}\right)\).\par

\end{document}

@bhpayne
Copy link
Member Author

bhpayne commented Jan 26, 2025

Manual cleanup of Latex yeilds

\documentclass{article}
\usepackage{amsmath}

% margins of 1 inch:
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}

\usepackage[pdftex]{hyperref} % hyperlink equation and bibliographic citations
\author{Ben Payne, with Gemini 2.0}
\title{Boyle's Law from first principles}

\begin{document}
\maketitle
\begin{abstract}
Derive Boyle's Law rigorously.     
\end{abstract}

Consider the collisions of gas molecules with a small portion of the wall of their container. Suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. Denote both the segment of the wall and its area as $A$. $A$ can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.

Let the volume of the container be $V$ and the number of gas molecules in the container be $N$. We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within $A$. We begin our observations at time $t=0$ and suppose that the collision occurs at time $t$.

As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time $t=0$. We orient the axes of this coordinate system so that the $xy$-plane is parallel to the plane of $A$, and the z-axis is pointed toward the wall. Then the unit vector along the $z$-axis and a vector perpendicular to $A$ are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is $\left(v^*,{\theta }^*,{\varphi }^*\right)$. The vector $\mathop{v^*}\limits^{\rightharpoonup}t$, drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time $t$. The $z$-component of the molecular velocity vector is normal to the plane of $A$ at the point of impact; the magnitude of the $z$-component $v^*{\mathrm{cos} {\theta }^*\ }$. The perpendicular distance from the plane of \textit{A} to the $xy$-plane of the Cartesian system is $v^*t{\mathrm{cos} {\theta }^*\ }$.

We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is $v_z=v^*{\mathrm{cos} {\theta }^*\ }$. Afterward, it is $v_z={-v}^*{\mathrm{cos} {\theta }^*\ }$. Only this change in the $v_z$ component contributes to the force on the wall within $A$. (The $v_x$ and $v_y$ components are not changed by the collision.) During the collision, the molecule's momentum change is ${-2mv}^*{\mathrm{cos} {\theta }^*\ }$. During our period of observation, the average force on the molecule is thus ${\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$. The force that the molecule exerts on the wall is ${\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$, and hence the contribution that this particular collision---by one molecule traveling at velocity $v^*$---makes to the pressure on the wall is

\begin{equation}P_1\left(v^*\right)=\frac{2mv^* \cos {\theta }^*\ }{At} \end{equation}

We want to find the pressure on segment $A$ of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are $v^*$, ${\theta }^*$, and ${\varphi }^*$, and whose location at time $t=0$ enables it to reach $A$ within time $t$, makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all \textit{N} of the molecules in the volume, $V$, are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach $A$ within time $t$ by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of $A$. This tube also cuts the $xy$-plane (the $z=0$ plane) of our coordinate system in such a way as to make an exact replica of $A$ in this plane. Call this replica $A^o$.

The area of $A^o$ is $A$; the plane of $A^o$ is parallel to the plane of $A$; and the perpendicular distance between the plane of $A$ and the plane of $A^o$ is $v^*t{\mathrm{cos} {\theta }^*\ }$. The volume of this tube is therefore ${Av}^*t{\mathrm{cos} {\theta }^*\ }$. Since there are ${N}/{V}$ molecules per unit volume, the total number of molecules in the tube is ${\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}$. When we assume that every molecule has velocity components $v^*$, ${\theta }^*$, and ${\varphi }^*$, all of the molecules in the tube reach $A$ within time $t$, because each of them travels parallel to the selected molecule, and each of them is initially at least as close to $A$ as is the selected molecule. Therefore, each molecule in the tube contributes $P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ to the pressure at $A$. The total pressure is the pressure per molecule multiplied by the number of molecules:

\begin{equation}\left(\frac{2mv^* \cos {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \cos {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \cos {\theta }^*\right)^2}{V} \end{equation}

However, the molecular velocities are not all the same, and the pressure contribution ${2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}$ is made only by that fraction of the molecules whose velocity components lie in the intervals ${\theta }^*<\theta <{\theta }^*+d\theta$ and ${\varphi }^*<\varphi <{\varphi }^*+d\varphi$. This fraction is

\begin{equation}\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \sin {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi \end{equation}

so that the pressure contribution from molecules whose velocity components lie in these ranges is

\begin{equation}dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi \end{equation}

The total pressure at $A$ is just the sum of the contributions from molecules with all possible combinations of velocities $v^*$, ${\theta }^*$, and ${\varphi }^*$. To find this sum, we integrate over all possible velocity vectors. The allowed values of $v$ are $0\le v<\infty$. There are no constraints on the values of $\varphi$; we have $0\le \varphi <2\pi$. However, since all of the impacting molecules must have a velocity component in the positive \textit{z}-direction, the possible values of $\theta$ lie in the interval $0\le \theta <{\pi }/{2}$. We designate the velocity of the original molecule as $\left(v^*,{\theta }^*,{\varphi }^*\right)$ and retain this notation to be as specific as possible in describing the tube bounded by $A$ and $A^o$. However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressure:on wall at $A$ becomes

\begin{equation}P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times \end{equation}

\begin{equation}\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \  d\theta \int^{2\pi }_0 d\varphi \end{equation}

\begin{equation}=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda  \end{equation}

and the pressure–volume product becomes

\begin{equation}PV=\frac{mN}{\lambda } \end{equation}

Since $m,$ $N$, and $\lambda$ are constants, this is Boyle's law. Equating this pressure–volume product to that given by the ideal gas equation, we have ${mN}/{\lambda }=NkT$ so that

\begin{equation}\lambda =\frac{m}{kT} \end{equation}

Finally, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes

\begin{equation}\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \end{equation}

and the probability density becomes

\begin{equation}\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \end{equation}

This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are $\left(v^*,{\theta }^*,{\varphi }^*\right)$ creates a pressure ${2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ on the area $A$ with a probability of $Av^*t\mathrm{cos} {\theta }^*/{V}$. (The latter term is the probability that a molecule, whose velocity is $\left(v^*,{\theta }^*,{\varphi }^*\right)$, is, at time $t=0$, in a location from which it can reach $A$ within time $t.$ If the molecule is to hit the wall within time $t$, at time $t=0$ the molecule must be within the tubular segment of volume is $Av^*t\mathrm{cos} {\theta }^*$. The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product

\begin{equation}\left(\frac{2mv^*\cos {\theta }^*}{At}\right)\left(\frac{Av^*t \cos {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2 \end{equation}

is the pressure contribution of a molecule with velocity $\left(v^*,{\theta }^*,{\varphi }^*\right)$, when ${\theta }^*$ is in the interval $0\le {\theta }^*<{\pi }/{2}$. The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.

It is useful to view the Maxwell-Boltzmann equation as the product of a term

\begin{equation}\exp\left({-mv^2}/{2kT}\right) \end{equation}

—called the \textbf{\textit{Boltzmann}} \textbf{\textit{factor}}—and a pre-exponential term that is proportional to the \textbf{\textit{number of ways}} that a molecule can have a given velocity, $v$. If there were no constraints on a molecule's speed, we would expect that the number of molecules with speeds between $v$ and $v+dv$ would increase as $v$ increases, because the probability that a molecule has a speed between $v$ and $v+dv$ is proportional to the volume in velocity space of a spherical shell of thickness $dv$. The volume of a spherical shell of thickness $dv$ is $4\pi v^2dv$, which increases as the square of $v$. However, the number of molecules with large values of $v$ is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor introduces this constraint. A molecule whose mass is m and whose scalar velocity is $v$ has kinetic energy $\epsilon ={mv^2}/{2}$. The Boltzmann factor is often written as $\exp\left({-\epsilon }/{kT}\right)$.

\end{document}

@bhpayne
Copy link
Member Author

bhpayne commented Jan 26, 2025

Add equation labels

prompt

For the following Latex file, write out the file and insert a label for each equation. The label that is added should be descriptive of the equation and contain no spaces, only underscores.

Don't provide any commentary. Just write the revised Latex file content as your answer.

\documentclass{article}
\usepackage{amsmath}

% margins of 1 inch:
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}

\usepackage[pdftex]{hyperref} % hyperlink equation and bibliographic citations
\author{Ben Payne, with Gemini 2.0}
\title{Boyle's Law from first principles}

\begin{document}
\maketitle
\begin{abstract}
Derive Boyle's Law rigorously.     
\end{abstract}

Consider the collisions of gas molecules with a small portion of the wall of their container. Suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. Denote both the segment of the wall and its area as $A$. $A$ can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.

Let the volume of the container be $V$ and the number of gas molecules in the container be $N$. We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within $A$. We begin our observations at time $t=0$ and suppose that the collision occurs at time $t$.

As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time $t=0$. We orient the axes of this coordinate system so that the $xy$-plane is parallel to the plane of $A$, and the z-axis is pointed toward the wall. Then the unit vector along the $z$-axis and a vector perpendicular to $A$ are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is $\left(v^*,{\theta }^*,{\varphi }^*\right)$. The vector $\mathop{v^*}\limits^{\rightharpoonup}t$, drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time $t$. The $z$-component of the molecular velocity vector is normal to the plane of $A$ at the point of impact; the magnitude of the $z$-component $v^*{\mathrm{cos} {\theta }^*\ }$. The perpendicular distance from the plane of \textit{A} to the $xy$-plane of the Cartesian system is $v^*t{\mathrm{cos} {\theta }^*\ }$.

We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is $v_z=v^*{\mathrm{cos} {\theta }^*\ }$. Afterward, it is $v_z={-v}^*{\mathrm{cos} {\theta }^*\ }$. Only this change in the $v_z$ component contributes to the force on the wall within $A$. (The $v_x$ and $v_y$ components are not changed by the collision.) During the collision, the molecule's momentum change is ${-2mv}^*{\mathrm{cos} {\theta }^*\ }$. During our period of observation, the average force on the molecule is thus ${\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$. The force that the molecule exerts on the wall is ${\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$, and hence the contribution that this particular collision---by one molecule traveling at velocity $v^*$---makes to the pressure on the wall is

\begin{equation}P_1\left(v^*\right)=\frac{2mv^* \cos {\theta }^*\ }{At} \end{equation}

We want to find the pressure on segment $A$ of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are $v^*$, ${\theta }^*$, and ${\varphi }^*$, and whose location at time $t=0$ enables it to reach $A$ within time $t$, makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all \textit{N} of the molecules in the volume, $V$, are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach $A$ within time $t$ by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of $A$. This tube also cuts the $xy$-plane (the $z=0$ plane) of our coordinate system in such a way as to make an exact replica of $A$ in this plane. Call this replica $A^o$.

The area of $A^o$ is $A$; the plane of $A^o$ is parallel to the plane of $A$; and the perpendicular distance between the plane of $A$ and the plane of $A^o$ is $v^*t{\mathrm{cos} {\theta }^*\ }$. The volume of this tube is therefore ${Av}^*t{\mathrm{cos} {\theta }^*\ }$. Since there are ${N}/{V}$ molecules per unit volume, the total number of molecules in the tube is ${\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}$. When we assume that every molecule has velocity components $v^*$, ${\theta }^*$, and ${\varphi }^*$, all of the molecules in the tube reach $A$ within time $t$, because each of them travels parallel to the selected molecule, and each of them is initially at least as close to $A$ as is the selected molecule. Therefore, each molecule in the tube contributes $P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ to the pressure at $A$. The total pressure is the pressure per molecule multiplied by the number of molecules:

\begin{equation}\left(\frac{2mv^* \cos {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \cos {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \cos {\theta }^*\right)^2}{V} \end{equation}

However, the molecular velocities are not all the same, and the pressure contribution ${2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}$ is made only by that fraction of the molecules whose velocity components lie in the intervals ${\theta }^*<\theta <{\theta }^*+d\theta$ and ${\varphi }^*<\varphi <{\varphi }^*+d\varphi$. This fraction is

\begin{equation}\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \sin {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi \end{equation}

so that the pressure contribution from molecules whose velocity components lie in these ranges is

\begin{equation}dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi \end{equation}

The total pressure at $A$ is just the sum of the contributions from molecules with all possible combinations of velocities $v^*$, ${\theta }^*$, and ${\varphi }^*$. To find this sum, we integrate over all possible velocity vectors. The allowed values of $v$ are $0\le v<\infty$. There are no constraints on the values of $\varphi$; we have $0\le \varphi <2\pi$. However, since all of the impacting molecules must have a velocity component in the positive \textit{z}-direction, the possible values of $\theta$ lie in the interval $0\le \theta <{\pi }/{2}$. We designate the velocity of the original molecule as $\left(v^*,{\theta }^*,{\varphi }^*\right)$ and retain this notation to be as specific as possible in describing the tube bounded by $A$ and $A^o$. However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressure:on wall at $A$ becomes

\begin{equation}P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times \end{equation}

\begin{equation}\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \  d\theta \int^{2\pi }_0 d\varphi \end{equation}

\begin{equation}=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda  \end{equation}

and the pressure–volume product becomes

\begin{equation}PV=\frac{mN}{\lambda } \end{equation}

Since $m,$ $N$, and $\lambda$ are constants, this is Boyle's law. Equating this pressure–volume product to that given by the ideal gas equation, we have ${mN}/{\lambda }=NkT$ so that

\begin{equation}\lambda =\frac{m}{kT} \end{equation}

Finally, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes

\begin{equation}\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \end{equation}

and the probability density becomes

\begin{equation}\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \end{equation}

This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are $\left(v^*,{\theta }^*,{\varphi }^*\right)$ creates a pressure ${2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ on the area $A$ with a probability of $Av^*t\mathrm{cos} {\theta }^*/{V}$. (The latter term is the probability that a molecule, whose velocity is $\left(v^*,{\theta }^*,{\varphi }^*\right)$, is, at time $t=0$, in a location from which it can reach $A$ within time $t.$ If the molecule is to hit the wall within time $t$, at time $t=0$ the molecule must be within the tubular segment of volume is $Av^*t\mathrm{cos} {\theta }^*$. The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product

\begin{equation}\left(\frac{2mv^*\cos {\theta }^*}{At}\right)\left(\frac{Av^*t \cos {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2 \end{equation}

is the pressure contribution of a molecule with velocity $\left(v^*,{\theta }^*,{\varphi }^*\right)$, when ${\theta }^*$ is in the interval $0\le {\theta }^*<{\pi }/{2}$. The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.

It is useful to view the Maxwell-Boltzmann equation as the product of a term

\begin{equation}\exp\left({-mv^2}/{2kT}\right) \end{equation}

—called the \textbf{\textit{Boltzmann}} \textbf{\textit{factor}}—and a pre-exponential term that is proportional to the \textbf{\textit{number of ways}} that a molecule can have a given velocity, $v$. If there were no constraints on a molecule's speed, we would expect that the number of molecules with speeds between $v$ and $v+dv$ would increase as $v$ increases, because the probability that a molecule has a speed between $v$ and $v+dv$ is proportional to the volume in velocity space of a spherical shell of thickness $dv$. The volume of a spherical shell of thickness $dv$ is $4\pi v^2dv$, which increases as the square of $v$. However, the number of molecules with large values of $v$ is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor introduces this constraint. A molecule whose mass is m and whose scalar velocity is $v$ has kinetic energy $\epsilon ={mv^2}/{2}$. The Boltzmann factor is often written as $\exp\left({-\epsilon }/{kT}\right)$.

\end{document}

thoughts

The user wants me to add labels to all equations in the provided Latex file.
The labels should be descriptive and use underscores instead of spaces.
I need to go through the Latex file, identify each equation, create a descriptive label, and insert it into the equation environment using \label{}.
I will go equation by equation and think about a descriptive label for each.

Equation 1: $P_1\left(v^\right)=\frac{2mv^ \cos {\theta }^*\ }{At}$
Label: Pressure_contribution_single_molecule

Equation 2: $\left(\frac{2mv^* \cos {\theta }^\ }{At}\right)\left(\frac{ANv^t \cos {\theta }^\ }{V}\right)=\frac{2mN \left(v^ \cos {\theta }^*\right)^2}{V}$
Label: Total_pressure_same_velocity

Equation 3: $\rho \left(v^,{\theta }^,{\varphi }^\right) \left(v^\right)^2 \sin {\theta }^dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi$
Label: Velocity_distribution_fraction

Equation 4: $dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^\right)^2\exp\left(\frac{-\lambda \left(v^\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi$
Label: Differential_pressure_contribution

Equation 5 & 6 & 7 (multiline equation):
$P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times$
$\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \ d\theta \int^{2\pi }_0 d\varphi$
$=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda$
Label: Total_pressure_integral

Equation 8: $PV=\frac{mN}{\lambda }$
Label: Pressure_Volume_product

Equation 9: $\lambda =\frac{m}{kT}$
Label: Lambda_definition

Equation 10: $\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right)$
Label: Maxwell_Boltzmann_equation

Equation 11: $\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right)$
Label: Probability_density

Equation 12: $\left(\frac{2mv^\cos {\theta }^}{At}\right)\left(\frac{Av^t \cos {\theta }^}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2$
Label: Expected_pressure_contribution

Equation 13: $\exp\left({-mv^2}/{2kT}\right)$
Label: Boltzmann_factor

Now I will insert these labels into the Latex file.

response

\documentclass{article}
\usepackage{amsmath}

% margins of 1 inch:
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}

\usepackage[pdftex]{hyperref} % hyperlink equation and bibliographic citations
\author{Ben Payne, with Gemini 2.0}
\title{Boyle's Law from first principles}

\begin{document}
\maketitle
\begin{abstract}
Derive Boyle's Law rigorously.
\end{abstract}

Consider the collisions of gas molecules with a small portion of the wall of their container. Suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. Denote both the segment of the wall and its area as $A$. $A$ can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.

Let the volume of the container be $V$ and the number of gas molecules in the container be $N$. We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within $A$. We begin our observations at time $t=0$ and suppose that the collision occurs at time $t$.

As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time $t=0$. We orient the axes of this coordinate system so that the $xy$-plane is parallel to the plane of $A$, and the z-axis is pointed toward the wall. Then the unit vector along the $z$-axis and a vector perpendicular to $A$ are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is $\left(v^*,{\theta }^*,{\varphi }^*\right)$. The vector $\mathop{v^*}\limits^{\rightharpoonup}t$, drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time $t$. The $z$-component of the molecular velocity vector is normal to the plane of $A$ at the point of impact; the magnitude of the $z$-component $v^*{\mathrm{cos} {\theta }^*\ }$. The perpendicular distance from the plane of \textit{A} to the $xy$-plane of the Cartesian system is $v^*t{\mathrm{cos} {\theta }^*\ }$.

We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is $v_z=v^*{\mathrm{cos} {\theta }^*\ }$. Afterward, it is $v_z={-v}^*{\mathrm{cos} {\theta }^*\ }$. Only this change in the $v_z$ component contributes to the force on the wall within $A$. (The $v_x$ and $v_y$ components are not changed by the collision.) During the collision, the molecule's momentum change is ${-2mv}^*{\mathrm{cos} {\theta }^*\ }$. During our period of observation, the average force on the molecule is thus ${\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$. The force that the molecule exerts on the wall is ${\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$, and hence the contribution that this particular collision---by one molecule traveling at velocity $v^*$---makes to the pressure on the wall is

\begin{equation}\label{Pressure_contribution_single_molecule}P_1\left(v^*\right)=\frac{2mv^* \cos {\theta }^*\ }{At} \end{equation}

We want to find the pressure on segment $A$ of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are $v^*$, ${\theta }^*$, and ${\varphi }^*$, and whose location at time $t=0$ enables it to reach $A$ within time $t$, makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all \textit{N} of the molecules in the volume, $V$, are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach $A$ within time $t$ by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of $A$. This tube also cuts the $xy$-plane (the $z=0$ plane) of our coordinate system in such a way as to make an exact replica of $A$ in this plane. Call this replica $A^o$.

The area of $A^o$ is $A$; the plane of $A^o$ is parallel to the plane of $A$; and the perpendicular distance between the plane of $A$ and the plane of $A^o$ is $v^*t{\mathrm{cos} {\theta }^*\ }$. The volume of this tube is therefore ${Av}^*t{\mathrm{cos} {\theta }^*\ }$. Since there are ${N}/{V}$ molecules per unit volume, the total number of molecules in the tube is ${\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}$. When we assume that every molecule has velocity components $v^*$, ${\theta }^*$, and ${\varphi }^*$, all of the molecules in the tube reach $A$ within time $t$, because each of them travels parallel to the selected molecule, and each of them is initially at least as close to $A$ as is the selected molecule. Therefore, each molecule in the tube contributes $P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ to the pressure at $A$. The total pressure is the pressure per molecule multiplied by the number of molecules:

\begin{equation}\label{Total_pressure_same_velocity}\left(\frac{2mv^* \cos {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \cos {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \cos {\theta }^*\right)^2}{V} \end{equation}

However, the molecular velocities are not all the same, and the pressure contribution ${2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}$ is made only by that fraction of the molecules whose velocity components lie in the intervals ${\theta }^*<\theta <{\theta }^*+d\theta$ and ${\varphi }^*<\varphi <{\varphi }^*+d\varphi$. This fraction is

\begin{equation}\label{Velocity_distribution_fraction}\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \sin {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi \end{equation}

so that the pressure contribution from molecules whose velocity components lie in these ranges is

\begin{equation}\label{Differential_pressure_contribution}dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi \end{equation}

The total pressure at $A$ is just the sum of the contributions from molecules with all possible combinations of velocities $v^*$, ${\theta }^*$, and ${\varphi }^*$. To find this sum, we integrate over all possible velocity vectors. The allowed values of $v$ are $0\le v<\infty$. There are no constraints on the values of $\varphi$; we have $0\le \varphi <2\pi$. However, since all of the impacting molecules must have a velocity component in the positive \textit{z}-direction, the possible values of $\theta$ lie in the interval $0\le \theta <{\pi }/{2}$. We designate the velocity of the original molecule as $\left(v^*,{\theta }^*,{\varphi }^*\right)$ and retain this notation to be as specific as possible in describing the tube bounded by $A$ and $A^o$. However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressure:on wall at $A$ becomes

\begin{equation}\label{Total_pressure_integral}P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times
\end{equation}
\begin{equation}
\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \  d\theta \int^{2\pi }_0 d\varphi
\end{equation}
\begin{equation}
=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda
\end{equation}

and the pressure–volume product becomes

\begin{equation}\label{Pressure_Volume_product}PV=\frac{mN}{\lambda } \end{equation}

Since $m,$ $N$, and $\lambda$ are constants, this is Boyle's law. Equating this pressure–volume product to that given by the ideal gas equation, we have ${mN}/{\lambda }=NkT$ so that

\begin{equation}\label{Lambda_definition}\lambda =\frac{m}{kT} \end{equation}

Finally, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes

\begin{equation}\label{Maxwell_Boltzmann_equation}\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \end{equation}

and the probability density becomes

\begin{equation}\label{Probability_density}\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) \end{equation}

This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are $\left(v^*,{\theta }^*,{\varphi }^*\right)$ creates a pressure ${2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ on the area $A$ with a probability of $Av^*t\mathrm{cos} {\theta }^*/{V}$. (The latter term is the probability that a molecule, whose velocity is $\left(v^*,{\theta }^*,{\varphi }^*\right)$, is, at time $t=0$, in a location from which it can reach $A$ within time $t.$ If the molecule is to hit the wall within time $t$, at time $t=0$ the molecule must be within the tubular segment of volume is $Av^*t\mathrm{cos} {\theta }^*$. The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product

\begin{equation}\label{Expected_pressure_contribution}\left(\frac{2mv^*\cos {\theta }^*}{At}\right)\left(\frac{Av^*t \cos {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2 \end{equation}

is the pressure contribution of a molecule with velocity $\left(v^*,{\theta }^*,{\varphi }^*\right)$, when ${\theta }^*$ is in the interval $0\le {\theta }^*<{\pi }/{2}$. The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.

It is useful to view the Maxwell-Boltzmann equation as the product of a term

\begin{equation}\label{Boltzmann_factor}\exp\left({-mv^2}/{2kT}\right) \end{equation}

—called the \textbf{\textit{Boltzmann}} \textbf{\textit{factor}}—and a pre-exponential term that is proportional to the \textbf{\textit{number of ways}} that a molecule can have a given velocity, $v$. If there were no constraints on a molecule's speed, we would expect that the number of molecules with speeds between $v$ and $v+dv$ would increase as $v$ increases, because the probability that a molecule has a speed between $v$ and $v+dv$ is proportional to the volume in velocity space of a spherical shell of thickness $dv$. The volume of a spherical shell of thickness $dv$ is $4\pi v^2dv$, which increases as the square of $v$. However, the number of molecules with large values of $v$ is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor introduces this constraint. A molecule whose mass is m and whose scalar velocity is $v$ has kinetic energy $\epsilon ={mv^2}/{2}$. The Boltzmann factor is often written as $\exp\left({-\epsilon }/{kT}\right)$.

\end{document}

@bhpayne
Copy link
Member Author

bhpayne commented Jan 26, 2025

prompt

The following Latex file contains a derivation with many steps. Sometimes a previous expression is referenced implicitly.

Edit the following text to manually insert references where appropriate. For example replace text like "substitute the forces" with "substitute Eq.~\ref{} to get".

Be sure to reference the relevant equation labels so that Latex can compile the document.

\documentclass{article}
\usepackage{amsmath}

% margins of 1 inch:
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}

\usepackage[pdftex]{hyperref} % hyperlink equation and bibliographic citations
\author{Ben Payne, with Gemini 2.0}
\title{Boyle's Law from first principles}

\begin{document}
\maketitle
\begin{abstract}
Derive Boyle's Law rigorously.
\end{abstract}

Consider the collisions of gas molecules with a small portion of the wall of their container. Suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. Denote both the segment of the wall and its area as $A$. $A$ can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.

Let the volume of the container be $V$ and the number of gas molecules in the container be $N$. We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within $A$. We begin our observations at time $t=0$ and suppose that the collision occurs at time $t$.

As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time $t=0$. We orient the axes of this coordinate system so that the $xy$-plane is parallel to the plane of $A$, and the z-axis is pointed toward the wall. Then the unit vector along the $z$-axis and a vector perpendicular to $A$ are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is $\left(v^*,{\theta }^*,{\varphi }^*\right)$. The vector $\mathop{v^*}\limits^{\rightharpoonup}t$, drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time $t$. The $z$-component of the molecular velocity vector is normal to the plane of $A$ at the point of impact; the magnitude of the $z$-component $v^*{\mathrm{cos} {\theta }^*\ }$. The perpendicular distance from the plane of \textit{A} to the $xy$-plane of the Cartesian system is $v^*t{\mathrm{cos} {\theta }^*\ }$.

We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is $v_z=v^*{\mathrm{cos} {\theta }^*\ }$. Afterward, it is $v_z={-v}^*{\mathrm{cos} {\theta }^*\ }$. Only this change in the $v_z$ component contributes to the force on the wall within $A$. (The $v_x$ and $v_y$ components are not changed by the collision.) During the collision, the molecule's momentum change is ${-2mv}^*{\mathrm{cos} {\theta }^*\ }$. During our period of observation, the average force on the molecule is thus ${\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$. The force that the molecule exerts on the wall is ${\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$, and hence the contribution that this particular collision---by one molecule traveling at velocity $v^*$---makes to the pressure on the wall is

\begin{equation}
\label{Pressure_contribution_single_molecule}
P_1\left(v^*\right)=\frac{2mv^* \cos {\theta }^*\ }{At} 
\end{equation}

We want to find the pressure on segment $A$ of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are $v^*$, ${\theta }^*$, and ${\varphi }^*$, and whose location at time $t=0$ enables it to reach $A$ within time $t$, makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all \textit{N} of the molecules in the volume, $V$, are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach $A$ within time $t$ by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of $A$. This tube also cuts the $xy$-plane (the $z=0$ plane) of our coordinate system in such a way as to make an exact replica of $A$ in this plane. Call this replica $A^o$.

The area of $A^o$ is $A$; the plane of $A^o$ is parallel to the plane of $A$; and the perpendicular distance between the plane of $A$ and the plane of $A^o$ is $v^*t{\mathrm{cos} {\theta }^*\ }$. The volume of this tube is therefore ${Av}^*t{\mathrm{cos} {\theta }^*\ }$. Since there are ${N}/{V}$ molecules per unit volume, the total number of molecules in the tube is ${\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}$. When we assume that every molecule has velocity components $v^*$, ${\theta }^*$, and ${\varphi }^*$, all of the molecules in the tube reach $A$ within time $t$, because each of them travels parallel to the selected molecule, and each of them is initially at least as close to $A$ as is the selected molecule. Therefore, each molecule in the tube contributes $P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ to the pressure at $A$. The total pressure is the pressure per molecule multiplied by the number of molecules:

\begin{equation}
\label{Total_pressure_same_velocity}
\left(\frac{2mv^* \cos {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \cos {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \cos {\theta }^*\right)^2}{V} 
\end{equation}

However, the molecular velocities are not all the same, and the pressure contribution ${2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}$ is made only by that fraction of the molecules whose velocity components lie in the intervals ${\theta }^*<\theta <{\theta }^*+d\theta$ and ${\varphi }^*<\varphi <{\varphi }^*+d\varphi$. This fraction is

\begin{equation}
\label{Velocity_distribution_fraction}
\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \sin {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi 
\end{equation}

so that the pressure contribution from molecules whose velocity components lie in these ranges is

\begin{equation}
\label{Differential_pressure_contribution}
dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi 
\end{equation}

The total pressure at $A$ is just the sum of the contributions from molecules with all possible combinations of velocities $v^*$, ${\theta }^*$, and ${\varphi }^*$. To find this sum, we integrate over all possible velocity vectors. The allowed values of $v$ are $0\le v<\infty$. There are no constraints on the values of $\varphi$; we have $0\le \varphi <2\pi$. However, since all of the impacting molecules must have a velocity component in the positive \textit{z}-direction, the possible values of $\theta$ lie in the interval $0\le \theta <{\pi }/{2}$. We designate the velocity of the original molecule as $\left(v^*,{\theta }^*,{\varphi }^*\right)$ and retain this notation to be as specific as possible in describing the tube bounded by $A$ and $A^o$. However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressure:on wall at $A$ becomes

\begin{multline}
\label{Total_pressure_integral}
P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times 
\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \  d\theta \int^{2\pi }_0 d\varphi
\\
=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda
\end{multline}

and the pressure–volume product becomes

\begin{equation}
\label{Pressure_Volume_product}
PV=\frac{mN}{\lambda } 
\end{equation}

Since $m,$ $N$, and $\lambda$ are constants, this is Boyle's law. Equating this pressure–volume product to that given by the ideal gas equation, we have ${mN}/{\lambda }=NkT$ so that

\begin{equation}
\label{Lambda_definition}
\lambda =\frac{m}{kT} 
\end{equation}

Finally, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes

\begin{equation}
\label{Maxwell_Boltzmann_equation}
\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) 
\end{equation}

and the probability density becomes

\begin{equation}
\label{Probability_density}
\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right) 
\end{equation}

This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are $\left(v^*,{\theta }^*,{\varphi }^*\right)$ creates a pressure ${2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ on the area $A$ with a probability of $Av^*t\mathrm{cos} {\theta }^*/{V}$. (The latter term is the probability that a molecule, whose velocity is $\left(v^*,{\theta }^*,{\varphi }^*\right)$, is, at time $t=0$, in a location from which it can reach $A$ within time $t.$ If the molecule is to hit the wall within time $t$, at time $t=0$ the molecule must be within the tubular segment of volume is $Av^*t\mathrm{cos} {\theta }^*$. The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product

\begin{equation}
\label{Expected_pressure_contribution}
\left(\frac{2mv^*\cos {\theta }^*}{At}\right)\left(\frac{Av^*t \cos {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2 
\end{equation}

is the pressure contribution of a molecule with velocity $\left(v^*,{\theta }^*,{\varphi }^*\right)$, when ${\theta }^*$ is in the interval $0\le {\theta }^*<{\pi }/{2}$. The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.

It is useful to view the Maxwell-Boltzmann equation as the product of a term

\begin{equation}
\label{Boltzmann_factor}
\exp\left({-mv^2}/{2kT}\right) 
\end{equation}

—called the \textbf{\textit{Boltzmann}} \textbf{\textit{factor}}—and a pre-exponential term that is proportional to the \textbf{\textit{number of ways}} that a molecule can have a given velocity, $v$. If there were no constraints on a molecule's speed, we would expect that the number of molecules with speeds between $v$ and $v+dv$ would increase as $v$ increases, because the probability that a molecule has a speed between $v$ and $v+dv$ is proportional to the volume in velocity space of a spherical shell of thickness $dv$. The volume of a spherical shell of thickness $dv$ is $4\pi v^2dv$, which increases as the square of $v$. However, the number of molecules with large values of $v$ is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor introduces this constraint. A molecule whose mass is m and whose scalar velocity is $v$ has kinetic energy $\epsilon ={mv^2}/{2}$. The Boltzmann factor is often written as $\exp\left({-\epsilon }/{kT}\right)$.

\end{document}

thoughts

The user wants to edit a Latex file to add equation references.
I need to read through the text and identify places where an equation is being referenced.
Then, I need to find the corresponding equation label and insert a reference using Eq.~\ref{label}.

Let's go through the text step by step.

  1. "The force that the molecule exerts on the wall is ${\left({2mv}^{\mathrm{cos} {\theta }^\ }\right)}/{t}$, and hence the contribution that this particular collision---by one molecule traveling at velocity $v^*$---makes to the pressure on the wall is..." - This is leading to equation (1). So, before "the pressure on the wall is", I can add "from which we get the pressure contribution of a single molecule as".

  2. "The total pressure is the pressure per molecule multiplied by the number of molecules:" - This refers to equation (1) and (2). So, I can say "Substituting Eq.\ref{Pressure_contribution_single_molecule} into the expression for total pressure, we get Eq.\ref{Total_pressure_same_velocity}"

  3. "However, the molecular velocities are not all the same, and the pressure contribution ${2mN{\left(v^{\mathrm{cos} {\theta }^\ }\right)}^2}/{V}$ is made only by that fraction of the molecules whose velocity components lie in the intervals ${\theta }^<\theta <{\theta }^+d\theta$ and ${\varphi }^<\varphi <{\varphi }^+d\varphi$. This fraction is..." - This refers to equation (2) and (3). So, I can say "The fraction of molecules with velocities in these intervals is given by Eq.~\ref{Velocity_distribution_fraction}".

  4. "so that the pressure contribution from molecules whose velocity components lie in these ranges is..." - This refers to equation (2) and (3) to get (4). So, I can say "Combining Eq.\ref{Total_pressure_same_velocity} and Eq.\ref{Velocity_distribution_fraction}, the differential pressure contribution is given by Eq.~\ref{Differential_pressure_contribution}".

  5. "To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressure:on wall at $A$ becomes..." - This refers to equation (4) and leads to (5). So, I can say "Integrating Eq.\ref{Differential_pressure_contribution} over all possible velocities, we obtain the total pressure in Eq.\ref{Total_pressure_integral}".

  6. "and the pressure–volume product becomes..." - This refers to equation (5) and leads to (6). So, I can say "Simplifying Eq.\ref{Total_pressure_integral}, we obtain the pressure-volume product in Eq.\ref{Pressure_Volume_product}".

  7. "Equating this pressure–volume product to that given by the ideal gas equation, we have ${mN}/{\lambda }=NkT$ so that..." - This refers to equation (6) and leads to (7). So, I can say "Comparing Eq.\ref{Pressure_Volume_product} with the ideal gas law, we obtain Eq.\ref{Lambda_definition} for $\lambda$".

  8. "Finally, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes..." - This is using equation (7) and probably earlier equations to get (8). So, I can say "Substituting Eq.\ref{Lambda_definition} into the velocity distribution and normalizing, we obtain the Maxwell-Boltzmann equation in Eq.\ref{Maxwell_Boltzmann_equation}".

  9. "and the probability density becomes..." - This might be referring to equation (8) or previous derivations to get (9). So, I can say "The corresponding probability density function is given by Eq.~\ref{Probability_density}".

  10. "Therefore, the product..." - This is deriving expected pressure and leads to (10). So, I can say "The expected pressure contribution is then given by Eq.~\ref{Expected_pressure_contribution}".

  11. "It is useful to view the Maxwell-Boltzmann equation as the product of a term..." - This is describing equation (8). So, I can say "As seen in Eq.\ref{Maxwell_Boltzmann_equation}, the Maxwell-Boltzmann equation can be seen as a product of..." and for the Boltzmann factor equation, "This term is known as the Boltzmann factor, shown in Eq.\ref{Boltzmann_factor}".

Now I will edit the text with these references.

response

\documentclass{article}
\usepackage{amsmath}

% margins of 1 inch:
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}

\usepackage[pdftex]{hyperref} % hyperlink equation and bibliographic citations
\author{Ben Payne, with Gemini 2.0}
\title{Boyle's Law from first principles}

\begin{document}
\maketitle
\begin{abstract}
Derive Boyle's Law rigorously.
\end{abstract}

Consider the collisions of gas molecules with a small portion of the wall of their container. Suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. Denote both the segment of the wall and its area as $A$. $A$ can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.

Let the volume of the container be $V$ and the number of gas molecules in the container be $N$. We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within $A$. We begin our observations at time $t=0$ and suppose that the collision occurs at time $t$.

As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time $t=0$. We orient the axes of this coordinate system so that the $xy$-plane is parallel to the plane of $A$, and the z-axis is pointed toward the wall. Then the unit vector along the $z$-axis and a vector perpendicular to $A$ are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is $\left(v^*,{\theta }^*,{\varphi }^*\right)$. The vector $\mathop{v^*}\limits^{\rightharpoonup}t$, drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time $t$. The $z$-component of the molecular velocity vector is normal to the plane of $A$ at the point of impact; the magnitude of the $z$-component $v^*{\mathrm{cos} {\theta }^*\ }$. The perpendicular distance from the plane of \textit{A} to the $xy$-plane of the Cartesian system is $v^*t{\mathrm{cos} {\theta }^*\ }$.

We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is $v_z=v^*{\mathrm{cos} {\theta }^*\ }$. Afterward, it is $v_z={-v}^*{\mathrm{cos} {\theta }^*\ }$. Only this change in the $v_z$ component contributes to the force on the wall within $A$. (The $v_x$ and $v_y$ components are not changed by the collision.) During the collision, the molecule's momentum change is ${-2mv}^*{\mathrm{cos} {\theta }^*\ }$. During our period of observation, the average force on the molecule is thus ${\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$. The force that the molecule exerts on the wall is ${\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$, and hence the contribution that this particular collision---by one molecule traveling at velocity $v^*$---makes to the pressure on the wall is
\begin{equation}
\label{Pressure_contribution_single_molecule}
P_1\left(v^*\right)=\frac{2mv^* \cos {\theta }^*\ }{At}
\end{equation}

We want to find the pressure on segment $A$ of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are $v^*$, ${\theta }^*$, and ${\varphi }^*$, and whose location at time $t=0$ enables it to reach $A$ within time $t$, makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all \textit{N} of the molecules in the volume, $V$, are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach $A$ within time $t$ by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of $A$. This tube also cuts the $xy$-plane (the $z=0$ plane) of our coordinate system in such a way as to make an exact replica of $A$ in this plane. Call this replica $A^o$.

The area of $A^o$ is $A$; the plane of $A^o$ is parallel to the plane of $A$; and the perpendicular distance between the plane of $A$ and the plane of $A^o$ is $v^*t{\mathrm{cos} {\theta }^*\ }$. The volume of this tube is therefore ${Av}^*t{\mathrm{cos} {\theta }^*\ }$. Since there are ${N}/{V}$ molecules per unit volume, the total number of molecules in the tube is ${\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}$. When we assume that every molecule has velocity components $v^*$, ${\theta }^*$, and ${\varphi }^*$, all of the molecules in the tube reach $A$ within time $t$, because each of them travels parallel to the selected molecule, and each of them is initially at least as close to $A$ as is the selected molecule. Therefore, each molecule in the tube contributes $P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ to the pressure at $A$. The total pressure is the pressure per molecule multiplied by the number of molecules:

\begin{equation}
\label{Total_pressure_same_velocity}
\left(\frac{2mv^* \cos {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \cos {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \cos {\theta }^*\right)^2}{V}
\end{equation}

However, the molecular velocities are not all the same, and the pressure contribution ${2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}$ is made only by that fraction of the molecules whose velocity components lie in the intervals ${\theta }^*<\theta <{\theta }^*+d\theta$ and ${\varphi }^*<\varphi <{\varphi }^*+d\varphi$. This fraction is

\begin{equation}
\label{Velocity_distribution_fraction}
\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \sin {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi
\end{equation}

so that the pressure contribution from molecules whose velocity components lie in these ranges is obtained by multiplying Eq.~\ref{Total_pressure_same_velocity} by the fraction of molecules given by Eq.~\ref{Velocity_distribution_fraction}:
\begin{equation}
\label{Differential_pressure_contribution}
dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi
\end{equation}

The total pressure at $A$ is just the sum of the contributions from molecules with all possible combinations of velocities $v^*$, ${\theta }^*$, and ${\varphi }^*$. To find this sum, we integrate Eq.~\ref{Differential_pressure_contribution} over all possible velocity vectors. The allowed values of $v$ are $0\le v<\infty$. There are no constraints on the values of $\varphi$; we have $0\le \varphi <2\pi$. However, since all of the impacting molecules must have a velocity component in the positive \textit{z}-direction, the possible values of $\theta$ lie in the interval $0\le \theta <{\pi }/{2}$. We designate the velocity of the original molecule as $\left(v^*,{\theta }^*,{\varphi }^*\right)$ and retain this notation to be as specific as possible in describing the tube bounded by $A$ and $A^o$. However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressure:on wall at $A$ becomes

\begin{multline}
\label{Total_pressure_integral}
P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times
\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \  d\theta \int^{2\pi }_0 d\varphi
\\
=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda
\end{multline}
From Eq.~\ref{Total_pressure_integral}, the pressure–volume product becomes
\begin{equation}
\label{Pressure_Volume_product}
PV=\frac{mN}{\lambda }
\end{equation}

Since $m,$ $N$, and $\lambda$ are constants, this is Boyle's law. Equating Eq.~\ref{Pressure_Volume_product} to that given by the ideal gas equation, we have ${mN}/{\lambda }=NkT$ so that

\begin{equation}
\label{Lambda_definition}
\lambda =\frac{m}{kT}
\end{equation}

Finally, substituting Eq.~\ref{Lambda_definition} into the velocity distribution and normalizing, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes

\begin{equation}
\label{Maxwell_Boltzmann_equation}
\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right)
\end{equation}

and the probability density becomes

\begin{equation}
\label{Probability_density}
\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right)
\end{equation}

This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are $\left(v^*,{\theta }^*,{\varphi }^*\right)$ creates a pressure ${2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ on the area $A$ with a probability of $Av^*t\mathrm{cos} {\theta }^*/{V}$. (The latter term is the probability that a molecule, whose velocity is $\left(v^*,{\theta }^*,{\varphi }^*\right)$, is, at time $t=0$, in a location from which it can reach $A$ within time $t.$ If the molecule is to hit the wall within time $t$, at time $t=0$ the molecule must be within the tubular segment of volume is $Av^*t\mathrm{cos} {\theta }^*$. The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product
\begin{equation}
\label{Expected_pressure_contribution}
\left(\frac{2mv^*\cos {\theta }^*}{At}\right)\left(\frac{Av^*t \cos {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2
\end{equation}
is the pressure contribution of a molecule with velocity $\left(v^*,{\theta }^*,{\varphi }^*\right)$, when ${\theta }^*$ is in the interval $0\le {\theta }^*<{\pi }/{2}$. The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.

It is useful to view the Maxwell-Boltzmann equation as the product of a term
\begin{equation}
\label{Boltzmann_factor}
\exp\left({-mv^2}/{2kT}\right)
\end{equation}

—called the \textbf{\textit{Boltzmann}} \textbf{\textit{factor}}—and a pre-exponential term that is proportional to the \textbf{\textit{number of ways}} that a molecule can have a given velocity, $v$. As seen in Eq.~\ref{Maxwell_Boltzmann_equation}, if there were no constraints on a molecule's speed, we would expect that the number of molecules with speeds between $v$ and $v+dv$ would increase as $v$ increases, because the probability that a molecule has a speed between $v$ and $v+dv$ is proportional to the volume in velocity space of a spherical shell of thickness $dv$. The volume of a spherical shell of thickness $dv$ is $4\pi v^2dv$, which increases as the square of $v$. However, the number of molecules with large values of $v$ is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor, shown in Eq.~\ref{Boltzmann_factor}, introduces this constraint. A molecule whose mass is m and whose scalar velocity is $v$ has kinetic energy $\epsilon ={mv^2}/{2}$. The Boltzmann factor is often written as $\exp\left({-\epsilon }/{kT}\right)$.

\end{document}

@bhpayne
Copy link
Member Author

bhpayne commented Jan 26, 2025

prompt to Gemini 2.0 Flash Thinking Experimental 01-21 https://aistudio.google.com/prompts/

The following latex file contains equations and variables. Provide a list, formatted as Latex, of every unique variable and a description of that variable.

For each entry in the list include a reference to the labeled equations where each variable is used. Write out just the Latex list as your answer.

\documentclass{article}
\usepackage{amsmath}

% margins of 1 inch:
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}

\usepackage[pdftex]{hyperref} % hyperlink equation and bibliographic citations
\author{Ben Payne, with Gemini 2.0}
\title{Boyle's Law from first principles}

\begin{document}
\maketitle
\begin{abstract}
Derive Boyle's Law rigorously.
\end{abstract}

Consider the collisions of gas molecules with a small portion of the wall of their container. Suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. Denote both the segment of the wall and its area as $A$. $A$ can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.

Let the volume of the container be $V$ and the number of gas molecules in the container be $N$. We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within $A$. We begin our observations at time $t=0$ and suppose that the collision occurs at time $t$.

As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time $t=0$. We orient the axes of this coordinate system so that the $xy$-plane is parallel to the plane of $A$, and the z-axis is pointed toward the wall. Then the unit vector along the $z$-axis and a vector perpendicular to $A$ are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is $\left(v^*,{\theta }^*,{\varphi }^*\right)$. The vector $\mathop{v^*}\limits^{\rightharpoonup}t$, drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time $t$. The $z$-component of the molecular velocity vector is normal to the plane of $A$ at the point of impact; the magnitude of the $z$-component $v^*{\mathrm{cos} {\theta }^*\ }$. The perpendicular distance from the plane of \textit{A} to the $xy$-plane of the Cartesian system is $v^*t{\mathrm{cos} {\theta }^*\ }$.

We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is $v_z=v^*{\mathrm{cos} {\theta }^*\ }$. Afterward, it is $v_z={-v}^*{\mathrm{cos} {\theta }^*\ }$. Only this change in the $v_z$ component contributes to the force on the wall within $A$. (The $v_x$ and $v_y$ components are not changed by the collision.) During the collision, the molecule's momentum change is ${-2mv}^*{\mathrm{cos} {\theta }^*\ }$. During our period of observation, the average force on the molecule is thus ${\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$. The force that the molecule exerts on the wall is ${\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$, and hence the contribution that this particular collision---by one molecule traveling at velocity $v^*$---makes to the pressure on the wall is
\begin{equation}
\label{Pressure_contribution_single_molecule}
P_1\left(v^*\right)=\frac{2mv^* \cos {\theta }^*\ }{At}
\end{equation}

We want to find the pressure on segment $A$ of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are $v^*$, ${\theta }^*$, and ${\varphi }^*$, and whose location at time $t=0$ enables it to reach $A$ within time $t$, makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all \textit{N} of the molecules in the volume, $V$, are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach $A$ within time $t$ by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of $A$. This tube also cuts the $xy$-plane (the $z=0$ plane) of our coordinate system in such a way as to make an exact replica of $A$ in this plane. Call this replica $A^o$.

The area of $A^o$ is $A$; the plane of $A^o$ is parallel to the plane of $A$; and the perpendicular distance between the plane of $A$ and the plane of $A^o$ is $v^*t{\mathrm{cos} {\theta }^*\ }$. The volume of this tube is therefore ${Av}^*t{\mathrm{cos} {\theta }^*\ }$. Since there are ${N}/{V}$ molecules per unit volume, the total number of molecules in the tube is ${\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}$. When we assume that every molecule has velocity components $v^*$, ${\theta }^*$, and ${\varphi }^*$, all of the molecules in the tube reach $A$ within time $t$, because each of them travels parallel to the selected molecule, and each of them is initially at least as close to $A$ as is the selected molecule. Therefore, each molecule in the tube contributes $P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ to the pressure at $A$. The total pressure is the pressure per molecule multiplied by the number of molecules:

\begin{equation}
\label{Total_pressure_same_velocity}
\left(\frac{2mv^* \cos {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \cos {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \cos {\theta }^*\right)^2}{V}
\end{equation}

However, the molecular velocities are not all the same, and the pressure contribution ${2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}$ is made only by that fraction of the molecules whose velocity components lie in the intervals ${\theta }^*<\theta <{\theta }^*+d\theta$ and ${\varphi }^*<\varphi <{\varphi }^*+d\varphi$. This fraction is

\begin{equation}
\label{Velocity_distribution_fraction}
\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \sin {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi
\end{equation}

so that the pressure contribution from molecules whose velocity components lie in these ranges is obtained by multiplying Eq.~\ref{Total_pressure_same_velocity} by the fraction of molecules given by Eq.~\ref{Velocity_distribution_fraction}:
\begin{equation}
\label{Differential_pressure_contribution}
dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi
\end{equation}

The total pressure at $A$ is just the sum of the contributions from molecules with all possible combinations of velocities $v^*$, ${\theta }^*$, and ${\varphi }^*$. To find this sum, we integrate Eq.~\ref{Differential_pressure_contribution} over all possible velocity vectors. The allowed values of $v$ are $0\le v<\infty$. There are no constraints on the values of $\varphi$; we have $0\le \varphi <2\pi$. However, since all of the impacting molecules must have a velocity component in the positive \textit{z}-direction, the possible values of $\theta$ lie in the interval $0\le \theta <{\pi }/{2}$. We designate the velocity of the original molecule as $\left(v^*,{\theta }^*,{\varphi }^*\right)$ and retain this notation to be as specific as possible in describing the tube bounded by $A$ and $A^o$. However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressure:on wall at $A$ becomes

\begin{multline}
\label{Total_pressure_integral}
P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times
\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \  d\theta \int^{2\pi }_0 d\varphi
\\
=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda
\end{multline}
From Eq.~\ref{Total_pressure_integral}, the pressure–volume product becomes
\begin{equation}
\label{Pressure_Volume_product}
PV=\frac{mN}{\lambda }
\end{equation}

Since $m,$ $N$, and $\lambda$ are constants, this is Boyle's law. Equating Eq.~\ref{Pressure_Volume_product} to that given by the ideal gas equation, we have ${mN}/{\lambda }=NkT$ so that

\begin{equation}
\label{Lambda_definition}
\lambda =\frac{m}{kT}
\end{equation}

Finally, substituting Eq.~\ref{Lambda_definition} into the velocity distribution and normalizing, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes

\begin{equation}
\label{Maxwell_Boltzmann_equation}
\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right)
\end{equation}

and the probability density becomes

\begin{equation}
\label{Probability_density}
\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right)
\end{equation}

This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are $\left(v^*,{\theta }^*,{\varphi }^*\right)$ creates a pressure ${2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ on the area $A$ with a probability of $Av^*t\mathrm{cos} {\theta }^*/{V}$. (The latter term is the probability that a molecule, whose velocity is $\left(v^*,{\theta }^*,{\varphi }^*\right)$, is, at time $t=0$, in a location from which it can reach $A$ within time $t.$ If the molecule is to hit the wall within time $t$, at time $t=0$ the molecule must be within the tubular segment of volume is $Av^*t\mathrm{cos} {\theta }^*$. The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product
\begin{equation}
\label{Expected_pressure_contribution}
\left(\frac{2mv^*\cos {\theta }^*}{At}\right)\left(\frac{Av^*t \cos {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2
\end{equation}
is the pressure contribution of a molecule with velocity $\left(v^*,{\theta }^*,{\varphi }^*\right)$, when ${\theta }^*$ is in the interval $0\le {\theta }^*<{\pi }/{2}$. The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.

It is useful to view the Maxwell-Boltzmann equation as the product of a term
\begin{equation}
\label{Boltzmann_factor}
\exp\left({-mv^2}/{2kT}\right)
\end{equation}

—called the \textbf{\textit{Boltzmann}} \textbf{\textit{factor}}—and a pre-exponential term that is proportional to the \textbf{\textit{number of ways}} that a molecule can have a given velocity, $v$. As seen in Eq.~\ref{Maxwell_Boltzmann_equation}, if there were no constraints on a molecule's speed, we would expect that the number of molecules with speeds between $v$ and $v+dv$ would increase as $v$ increases, because the probability that a molecule has a speed between $v$ and $v+dv$ is proportional to the volume in velocity space of a spherical shell of thickness $dv$. The volume of a spherical shell of thickness $dv$ is $4\pi v^2dv$, which increases as the square of $v$. However, the number of molecules with large values of $v$ is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor, shown in Eq.~\ref{Boltzmann_factor}, introduces this constraint. A molecule whose mass is m and whose scalar velocity is $v$ has kinetic energy $\epsilon ={mv^2}/{2}$. The Boltzmann factor is often written as $\exp\left({-\epsilon }/{kT}\right)$.

\end{document}

thoughts

The user wants a Latex list of all unique variables in the provided Latex document.
For each variable in the list, I need to provide:

  1. The variable name.
  2. A description of the variable.
  3. A list of equation labels where the variable is used.

I will go through the document and identify each variable, its description, and the equation labels it appears in.
Then, I will compile a Latex list based on this information.

Variables identification strategy:

  • Look for single letters or short combinations of letters that represent physical quantities or mathematical symbols.
  • Pay attention to mathematical contexts like equations, integrals, and definitions.
  • Consider both normal text and mathematical mode for variable identification.
  • Differentiate between variables and constants/parameters if possible based on context (though the request is just for "variables").
  • For variables with superscripts or subscripts, consider the base variable as the main variable and describe the subscript/superscript if relevant to the description.

Equation label identification strategy:

  • Search for \label{label_name} in the document.
  • For each identified variable, note down the label_name of equations where it is used.

Latex list formatting:

  • Use \begin{itemize} and \item for the list.
  • For each list item, use \textbf{Variable} for the variable name.
  • Use Description: for the description.
  • Use Equations: and \eqref{label_name} for equation references.

Let's start going through the document and identifying variables and equations.

Variables:

  • $A$: area of the wall segment. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Expected_pressure_contribution}
  • $V$: volume of the container. Equations: \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}, \eqref{Expected_pressure_contribution}
  • $N$: number of gas molecules. Equations: \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}
  • $t$: time of observation/collision time. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Expected_pressure_contribution}
  • $v^*$: magnitude of the velocity of the selected molecule. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Expected_pressure_contribution}
  • ${\theta }^*$: polar angle of the velocity of the selected molecule. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Expected_pressure_contribution}
  • ${\varphi }^*$: azimuthal angle of the velocity of the selected molecule. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Expected_pressure_contribution}
  • $v_z$: z-component of velocity. No equation labels found, but mentioned in text.
  • $m$: mass of a molecule. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}, \eqref{Lambda_definition}, \eqref{Maxwell_Boltzmann_equation}, \eqref{Probability_density}, \eqref{Boltzmann_factor}
  • $P_1(v^)$: pressure contribution from a single molecule with velocity $v^$. Equation: \eqref{Pressure_contribution_single_molecule}, used in text before \eqref{Total_pressure_same_velocity}
  • $A^o$: replica of area A in the xy-plane. No equation labels found, but mentioned in text.
  • $\rho(v^, {\theta }^, {\varphi }^*)$: velocity distribution function. Equation: \eqref{Velocity_distribution_fraction} and \eqref{Probability_density} (using $\rho(v, \theta, \varphi)$ in \eqref{Probability_density})
  • $d\theta$: differential polar angle. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}
  • $d\varphi$: differential azimuthal angle. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}
  • $dv$: differential velocity magnitude. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Maxwell_Boltzmann_equation}
  • $dP$: differential pressure contribution. Equation: \eqref{Differential_pressure_contribution}
  • $P$: total pressure. Equations: \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}
  • $\lambda$: parameter in velocity distribution. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}, \eqref{Lambda_definition}
  • $k$: Boltzmann constant. Equations: \eqref{Lambda_definition}, \eqref{Maxwell_Boltzmann_equation}, \eqref{Probability_density}, \eqref{Boltzmann_factor}
  • $T$: temperature. Equations: \eqref{Lambda_definition}, \eqref{Maxwell_Boltzmann_equation}, \eqref{Probability_density}, \eqref{Boltzmann_factor}
  • $f_v(v)$: velocity distribution function (1D). Equation: \eqref{Maxwell_Boltzmann_equation}
  • $\epsilon$: kinetic energy. Equation: \eqref{Boltzmann_factor}

Now, format as Latex list:

response

\begin{itemize}
    \item \textbf{A}: Area of the wall segment. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Expected_pressure_contribution}
    \item \textbf{V}: Volume of the container. Equations: \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}
    \item \textbf{N}: Number of gas molecules in the container. Equations: \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}
    \item \textbf{t}: Time of observation/collision time. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Expected_pressure_contribution}
    \item \textbf{$v^*$}: Magnitude of the velocity of the selected molecule. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Expected_pressure_contribution}
    \item \textbf{${\theta }^*$}: Polar angle of the velocity of the selected molecule. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Expected_pressure_contribution}
    \item \textbf{${\varphi }^*$}: Azimuthal angle of the velocity of the selected molecule. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Expected_pressure_contribution}
    \item \textbf{$v_z$}: z-component of velocity. Equations: None (mentioned in text)
    \item \textbf{m}: Mass of a molecule. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}, \eqref{Lambda_definition}, \eqref{Maxwell_Boltzmann_equation}, \eqref{Probability_density}, \eqref{Boltzmann_factor}
    \item \textbf{$P_1(v^*)$}: Pressure contribution from a single molecule with velocity $v^*$. Equations: \eqref{Pressure_contribution_single_molecule}
    \item \textbf{$\rho(v^*, {\theta }^*, {\varphi }^*)$}: Velocity distribution function. Equations: \eqref{Velocity_distribution_fraction}
    \item \textbf{$d\theta$}: Differential polar angle. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}
    \item \textbf{$d\varphi$}: Differential azimuthal angle. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}
    \item \textbf{$dv$}: Differential velocity magnitude. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Maxwell_Boltzmann_equation}
    \item \textbf{dP}: Differential pressure contribution. Equations: \eqref{Differential_pressure_contribution}
    \item \textbf{P}: Total pressure. Equations: \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}
    \item \textbf{$\lambda$}: Parameter in velocity distribution. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}, \eqref{Lambda_definition}
    \item \textbf{k}: Boltzmann constant. Equations: \eqref{Lambda_definition}, \eqref{Maxwell_Boltzmann_equation}, \eqref{Probability_density}, \eqref{Boltzmann_factor}
    \item \textbf{T}: Temperature. Equations: \eqref{Lambda_definition}, \eqref{Maxwell_Boltzmann_equation}, \eqref{Probability_density}, \eqref{Boltzmann_factor}
    \item \textbf{$f_v(v)$}: Velocity distribution function (1D). Equations: \eqref{Maxwell_Boltzmann_equation}
    \item \textbf{$\epsilon$}: Kinetic energy. Equations: \eqref{Boltzmann_factor}
\end{itemize}

@bhpayne
Copy link
Member Author

bhpayne commented Jan 26, 2025

Resulting .tex file:

\documentclass{article}
\usepackage{amsmath}

% margins of 1 inch:
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}

\usepackage[pdftex]{hyperref} % hyperlink equation and bibliographic citations
\author{Ben Payne, with Gemini 2.0}
\title{Boyle's Law from first principles}

\begin{document}
\maketitle
\begin{abstract}
Derive Boyle's Law rigorously.
\end{abstract}

\section{variables used in derivation}

\begin{itemize}
    \item \textbf{A}: Area of the wall segment. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Expected_pressure_contribution}
    \item \textbf{V}: Volume of the container. Equations: \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}
    \item \textbf{N}: Number of gas molecules in the container. Equations: \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}
    \item \textbf{t}: Time of observation/collision time. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Expected_pressure_contribution}
    \item \textbf{$v^*$}: Magnitude of the velocity of the selected molecule. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Expected_pressure_contribution}
    \item \textbf{${\theta }^*$}: Polar angle of the velocity of the selected molecule. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Expected_pressure_contribution}
    \item \textbf{${\varphi }^*$}: Azimuthal angle of the velocity of the selected molecule. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Expected_pressure_contribution}
    \item \textbf{$v_z$}: z-component of velocity. Equations: None (mentioned in text)
    \item \textbf{m}: Mass of a molecule. Equations: \eqref{Pressure_contribution_single_molecule}, \eqref{Total_pressure_same_velocity}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}, \eqref{Lambda_definition}, \eqref{Maxwell_Boltzmann_equation}, \eqref{Probability_density}, \eqref{Boltzmann_factor}
    \item \textbf{$P_1(v^*)$}: Pressure contribution from a single molecule with velocity $v^*$. Equations: \eqref{Pressure_contribution_single_molecule}
    \item \textbf{$\rho(v^*, {\theta }^*, {\varphi }^*)$}: Velocity distribution function. Equations: \eqref{Velocity_distribution_fraction}
    \item \textbf{$d\theta$}: Differential polar angle. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}
    \item \textbf{$d\varphi$}: Differential azimuthal angle. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}
    \item \textbf{$dv$}: Differential velocity magnitude. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Maxwell_Boltzmann_equation}
    \item \textbf{dP}: Differential pressure contribution. Equations: \eqref{Differential_pressure_contribution}
    \item \textbf{P}: Total pressure. Equations: \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}
    \item \textbf{$\lambda$}: Parameter in velocity distribution. Equations: \eqref{Velocity_distribution_fraction}, \eqref{Differential_pressure_contribution}, \eqref{Total_pressure_integral}, \eqref{Pressure_Volume_product}, \eqref{Lambda_definition}
    \item \textbf{k}: Boltzmann constant. Equations: \eqref{Lambda_definition}, \eqref{Maxwell_Boltzmann_equation}, \eqref{Probability_density}, \eqref{Boltzmann_factor}
    \item \textbf{T}: Temperature. Equations: \eqref{Lambda_definition}, \eqref{Maxwell_Boltzmann_equation}, \eqref{Probability_density}, \eqref{Boltzmann_factor}
    \item \textbf{$f_v(v)$}: Velocity distribution function (1D). Equations: \eqref{Maxwell_Boltzmann_equation}
    \item \textbf{$\epsilon$}: Kinetic energy. Equations: \eqref{Boltzmann_factor}
\end{itemize}


\section{introduction}
Consider the collisions of gas molecules with a small portion of the wall of their container. Suppose that the wall is smooth, so that we can select a small and compact segment of it that is arbitrarily close to being planar. Denote both the segment of the wall and its area as $A$. $A$ can have any shape so long as it is a smooth, flat surface enclosed by a smooth curve.

Let the volume of the container be $V$ and the number of gas molecules in the container be $N$. We imagine that we follow the trajectory of one particular molecule as it moves to hit the wall somewhere within $A$. We begin our observations at time $t=0$ and suppose that the collision occurs at time $t$.

As sketched in Figure 3, we erect a Cartesian coordinate system with its origin at the location in space of the molecule at time $t=0$. We orient the axes of this coordinate system so that the $xy$-plane is parallel to the plane of $A$, and the z-axis is pointed toward the wall. Then the unit vector along the $z$-axis and a vector perpendicular to $A$ are parallel to one another. It is convenient to express the velocity of the selected molecule in spherical coordinates. We suppose that, referred to the Cartesian coordinate system we have erected, the velocity vector of the selected molecule is $\left(v^*,{\theta }^*,{\varphi }^*\right)$. The vector $\mathop{v^*}\limits^{\rightharpoonup}t$, drawn from the origin of our Cartesian system to the point of impact on the wall, follows the trajectory of the molecule from time zero to time $t$. The $z$-component of the molecular velocity vector is normal to the plane of $A$ at the point of impact; the magnitude of the $z$-component $v^*{\mathrm{cos} {\theta }^*\ }$. The perpendicular distance from the plane of \textit{A} to the $xy$-plane of the Cartesian system is $v^*t{\mathrm{cos} {\theta }^*\ }$.

We assume that the collision is perfectly elastic. Before collision, the velocity component perpendicular to the wall is $v_z=v^*{\mathrm{cos} {\theta }^*\ }$. Afterward, it is $v_z={-v}^*{\mathrm{cos} {\theta }^*\ }$. Only this change in the $v_z$ component contributes to the force on the wall within $A$. (The $v_x$ and $v_y$ components are not changed by the collision.) During the collision, the molecule's momentum change is ${-2mv}^*{\mathrm{cos} {\theta }^*\ }$. During our period of observation, the average force on the molecule is thus ${\left({-2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$. The force that the molecule exerts on the wall is ${\left({2mv}^*{\mathrm{cos} {\theta }^*\ }\right)}/{t}$, and hence the contribution that this particular collision---by one molecule traveling at velocity $v^*$---makes to the pressure on the wall is
\begin{equation}
\label{Pressure_contribution_single_molecule}
P_1\left(v^*\right)=\frac{2mv^* \cos {\theta }^*\ }{At}
\end{equation}

We want to find the pressure on segment $A$ of the wall that results from all possible impacts. To do so, we recognize that any other molecule whose velocity components are $v^*$, ${\theta }^*$, and ${\varphi }^*$, and whose location at time $t=0$ enables it to reach $A$ within time $t$, makes the same contribution to the pressure as the selected molecule does. Let us begin by assuming that the velocities of all \textit{N} of the molecules in the volume, $V$, are the same as that of the selected molecule. In this case, we can find the number of the molecules in the container that can reach $A$ within time $t$ by considering a tubular segment of the interior of the container. The long axis of this tube is parallel to the velocity vector of the selected molecule. The sides of this tube cut the container wall along the perimeter of $A$. This tube also cuts the $xy$-plane (the $z=0$ plane) of our coordinate system in such a way as to make an exact replica of $A$ in this plane. Call this replica $A^o$.

The area of $A^o$ is $A$; the plane of $A^o$ is parallel to the plane of $A$; and the perpendicular distance between the plane of $A$ and the plane of $A^o$ is $v^*t{\mathrm{cos} {\theta }^*\ }$. The volume of this tube is therefore ${Av}^*t{\mathrm{cos} {\theta }^*\ }$. Since there are ${N}/{V}$ molecules per unit volume, the total number of molecules in the tube is ${\left(ANv^*t{\mathrm{cos} {\theta }^*\ }\right)}/{V}$. When we assume that every molecule has velocity components $v^*$, ${\theta }^*$, and ${\varphi }^*$, all of the molecules in the tube reach $A$ within time $t$, because each of them travels parallel to the selected molecule, and each of them is initially at least as close to $A$ as is the selected molecule. Therefore, each molecule in the tube contributes $P_1\left(v^*\right)={2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ to the pressure at $A$. The total pressure is the pressure per molecule multiplied by the number of molecules:

\begin{equation}
\label{Total_pressure_same_velocity}
\left(\frac{2mv^* \cos {\theta }^*\ }{At}\right)\left(\frac{ANv^*t \cos {\theta }^*\ }{V}\right)=\frac{2mN \left(v^* \cos {\theta }^*\right)^2}{V}
\end{equation}

However, the molecular velocities are not all the same, and the pressure contribution ${2mN{\left(v^*{\mathrm{cos} {\theta }^*\ }\right)}^2}/{V}$ is made only by that fraction of the molecules whose velocity components lie in the intervals ${\theta }^*<\theta <{\theta }^*+d\theta$ and ${\varphi }^*<\varphi <{\varphi }^*+d\varphi$. This fraction is

\begin{equation}
\label{Velocity_distribution_fraction}
\rho \left(v^*,{\theta }^*,{\varphi }^*\right) \left(v^*\right)^2 \sin {\theta }^*dvd\theta d\varphi = \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right)\sin {\theta }^*dvd\theta d\varphi
\end{equation}

so that the pressure contribution from molecules whose velocity components lie in these ranges is obtained by multiplying Eq.~\ref{Total_pressure_same_velocity} by the fraction of molecules given by Eq.~\ref{Velocity_distribution_fraction}:
\begin{equation}
\label{Differential_pressure_contribution}
dP=\frac{2mN\left(v^* \cos {\theta }^* \right)^2}{V}\times \left(\frac{\lambda }{2\pi }\right)^{3/2} \left(v^*\right)^2\exp\left(\frac{-\lambda \left(v^*\right)^2}{2}\right) \sin {\theta }^*dvd\theta d\varphi
\end{equation}

The total pressure at $A$ is just the sum of the contributions from molecules with all possible combinations of velocities $v^*$, ${\theta }^*$, and ${\varphi }^*$. To find this sum, we integrate Eq.~\ref{Differential_pressure_contribution} over all possible velocity vectors. The allowed values of $v$ are $0\le v<\infty$. There are no constraints on the values of $\varphi$; we have $0\le \varphi <2\pi$. However, since all of the impacting molecules must have a velocity component in the positive \textit{z}-direction, the possible values of $\theta$ lie in the interval $0\le \theta <{\pi }/{2}$. We designate the velocity of the original molecule as $\left(v^*,{\theta }^*,{\varphi }^*\right)$ and retain this notation to be as specific as possible in describing the tube bounded by $A$ and $A^o$. However, the velocity components of an arbitrary molecule can have any of the allowed values. To integrate (See Appendix D) over the allowed values, we drop the superscripts. The pressure:on wall at $A$ becomes

\begin{multline}
\label{Total_pressure_integral}
P=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\times
\int^{\infty }_0 v^4\exp\left(\frac{-\lambda v^2}{2}\right)dv \int^{\pi /2}_0 \cos^2 \theta \ \sin \theta \  d\theta \int^{2\pi }_0 d\varphi
\\
=\frac{2mN}{V} \left(\frac{\lambda }{2\pi }\right)^{3/2}\left[ \frac{3}{8} \left(\frac{2}{\lambda }\right)^2 \left(\frac{2\pi }{\lambda }\right)^{1/2}\right]\left[\frac{1}{3}\right]\left[2\pi \right]=mN/V\lambda
\end{multline}
From Eq.~\ref{Total_pressure_integral}, the pressure–volume product becomes
\begin{equation}
\label{Pressure_Volume_product}
PV=\frac{mN}{\lambda }
\end{equation}

Since $m,$ $N$, and $\lambda$ are constants, this is Boyle's law. Equating Eq.~\ref{Pressure_Volume_product} to that given by the ideal gas equation, we have ${mN}/{\lambda }=NkT$ so that

\begin{equation}
\label{Lambda_definition}
\lambda =\frac{m}{kT}
\end{equation}

Finally, substituting Eq.~\ref{Lambda_definition} into the velocity distribution and normalizing, the \textbf{\textit{Maxwell-Boltzmann}} \textbf{\textit{equation}} becomes

\begin{equation}
\label{Maxwell_Boltzmann_equation}
\frac{df_v\left(v\right)}{dv}=4\pi \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right)
\end{equation}

and the probability density becomes

\begin{equation}
\label{Probability_density}
\rho \left(v,\theta ,\varphi \right)= \left(\frac{m}{2\pi kT}\right)^{3/2}v^2\exp\left(\frac{-mv^2}{2kT}\right)
\end{equation}

This derivation can be recast as a computation of the expected value of the pressurepressure:expected value. To do so, we rephrase our description of the system: A molecule whose velocity components are $\left(v^*,{\theta }^*,{\varphi }^*\right)$ creates a pressure ${2mv^*{\mathrm{cos} {\theta }^*\ }}/{At}$ on the area $A$ with a probability of $Av^*t\mathrm{cos} {\theta }^*/{V}$. (The latter term is the probability that a molecule, whose velocity is $\left(v^*,{\theta }^*,{\varphi }^*\right)$, is, at time $t=0$, in a location from which it can reach $A$ within time $t.$ If the molecule is to hit the wall within time $t$, at time $t=0$ the molecule must be within the tubular segment of volume is $Av^*t\mathrm{cos} {\theta }^*$. The probability that the molecule is within this tubular segment is equal to the fraction of the total volume that this segment occupies.) Therefore, the product
\begin{equation}
\label{Expected_pressure_contribution}
\left(\frac{2mv^*\cos {\theta }^*}{At}\right)\left(\frac{Av^*t \cos {\theta }^*}{V}\right)=\frac{2m}{V} \left(v^* \cos {\theta }^* \right)^2
\end{equation}
is the pressure contribution of a molecule with velocity $\left(v^*,{\theta }^*,{\varphi }^*\right)$, when ${\theta }^*$ is in the interval $0\le {\theta }^*<{\pi }/{2}$. The total pressure per molecule is the expected value of this pressure contribution; the expected value is the integral, over the entire volume of velocity space, of the pressure contribution times the probability density function for velocities.

It is useful to view the Maxwell-Boltzmann equation as the product of a term
\begin{equation}
\label{Boltzmann_factor}
\exp\left({-mv^2}/{2kT}\right)
\end{equation}

—called the \textbf{\textit{Boltzmann}} \textbf{\textit{factor}}—and a pre-exponential term that is proportional to the \textbf{\textit{number of ways}} that a molecule can have a given velocity, $v$. As seen in Eq.~\ref{Maxwell_Boltzmann_equation}, if there were no constraints on a molecule's speed, we would expect that the number of molecules with speeds between $v$ and $v+dv$ would increase as $v$ increases, because the probability that a molecule has a speed between $v$ and $v+dv$ is proportional to the volume in velocity space of a spherical shell of thickness $dv$. The volume of a spherical shell of thickness $dv$ is $4\pi v^2dv$, which increases as the square of $v$. However, the number of molecules with large values of $v$ is constrained by the conservation of energy. Since the total energy of a collection of molecules is limited, only a small proportion of the molecules can have very large velocities. The Boltzmann factor, shown in Eq.~\ref{Boltzmann_factor}, introduces this constraint. A molecule whose mass is m and whose scalar velocity is $v$ has kinetic energy $\epsilon ={mv^2}/{2}$. The Boltzmann factor is often written as $\exp\left({-\epsilon }/{kT}\right)$.

\end{document}

@bhpayne bhpayne changed the title derivation: Boyle's law, advanced derivation: Boyle's law, advanced; rewrite of chem.libretexts.org Jan 26, 2025
@bhpayne bhpayne self-assigned this Jan 26, 2025
@bhpayne bhpayne moved this to derivations backlog in allofphysics.com website Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: derivations backlog
Development

No branches or pull requests

1 participant