'''
Created on 01-Apr-2021
@author: rishi_priyansh
'''

import random
import inspect
import traceback
from sympy import (symbols, Symbol)
import os

from xv.km.util import latex_fraction, latex_atom
from .....helper import BaseHelper

from xv.km.managers import BaseManager
from xv.km.kelements import KProblemTemplate
        
class KineticTheoryManager(BaseManager):
    '''
    KineticTheoryManager
    Example:
        ke = KineticTheoryManager()
        ke.getRandomProblem()
        ke.getRandomProblem(problem_type = 0)
        ...
        
        ke.printProblem()
        ke.printAnswer()
        ke.printSolution()
        
        ke.printProblemTypes()
        
    '''    
    _OPR_TYPE_COUNT = 10
    
    def __new__(cls, *args, **kwargs):
        instance = super(KineticTheoryManager, cls).__new__(cls, *args, **kwargs)
        for base_class in KineticTheoryManager.__bases__:
            base_class.__init__(instance, *args, **kwargs)
        return instance
    
    def __init__(self, *args, **kwargs):
        pass



    def _init_problem_types(self, *args, **kwargs):
        self._append_problem_types([
            '_problem_2_62',
			'_problem_2_63',
			'_problem_2_64',
			'_problem_2_65',
			'_problem_2_66',
			'_problem_2_67',
			'_problem_2_68',
			'_problem_2_69',
			'_problem_2_70',
			'_problem_2_71',
            '_problem_2_72',
			'_problem_2_73',
			'_problem_2_74',
			'_problem_2_75',
            '_problem_2_76',
			'_problem_2_77',
			'_problem_2_78',
			'_problem_2_79',
			'_problem_2_80',
			'_problem_2_81',
			'_problem_2_82',
			'_problem_2_83',
			'_problem_2_84',
			'_problem_2_85',
			'_problem_2_86',
			'_problem_2_87',
			'_problem_2_88',
			'_problem_2_89',
			'_problem_2_90',
			'_problem_2_91',
			'_problem_2_92',
			'_problem_2_93',
			'_problem_2_94',
			'_problem_2_95',
			'_problem_2_96',
			'_problem_2_97',
			'_problem_2_98',
			'_problem_2_99',
			'_problem_2_100',
			'_problem_2_101',
			'_problem_2_102',
			'_problem_2_103',
			'_problem_2_104',
			'_problem_2_105',
			'_problem_2_106',
			'_problem_2_107',
			'_problem_2_108',
			'_problem_2_109',
			'_problem_2_110',
			'_problem_2_111',
			'_problem_2_112',
			])
        pass
            
    def _problem_2_62(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Modern vacuum pumps permit the pressures down to $p=4 \\cdot 10^{{-15}} \\mathrm{{~atm}}$ to be reached at room temperatures. Assuming that the gas exhausted is nitrogen, find the number of its molecules per $1 \\mathrm{{~cm}}^3$ and the mean distance between them at this pressure.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        From the formula $p=n k T$
        $\\begin{{aligned}}
        & n= \\frac{{p}}{{k T}}=\\frac{{4 \\times 10^{{-15}} \\times 1.01 \\times 10^5}}{{1.38 \\times 10^{{-23}} \\times 300}} \\text {{ per }} \\mathrm{{m}}^3 \\\\
        &=1 \\times 10^{{11}} \\text {{ per }} \\mathrm{{m}}^3=10^5 \\text {{ per c.c }}
        \\end{{aligned}}$
        Mean distance between molecules
        $\\left(10^{{-5}} \\text {{ c.c. }}\\right)^{{1 / 3}}=10^{{1 / 3}} \\times 10^{{-2}} \\mathrm{{~cm}}=0.2 \\mathrm{{~mm}} .$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_63(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A vessel of volume $V=5.0$ l contains $m=1.4 \\mathrm{{~g}}$ of nitrogen at a temperature $T=1800 \\mathrm{{~K}}$. Find the gas pressure, taking into account that $\\eta=30 \\%$ of molecules are disassociated into atoms at this temperature.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        After dissociation each $N_2$ molecule becomes two $N$-atoms and so contributes, $2 \\times 3$ degrees of freedom. Thus the number of moles becomes
        $\\displaystyle \\frac{{m}}{{M}}(1+\\eta) \\text {{ and }} p=\\frac{{m R T}}{{M V}}(1+\\eta)$
        Here $M$ is the molecular weight in grams of $N_2$.
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_64(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Under standard conditions the density of the helium and nitrogen mixture equals $\\rho=0.60 \\mathrm{{~g}} / \\mathrm{{l}}$. Find the concentration of helium atoms in the given mixture.

        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Let $n_1=$ number density of $\\mathrm{{He}}$ atoms, $n_2=$ number density of $N_2$ molecules Then
        $\\displaystyle \\rho=n_1 m_1+n_2 m_2$
        where $m_1=$ mass of $\\mathrm{{He}}$ atom, $m_2=$ mass of $N_2$ molecule also $p=\\left(n_1+n_2\\right) k T$ From these two equations we get
        $\\displaystyle n_1=\\left(\\frac{{p}}{{k T}}-\\frac{{\\rho}}{{m_2}}\\right) /\\left(1-\\frac{{m_1}}{{m_2}}\\right)$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_65(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A parallel beam of nitrogen molecules moving with velocity $v=400 \\mathrm{{~m}} / \\mathrm{{s}}$ impinges on a wall at an angle $\\theta=30^{{\\circ}}$ to its normal. The concentration of molecules in the beam $n=0.9 \\cdot 10^{{19}} \\mathrm{{~cm}}^{{-3}}$. Find the pressure exerted by the beam on the wall assuming the molecules to scatter in accordance with the perfectly elastic collision law.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{aligned}}
        p& =\\frac{{n v \\times 2 m v \\cos \\theta \\times d A \\cos \\theta}}{{d A}} \\\\
        & =2 m n v^2 \\cos ^2 \\theta
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_66(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        How many degrees of freedom have the gas molecules, if under standard conditions the gas density is $\\rho=1.3 \\mathrm{{mg}} / \\mathrm{{cm}}^3$ and the velocity of sound propagation in it is $v=330 \\mathrm{{~m}} / \\mathrm{{s}}$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        From the formula
        $\\displaystyle v=\\sqrt{{\\frac{{\\gamma \\rho}}{{\\rho}}}}, \\gamma=\\frac{{\\rho V^2}}{{p}}$
        If $i=$ number of degrees of freedom of the gas then
        $\\begin{{gathered}}
        C_p=C_V+R T \\text {{ and }} C_V=\\frac{{i}}{{2}} R T \\\\
        \\gamma=\\frac{{C_p}}{{C_v}}=1+\\frac{{2}}{{i}} \\text {{ or }} i=\\frac{{2}}{{\\gamma-1}}=\\frac{{2}}{{\\frac{{\\rho v^2}}{{p}}-1}}
        \\end{{gathered}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_67(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Determine the ratio of the sonic velocity $v$ in a gas to the root mean square velocity of molecules of this gas, if the molecules are
        (a) monatomic; 
        (b) rigid diatomic.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{aligned}}
        & v_{{\\text {{sound }}}}=\\sqrt{{\\frac{{\\gamma p}}{{\\rho}}}}=\\sqrt{{\\frac{{\\gamma R T}}{{M}}}}, \\text {{ and }} v_{{r m s}}=\\sqrt{{\\frac{{3 k T}}{{m}}}}=\\sqrt{{\\frac{{3 R T}}{{M}}}} \\\\
        & \\text {{ so, }} \\quad \\frac{{v_{{\\text {{sound }}}}}}{{v_{{\\text {{rms }}}}}}=\\sqrt{{\\frac{{\\gamma}}{{3}}}}=\\sqrt{{\\frac{{i+2}}{{3 i}}}}
        \\end{{aligned}}$
        (a) For monoatomic gases $i=3$
        $\\displaystyle \\frac{{v_{{\\text {{sound }}}}}}{{v_{{\\text {{rms }}}}}}=\\sqrt{{\\frac{{5}}{{9}}}}=0.75$
        (b) For rigid diatomic molecules $i=5$
        $\\displaystyle \\frac{{v_{{\\text {{sound }}}}}}{{v_{{\\text {{rms }}}}}}=\\sqrt{{\\frac{{7}}{{15}}}}=0.68$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_68(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A gas consisting of $N$-atomic molecules has the temperature $T$ at which all degrees of freedom (translational, rotational, and vibrational) are excited. Find the mean energy of molecules in such a gas. What fraction of this energy corresponds to that of translational motion?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        For a general noncollinear, nonplanar molecule mean energy $\\displaystyle =\\frac{{3}}{{2}} k T$ (translational) $\\displaystyle +\\frac{{3}}{{2}} k T$ (rotational) $\\displaystyle +(3 N-6) k T$ (vibrational) $=(3 N-3) k T$ per molecule
        For linear molecules, mean energy $\\displaystyle =\\frac{{3}}{{2}} k T$ (translational)
        $+k T$ (rotational) $+(3 N-5) k T$ (vibrational)
        $=\\left(3 N-\\frac{{5}}{{2}}\\right) k T$ per molecule
        Translational energy is a fraction $\\displaystyle \\frac{{1}}{{2(N-1)}}$ and $\\displaystyle \\frac{{1}}{{2 N-\\frac{{5}}{{3}}}}$ in the two cases.
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_69(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Suppose a gas is heated up to a temperature at which all degrees of freedom (translational, rotational, and vibrational) of its molecules are excited. Find the molar heat capacity of such a gas in the isochoric process, as well as the adiabatic exponent $\\gamma$, if the g as consists of
        (a) diatomic;
        (b) linear $N$-atomic;
        (c) network $N$-atomic molecules.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        (a) A diatomic molectile has 3 translational, 2 rotational and one vibrational degrees of freedom. The corresponding energy per mole is
        $\\begin{{gathered}}
        \\frac{{3}}{{2}} R T, \\text {{ (for translational) }}+2 \\times \\frac{{1}}{{2}} R T, \\text {{ (for rotational) }} \\\\
        +1 \\times R T, \\text {{ (for vibrational) }}=\\frac{{7}}{{2}} R T \\\\
        C_V=\\frac{{7}}{{2}} R, \\text {{ and }} \\gamma=\\frac{{C_p}}{{C_V}}=\\frac{{9}}{{7}}
        \\end{{gathered}}$
        Thus, $\\displaystyle C_V=\\frac{{7}}{{2}} R, \\text {{ and }} \\gamma=\\frac{{C_P}}{{C_V}}=\\frac{{9}}{{7}}$
        (b) For linear $N$ - atomic molecules energy per mole
        $\\displaystyle =\\left(3 N-\\frac{{5}}{{2}}\\right) R T \\text {{ as before }}$
        So, $\\displaystyle C_V=\\left(3 N-\\frac{{5}}{{2}}\\right) R \\text {{ and }} \\gamma=\\frac{{6 N-3}}{{6 N-5}}$
        (c) For noncollinzar $N$ - atomic molecules
        $\\displaystyle C_V=3(N-1) R$ as betore (2.68) $\\displaystyle \\gamma=\\frac{{3 N-2}}{{3 N-3}}=\\frac{{N-2 / 3}}{{N-1}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_70(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A horizontal cylinder closed from one end is rotated with a constant angular velocity $\\omega$ about a vertical axis passing through the open end of the cylinder. The outside air pressure is equal to $p_0$, the temperature to $T$, and the molar mass of air to $M$. Find the air pressure as a function of the distance $r$ from the rotation axis. The molar mass is assumed to be independent of $r$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        In the isobaric process, work done is
        $A=p d v=R d T \\text {{ per mole. }}$
        On the other hand heat transferred $Q=C_p d T$
        Now $C_p=(3 N-2) R$ for non-collinear molecules and $\\displaystyle C_p=\\left(3 N-\\frac{{3}}{{2}}\\right) R$ for linear molecules
        Thus $\\displaystyle \\frac{{A}}{{Q}}=\\left\\{{\\begin{{array}}{{l}}
        \\displaystyle \\frac{{1}}{{3 N-2}} \\text {{ non collinear }} \\\\
        \\displaystyle \\frac{{1}}{{3 N-\\frac{{3}}{{2}}}} \\text {{ linear }}
        \\end{{array}}\\right.$
        For monoatomic gascs, $\\displaystyle c_p=\\frac{{5}}{{2}}$ and $\\displaystyle \\frac{{A}}{{Q}}=\\frac{{2}}{{5}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_71(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Find the molar mass and the number of degrees of freedom of molecules in a gas if its heat capacities are known: $c_V=0.65 \\mathrm{{~J}} /(\\mathrm{{g}} \\cdot \\mathrm{{K}})$ and $c_D=0.91 \\mathrm{{~J}} /(\\mathrm{{g}} \\cdot \\mathrm{{K}})$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Given specific heats $c_p, c_v$ (per unit mass)
        $\\displaystyle M\\left(c_p-c_\\nu\\right)=R \\text {{ or, }} M=\\frac{{R}}{{c_p-c_\\nu}}$
        Also $\\displaystyle \\qquad \\gamma=\\frac{{c_p}}{{c_v}}=\\frac{{2}}{{i}}+1, \\text {{ os, }} i=\\frac{{2}}{{\\frac{{c_p}}{{c_v}} 1}}=\\frac{{2 c_v}}{{c_p-c_v}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_72(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Find the number of degrees of freedom of molecules in a gas whose molar heat capacity
        (a) at constant pressure is equal to $C_p=29 \\mathrm{{~J}} /(\\mathrm{{mol}} \\cdot \\mathrm{{K}})$;
        (b) is equal to $C=29 \\mathrm{{~J}} /(\\mathrm{{mol}} \\cdot \\mathrm{{K}})$ in the process $p T=$ const.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{aligned}}
        \\text{{(a)}} \\qquad & C_p=29 \\frac{{J}}{{{{ }}^{{\\circ}} \\mathrm{{K}} \\mathrm{{mole}}}}=\\frac{{29}}{{8 \\cdot 3}} \\mathrm{{R}} \\\\
        & C_v=\\frac{{20 \\cdot 7}}{{8 \\cdot 3}} R, \\gamma=\\frac{{29}}{{20 \\cdot 7}}=1 \\cdot 4=\\frac{{7}}{{5}} \\\\
        & i=5
        \\end{{aligned}}$
        (b) In the process $p T=$ const.
        $\\displaystyle \\frac{{T^2}}{{V}}=\\text {{ const, So }} 2 \\frac{{d T}}{{T}}-\\frac{{d V}}{{V}}=0$
        Thus $\\displaystyle \\qquad C d T=C_V d T+p d V=C_V d T+\\frac{{R \\tau^{{\\prime}}}}{{V}} d V=C_V d T+\\frac{{2 R T}}{{T}} d T$
        or $\\displaystyle \\qquad C=C_V+2 R=\\left(\\frac{{29}}{{8 \\cdot 3}}\\right) R \\quad$ So $\\displaystyle \\quad C_V=\\frac{{12 \\cdot 4}}{{8 \\cdot 3}} R=\\frac{{3}}{{2}} R$
        Hence $i=3$ (monoatomic)
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_73(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Find the adiabatic exponent $\\gamma$ for a mixture consisting of $v_1$ moles of a monatomic gas and $v_2$ moles of gas of rigid diatomic molecules.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Obviously
        $\\displaystyle \\frac{{1}}{{R}} C_V=\\frac{{3}}{{2}} \\gamma_1+\\frac{{5}}{{2}} \\gamma_2$
        (Since a monoatomic gas has $C_V=\\frac{{3}}{{2}} R$ and a diatomic gas has $C_V=\\frac{{5}}{{2}} R$. [The diatomic molecule is rigid so no vibration])
        $\\begin{{aligned}}
        \\frac{{1}}{{R}} C_p & =\\frac{{3}}{{2}} \\gamma_1+\\frac{{5}}{{2}} \\gamma_2+\\gamma_1+\\gamma_2 \\\\
        \\text{{Hence}} \\qquad \\gamma & =\\frac{{C_p}}{{C_V}}=\\frac{{5 \\gamma_1+7 \\gamma_2}}{{3 \\gamma_1+5 \\gamma_2}}
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_74(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A thermally insulated vessel with gaseous nitrogen at a temperature $t=27^{{\\circ}} \\mathrm{{C}}$ moves with velocity $v=100 \\mathrm{{~m}} / \\mathrm{{s}}$. How much (in per cent) and in what way will the gas pressure change on a sudden stoppage of the vessel?

        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        The internal energy of the molecules are
        $\\displaystyle U=\\frac{{1}}{{2}} m N\\left\\langle(\\vec{{u}}-\\vec{{v}})^2\\right\\rangle=\\frac{{1}}{{2}} m N\\left\\langle u^2-v^2\\right\\rangle$
        where $\\vec{{v}}=$ velocity of the vessel, $N=$ number of molecules, each of mass $m$. When the vessel is stopped, internal energy becomes $\\frac{{1}}{{2}} m N<\\left\\langle u^2\\right\\rangle$
        So there is an increase in internal energy of $\\Delta U=\\frac{{1}}{{2}} m N v^2$. This will give rise to a rise in temperature of
        $\\begin{{aligned}}
        \\Delta T & =\\frac{{\\frac{{1}}{{2}} m N v^2}}{{\\frac{{i}}{{2}} R}} \\\\
        & =\\frac{{m N v^2}}{{i R}}
        \\end{{aligned}}$
        there being no flow of heat. This change of temperature will lead to an excess pressure
        $\\begin{{aligned}}
        & \\Delta p=\\frac{{R \\Delta T}}{{V}}=\\frac{{m N v^2}}{{i V}} \\\\
        & \\frac{{\\Delta p}}{{p}}=\\frac{{M v^2}}{{i R T}}=2.2 \\%
        \\end{{aligned}}$
        where $M=$ molecular weight of $N_2, i=$ number of degrees of freedom of $N_2$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_75(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Calculate at the temperature $t=17^{{\\circ}} \\mathrm{{C}}$ :
        (a) the root mean square velocity and the mean kinetic energy of an oxygen molecule in the process of translational motion;
        (b) the root mean square velocity of a water droplet of diameter $d=0.10 \\mu \\mathrm{{m}}$ suspended in the air.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        (a) From the equipartition theorem
        $\\displaystyle \\bar{{\\varepsilon}}=\\frac{{3}}{{2}} k T=6 \\times 10^{{-21}} \\mathrm{{~J}} ; \\text {{ and }} v_{{r m s}}=\\sqrt{{\\frac{{3 k T}}{{m}}}}=\\sqrt{{\\frac{{3 R T}}{{M}}}}=0.47 \\mathrm{{~km}} / \\mathrm{{s}}$
        (b) In equilibrium the mean kinetic energy of the droplet will be equal to that of a molecule.
        $\\displaystyle \\frac{{1}}{{2}} \\frac{{\\pi}}{{6}} d^3 \\rho v_{{r m s}}^2=\\frac{{3}}{{2}} k T \\text {{ or }} v_{{r m s}}=3 \\sqrt{{\\frac{{2 k T}}{{\\pi d^3 \\rho}}}}=0.15 \\mathrm{{~m}} / \\mathrm{{s}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate

    def _problem_2_76(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A gas consisting of rigid diatomic molecules is expanded adiabatically. How many times has the gas to be expanded to reduce the root mean square velocity of the nolecules $\\eta=1.50$ times?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Here $\\displaystyle i=5, C_V=\\frac{{5}}{{2}} R, \\gamma=\\frac{{7}}{{5}}$ given
        $\\displaystyle v_{{r m s}}^{{\\prime}}=\\sqrt{{\\frac{{3 R T}}{{M}}}}=\\frac{{1}}{{\\eta}} v_{{r m s}}=\\frac{{1}}{{\\eta}} \\sqrt{{\\frac{{3 R T}}{{M}}}} \\text {{ or }} T=\\frac{{1}}{{\\eta^2 T}}$
        Now in an adiabatic process
        $\\begin{{aligned}}
        & T V^{{\\gamma-1}}=T V^{{2 / i}}=\\text {{ constant or }} V T^{{i / 2}}=\\text {{ constant }} \\\\
        & V^{{\\prime}}\\left(\\frac{{1}}{{\\eta^2}} T\\right)^{{i / 2}}=V T^{{i / 2}} \\text {{ or }} V^{{\\prime}} \\eta^{{-i}}=V \\text {{ or }} V^{{\\prime}}=\\eta^i V
        \\end{{aligned}}$
        The gas must be expanded $\\eta^i$ times, i.e 7.6 times.
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_77(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        The mass $m=15 \\mathrm{{~g}}$ of nitrogen is enclosed in a vessel at a temperature $T=300 \\mathrm{{~K}}$. What amount of heat has to be transferred to the gas to increase the root mean square velocity of its molecules $\\eta=2.0$ times?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Here $\\displaystyle \\quad C_V=\\frac{{5}}{{2}} \\frac{{m}}{{M}} R(i=5$ here $)$
        $m=$ mass of the gas, $M=$ molecular weight. If $v_{{r m s}}$ increases $\\eta$ times, the temperature will have increased $\\eta^2$ times. This will require (neglecting expansion of the vessels) a heat flow of amount
        $\\displaystyle \\frac{{5}}{{2}} \\frac{{m}}{{M}} R\\left(\\eta^2-1\\right) T=10 \\mathrm{{~kJ}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_78(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        The temperature of a gas consisting of rigid diatomic molecules is $T=300 \\\\mathrm{{{{~K}}}}$. Calculate the angular root mean square velocity of a rotating molecule if its moment of inertia is equal to $I=$ $=2.1 \\\\cdot 10^{{{{-39}}}} \\\\mathrm{{{{~g}}}} \\\\cdot \\\\mathrm{{{{cm}}}}^2$
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        The root mean square angular velocity is given by
        $\\begin{{aligned}}
        \\frac{{1}}{{2}} I \\omega^2 & =2 \\times \\frac{{1}}{{2}} k T(2 \\text {{ degrees of rotations }}) \\\\
        \\text{{or, }} \\qquad \\omega & =\\sqrt{{\\frac{{2 k T}}{{I}}}}=6.3 \\times 10^{{12}} \\mathrm{{rad}} / \\mathrm{{s}}
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_79(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A gas consisting of rigid diatomic molecules was initially under standard conditions. Then the gas was compressed adiabatically $\\eta=5.0$ times. Find the mean kinetic energy of a rotating molecule in the final state.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Under compression, the temperature will rise
        $\\displaystyle T V^{{\\gamma-1}}=\\text {{ constant, }} T V^{{2 / i}}=\\text {{ constant }}$
        or, $\\displaystyle \\quad T\\left(\\eta^{{-1}} V_0\\right)^{{2 / i}}=T_0 V_0^{{2 / i}}$ or, $T=\\eta^{{+2 / i}} T_0$
        So mean kinetic energy of rotation per molecule in the compressed state
        $\\displaystyle =k T^{{\\prime}}=k T_0 \\eta^{{2 / i}}=0.72 \\times 10^{{-20}} \\mathrm{{~J}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_80(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        How will the rate of collisions of rigid diatomic molecules against the vessel's wall change, if the gas is expanded adiabatically times?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        No. of collisions $\\displaystyle =\\frac{{1}}{{4}} n\\langle v\\rangle=v$
        Now, $\\displaystyle \\frac{{v^{{\\prime}}}}{{v}}=\\frac{{n^{{\\prime}}}}{{n}} \\frac{{\\left\\langle v^{{\\prime}}\\right\\rangle}}{{\\langle v\\rangle}}=\\frac{{1}}{{\\eta}} \\sqrt{{\\frac{{T}}{{T}}}}$
        (When the gas is expanded $\\eta$ times, $n$ decreases by a factor $\\eta$ ). Also $T^{{\\prime}}(\\eta V)^{{2 / i}}=T V^{{2 / i}}$ or $T=\\eta^{{2 / i}} T$ so, $\\frac{{v^{{\\prime}}}}{{v}}=\\frac{{1}}{{\\eta}} \\eta^{{-1 / i}}=\\eta^{{\\frac{{-i-1}}{{i}}}}$ i.e. collisions decrease by a factor $\\eta^{{\\frac{{i+1}}{{i}}}}, i=5$ here.
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_81(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        The volume of gas consisting of rigid diatomic molecules was increased $\\eta=2.0$ times in a polytropic process with the molar heat capacity $C=R$. How many times will the rate of collisions of molecules against a vessel's wall be reduced as a result of this process ?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        In a polytropic process $p V^n=$ constant, where $n$ is called the polytropic index. For this process
        $\\begin{{aligned}}
        p V^n= & \\text {{ constant or }} T V^{{n-1}}=\\text {{ constant }} \\\\
        & \\frac{{d T}}{{T}}+(n-1) \\frac{{d V}}{{V}}=0
        \\end{{aligned}}$
        Then $\\displaystyle d Q=C d T=d U+p d V=C_V d T+p d V$
        $\\displaystyle =\\frac{{i}}{{2}} R d T+\\frac{{R T}}{{V}} d V=\\frac{{i}}{{2}} R d T-\\frac{{1}}{{n-1}} R d T=\\left(\\frac{{i}}{{2}}-\\frac{{1}}{{n-1}}\\right) R d T$
        Now $\\displaystyle C=R \\text {{ so }} \\frac{{i}}{{2}}-\\frac{{1}}{{n-1}}=1$
        or, $\\displaystyle \\frac{{1}}{{n-1}}=\\frac{{i}}{{2}}-1=\\frac{{i-2}}{{2}} \\text {{ or }} n=\\frac{{i}}{{i-2}}$
        Now
        $\\begin{{gathered}}
        \\frac{{v^{{\\prime}}}}{{v}}=\\frac{{n^{{\\prime}}}}{{n}} \\frac{{\\left\\langle v^{{\\prime}}\\right\\rangle}}{{\\langle v\\rangle}}=\\frac{{1}}{{\\eta}} \\sqrt{{\\frac{{T}}{{T}}}}=\\frac{{1}}{{\\eta}}\\left(\\frac{{V}}{{V}}\\right)^{{\\frac{{n-1}}{{2}}}} \\\\
        =\\frac{{1}}{{\\eta}}\\left(\\frac{{1}}{{\\eta}}\\right)^{{\\frac{{1}}{{i-2}}}}=\\left(\\frac{{1}}{{\\eta}}\\right)^{{\\frac{{i-1}}{{i-2}}}}=\\eta^{{\\frac{{-i-1}}{{i-2}}}} \\text {{ times }}=\\frac{{1}}{{2.52}} \\text {{ times }}
        \\end{{gathered}}$

        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_82(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A gas consisting of rigid diatomic molecules was expanded in a polytropic process so that the rate of collisions of the molecules against the vessel's wall did not change. Find the molar heat capacity of the gas in this process.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        If $\\alpha$ is the polytropic index then
        $p V^\\alpha=\\text {{ constant, }} T V^{{\\alpha-1}}=\\text {{ constant. }}$
        Now $\\displaystyle \\qquad \\frac{{v^{{\\prime}}}}{{v}}=\\frac{{n^{{\\prime}}}}{{n}} \\frac{{\\left\\langle v^{{\\prime}}\\right\\rangle}}{{\\langle\\nu\\rangle}}=\\frac{{V}}{{V^{{\\prime}}}} \\sqrt{{\\frac{{T^{{\\prime}}}}{{T}}}}=\\frac{{V T^{{-1 / 2}}}}{{V^{{\\prime}} T^{{-1 / 2}}}}=1$
        Hence $\\displaystyle \\qquad \\frac{{1}}{{\\alpha-1}}=-\\frac{{1}}{{2}} \\text {{ or }} \\alpha=-1$
        Then $\\displaystyle \\qquad C=\\frac{{i R}}{{2}}+\\frac{{R}}{{2}}=3 R$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_83(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Calculate the most probable, the mean, and the root mean square velocities of a molecule of a gas whose density under standard atmospheric pressure is equal to $\\rho=1.00 \\mathrm{{~g}} / \\mathrm{{l}}$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{aligned}}
        & v_p=\\sqrt{{\\frac{{2 k T}}{{m}}}}=\\sqrt{{\\frac{{2 R T}}{{M}}}}=\\sqrt{{\\frac{{2 p}}{{\\rho}}}}=0.45 \\mathrm{{~km}} / \\mathrm{{s}}, \\\\
        & v_{{a v}}=\\sqrt{{\\frac{{8}}{{\\pi}} \\frac{{p}}{{\\rho}}}}=.51 \\mathrm{{~km}} / \\mathrm{{s}} \\text {{ and }} v_{{r m s}}=\\sqrt{{\\frac{{3 p}}{{\\rho}}}}=0.55 \\mathrm{{~km}} / \\mathrm{{s}}
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_84(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Find the fraction of gas molecules whose velocities differ by less than $\\delta \\eta=1.00 \\%$ from the value of
        (a) the most probable velocity;
        (b) the root mean square velocity.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        (a) The formula is
        $\\displaystyle d f(u)=\\frac{{4}}{{\\sqrt{{\\pi}}}} u^2 e^{{-u^2}} d u \\text {{, where }} u=\\frac{{v}}{{v_p}}$
        $\\begin{{aligned}}
        \\text {{ Now Prob }} & \\left(\\frac{{\\left|v-v_p\\right|}}{{v_p}}<\\delta \\eta\\right)=\\int_{{1-\\delta \\eta}}^{{1+\\delta \\eta}} d f(u) \\\\
        & =\\frac{{4}}{{\\sqrt{{\\pi}}}} e^{{-1}} \\times 2 \\delta \\eta=\\frac{{8}}{{\\sqrt{{\\pi}} e}} \\delta \\eta=0.0166
        \\end{{aligned}}$
        (b)
        $\\begin{{aligned}}
        =\\frac{{4}}{{\\sqrt{{\\pi}}}} e^{{-1}} \\times 2 \\delta \\eta & =\\frac{{8}}{{\\sqrt{{\\pi}} e}} \\delta \\eta=0.0166 \\\\
        \\operatorname{{Prob}}\\left(\\left|\\frac{{v-v_{{r m s}}}}{{v_{{r m s}}}}\\right|<\\delta \\eta\\right) & =\\operatorname{{Prob}}\\left(\\left|\\frac{{v}}{{v_p}}-\\frac{{v_{{r m s}}}}{{v_p}}\\right|<\\delta \\eta \\frac{{v_{{r m s}}}}{{v_p}}\\right) \\\\
        & =\\operatorname{{Prob}}\\left(\\left|u-\\sqrt{{\\frac{{3}}{{2}}}}\\right|<\\sqrt{{\\frac{{3}}{{2}}}} \\delta \\eta\\right) \\\\
        & \\sqrt{{\\frac{{3}}{{2}}}}+\\sqrt{{\\frac{{3}}{{2}}}} \\delta \\eta \\\\
        & =\\int \\frac{{4}}{{\\sqrt{{\\pi}}}} u^2 e^{{-u^2}} d u \\\\
        & \\sqrt{{\\frac{{3}}{{2}}}}-\\sqrt{{\\frac{{3}}{{2}}}} \\delta \\eta \\\\
        =\\frac{{4}}{{\\sqrt{{\\pi}}}} \\times \\frac{{3}}{{2}} e^{{-3 / 2}} \\times 2 & \\sqrt{{\\frac{{3}}{{2}}}} \\delta \\eta=\\frac{{12 \\sqrt{{3}}}}{{\\sqrt{{2 \\pi}}}} e^{{-3 / 2}} \\delta \\eta=0.0185
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_85(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Determine the gas temperature at which
        (a) the root mean square velocity of hydrogen molecules exceeds their most probable velocity by $\\Delta v=400 \\mathrm{{~m}} / \\mathrm{{s}}$;
        (b) the velocity distribution function $F(v)$ for the oxygen molecules will have the maximum value at the velocity $v=420 \\mathrm{{~m}} / \\mathrm{{s}}$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        (a)
        $\\begin{{aligned}}
        & v_{{r m s}}-v_p=(\\sqrt{{3}}-\\sqrt{{2}}) \\sqrt{{\\frac{{k T}}{{m}}}}=\\Delta v \\\\
        & T=\\frac{{m}}{{k}}\\left(\\frac{{\\Delta v}}{{(\\sqrt{{3}}-\\sqrt{{2}})}}\\right)^2 / \\mathrm{{K}}=384 \\mathrm{{~K}}
        \\end{{aligned}}$
        (b) Clearly $v$ is the most probable speed at this temperature. So
        $\\displaystyle \\sqrt{{\\frac{{2 k T}}{{m}}}}=v \\text {{ or }} T=\\frac{{m v^2}}{{2 k}}=342 \\mathrm{{~K}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate

    def _problem_2_86(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        In the case of gaseous nitrogen find:
        (a) the temperature at which the velocities of the molecules $v_1=$ $=300 \\mathrm{{~m}} / \\mathrm{{s}}$ and $v_2=600 \\mathrm{{~m}} / \\mathrm{{s}}$ are associated with equal values of the Maxwell distribution function $F(v)$;
        (b) the velocity of the molecules $v$ at which the value of the Maxwell distribution function $F(v)$ for the temperature $T_0$ will be the same as that for the temperature $\\eta$ times higher.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        (a) We have,
        $\\displaystyle \\frac{{v_1^2}}{{v_p^2}} e^{{-v_1^2 / v_p^2}}=\\frac{{v_2^2}}{{v_p^2}} e^{{-v_2^2 / v_p^2}} \\quad \\text {{ or }}\\left(\\frac{{v_1}}{{v_2}}\\right)^2=e^{{v_1^2-v_2^2 / v_p^2}} \\quad \\text {{ or }} \\quad v_p^2=\\frac{{2 k T}}{{m}}=\\frac{{v_1^2-v_2^2}}{{\\left(\\ln v_1^2 / v_2^2\\right)}}$
        So $\\displaystyle T=\\frac{{m\\left(v_1^2-v_2^2\\right)}}{{2 k \\ln \\frac{{v_1^2}}{{v_2^2}}}}=330 \\mathrm{{~K}}$
        (b) $\\displaystyle F(v)=\\frac{{4}}{{\\sqrt{{\\pi}}}} \\frac{{v^2}}{{v_p^2}} e^{{-v^2 / v_p^2}} \\times \\frac{{1}}{{v_p}}\\left(\\frac{{1}}{{v_p}}\\right.$ comes from $\\left.F(v) d v=d f(u), d u=\\frac{{d v}}{{v_p}}\\right)$
        Thus $\\displaystyle \\frac{{v^2}}{{v_{{p_1}}^3}} e^{{-v^2 / v_{{p_1}}^2}}=v^2 / v_{{p_2}} e^{{-v v_2 / v_2}} \\quad v_{{p_1}}^2=\\frac{{2 k T_0}}{{m}}, v_{{p_2}}^2=\\frac{{2 k T_0}}{{m}} \\eta$ now
        $\\begin{{aligned}}
        &&e^{{-\\frac{{m v^2}}{{2 k T_0}}\\left(1-\\frac{{1}}{{\\eta}}\\right)}} & =\\frac{{1}}{{\\eta^{{3 / 2}}}} \\text {{ or }} \\frac{{m v^2}}{{2 k T_0}}\\left(1-\\frac{{1}}{{\\eta}}\\right)=\\frac{{3}}{{2}} \\ln \\eta \\\\
        &\\text{{Thus }}&v & =\\sqrt{{\\frac{{3 k T_0}}{{m}}}} \\sqrt{{\\frac{{\\ln \\eta}}{{1-1 / \\eta}}}}
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_87(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        At what temperature of a nitrogen and oxygen mixture do the most probable velocities of nitrogen and oxygen molecules differ by $\\Delta v=30 \\mathrm{{~m}} / \\mathrm{{s}}$ ?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{gathered}}
        v_{{P N}}=\\sqrt{{\\frac{{2 k T}}{{m_N}}}}=\\sqrt{{\\frac{{2 R T}}{{M_N}}}}, \\quad v_{{P_0}}=\\sqrt{{\\frac{{2 R T}}{{M_0}}}} \\\\
        v_{{P_N}}-v_{{p_0}}=\\Delta v=\\sqrt{{\\frac{{2 R T}}{{M_N}}}}\\left(1-\\sqrt{{\\frac{{M_N}}{{M_0}}}}\\right) \\\\
        T=\\frac{{M_N(\\Delta v)^2}}{{2 R\\left(1-\\sqrt{{\\frac{{M_N}}{{M_0}}}}\\right)^2}}=\\frac{{m_N(\\Delta v)^2}}{{2 k\\left(1-\\sqrt{{\\frac{{m_N}}{{M_0}}}}\\right)^2}}=363 \\mathrm{{~K}}
        \\end{{gathered}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_88(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        The temperature of a hydrogen and helium mixture is $T=300 \\mathrm{{~K}}$. At what value of the molecular velocity $v$ will the Maxwell distribution function $F(v)$ yield the same magnitude for both gases?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\displaystyle \\frac{{v^2}}{{v_{{p_H}}^3}} e^{{-v^2 / v_{{p_H}}^2}}=\\frac{{v^2}}{{v_{{p_{{H e}}}}^3}} e^{{-v^2 / v_{{p_{{H e}}}}^2}}$ or $e^{{v^2\\left(\\frac{{m_{{H e}}}}{{2 t T}}-\\frac{{m_H}}{{2 \\pi T}}\\right)}}=\\left(\\frac{{m_{{H e}}}}{{m_H}}\\right)^{{3 / 2}}$
        $\\displaystyle v^2=3 k T \\frac{{\\ln m_{{H e}} / m_H}}{{m_{{H_e}}-m_H}}$, Putting the values we get $v=1.60 \\mathrm{{~km}} / \\mathrm{{s}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_89(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        At what temperature of a gas will the number of molecules, whose velocities fall within the given interval from $v$ to $v+d v$, be the greatest? The mass of each molecule is equal to $\\mathrm{{m}}$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\displaystyle d N(v)=\\frac{{N 4}}{{\\sqrt{{\\pi}}}} \\frac{{v^2 d v}}{{v_p^3}} e^{{-v^2 / v_p^2}}$
        For a given range $v$ to $v+d v$ (i.e. given $v$ and $d v$ ) this is maximum when
        $\\begin{{gathered}}
        \\frac{{\\delta}}{{\\delta v_p}} \\frac{{d N(v)}}{{N v^2 d v}}=0=\\left(-3 v_p^{{-4}}+\\frac{{2 v^2}}{{v_p^6}}\\right) e^{{-v^2 / v_p^2}} \\\\
        \\text{{or, }} \\qquad v^2=\\frac{{3}}{{2}} v_p^2=\\frac{{3 k T}}{{m}} . \\quad \\text {{ Thus }} T=\\frac{{1}}{{3}} \\frac{{m v^2}}{{k}}
        \\end{{gathered}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_90(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Find the fraction of molecules whose velocity projections on the $x$ axis fall within the interval from $v_x$ to $v_x+d v_x$, while the moduli of perpendicular velocity components fall within the interval from $v_{{\\perp}}$ to $v_{{\\perp}}+d v_{{\\perp}}$. The mass of each molecule is $m$, and the temperature is $\\bar{{T}}$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{aligned}}
        & d^3 v=2 \\pi v_{{\\perp}} d v_{{\\perp}} d v_x \\\\
        & \\text {{ Thus }} \\quad d n(v)=N\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{3 / 2}} e^{{-\\frac{{m}}{{2 k T}}}}\\left(v_x^2+v_{{\\perp}}^2\\right) d v_x 2 \\pi v_{{\\perp}} d v_{{\\perp}}
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_91(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Using the Maxwell distribution function, calculate the mean velocity projection $\\left\\langle v_x\\right\\rangle$ and the mean value of the modulus of this projection $\\left\\langle\\left|v_x\\right|\\right\\rangle$ if the mass of each molecule is equal to $m$ and the gas temperature is $T$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{aligned}}
        \\left\\langle v_x\\right\\rangle&=0 \\text {{ by symmetry }} \\\\
        \\left\\langle\\left|v_x\\right|\\right\\rangle&=\\int_{{-\\infty}}^{{\\infty}}\\left|v_x\\right| e^{{-\\frac{{m v_x^2}}{{2 k T}}}} d v_x / \\int_0^{{\\infty}} e^{{\\frac{{-m v_x^2}}{{2 k T}}}} d v_x=\\int_0^{{\\infty}} v_x e^{{\\frac{{-m v_x^2}}{{2 k T}}}} d v_x / \\int_0^{{\\infty}} e^{{\\frac{{-m v^2}}{{2 k T}}}} d v_x \\\\
        & =\\sqrt{{\\frac{{2 k T}}{{m}}}} \\int_0^{{\\infty}} u e^{{-u^2}} d u / \\int_0^{{\\infty}} e^{{-u^2}} d u \\\\
        & =\\sqrt{{\\frac{{2 k T}}{{m}}}} \\int_0^{{\\infty}} \\frac{{1}}{{2}} e^{{-x}} d x / \\int_0^{{\\infty}} e^{{-x}} \\frac{{d x}}{{2 \\sqrt{{x}}}} \\\\
        & =\\sqrt{{\\frac{{2 k T}}{{m}}}} \\Gamma(1) / \\Gamma\\left(\\frac{{1}}{{2}}\\right)=\\sqrt{{\\frac{{2 k T}}{{m \\pi}}}} \\\\
        \\end{{aligned}}$

        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_92(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        From the Maxwell distribution function find $\\left\\langle v_x^2\\right\\rangle$, the mean value of the squared $v_x$ projection of the molecular velocity in a gas at a temperature $T$. The mass of each molecule is equal to $m$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{aligned}}
        \\left\\langle v_x^2\\right\\rangle&=\\int_0^{{\\infty}} v_x^2 e^{{-\\frac{{m v_x^2}}{{2 k t}}}} d v_x / \\int_0^{{\\infty}} e^{{-\\frac{{m v_x^2}}{{2 k t}}}} d v_x \\\\
        &=\\frac{{2 k T}}{{m}} \\int_0^{{\\infty}} x e^{{-x}} \\frac{{d x}}{{2 \\sqrt{{x}}}} / \\int_0^{{\\infty}} e^{{-x}} \\frac{{d x}}{{2 \\sqrt{{x}}}} \\\\
        &=\\frac{{2 k T}}{{m}} \\Gamma\\left(\\frac{{3}}{{2}}\\right) / \\Gamma\\left(\\frac{{1}}{{2}}\\right)=\\frac{{k T}}{{m}}
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_93(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Making use of the Maxwell distribution function, calculate the number $v$ of gas molecules reaching a unit area of a wall per unit time, if the concentration of molecules is equal to $n$, the temperature to $T$, and the mass of each molecule is $m$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Here $v d A=$ No. of molecules hitting an area $d A$ of the wall per second
        $\\begin{{aligned}}
        & =\\int_0^{{\\infty}} d N\\left(v_x\\right) v_x d A \\\\
        \\text{{or, }} v&=\\int_0^{{\\infty}} n\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{1 / 2}} e^{{-\\frac{{m v_x^2}}{{2 k T}}}} v_x d v_x \\\\
        & =\\int_0^{{\\infty}} \\frac{{n}}{{\\sqrt{{\\pi}}}}\\left(\\frac{{2 k T}}{{m}}\\right)^{{1 / 2}} e^{{-u^2}} u d u \\\\
        & =\\frac{{1}}{{2}} n \\sqrt{{\\frac{{2 k T}}{{m \\pi}}}}=n \\sqrt{{\\frac{{k T}}{{2 m \\pi}}}}=\\frac{{1}}{{4}} n\\langle v\\rangle \\text {{, }} \\\\
        & \\left(\\text {{ where }}\\langle v\\rangle=\\sqrt{{\\frac{{8 k T}}{{m \\pi}}}}\\right) \\\\
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_94(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Using the Maxwell distribution function, determine the pressure exerted by gas on a wall, if the gas temperature is $T$ and the concentration of molecules is $n$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Let, $\\displaystyle d n\\left(v_x\\right)=n\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{1 / 2}} e^{{-m v_x^2 / 2 k T}} d v_x$ be the number of molecules per unit volume with $x$ component of velocity in the range $v_x$ to $v_x+d v_x$
        $\\begin{{aligned}}
        \\text {{Then }} \\qquad p & =\\int_0^{{\\infty}} 2 m v_x \\cdot v_x d n\\left(v_x\\right) \\\\
        & =\\int_0^{{\\infty}} 2 m v_x^2 n\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{1 / 2}} e^{{-m v_x^2 / 2 k T}} d v_x \\\\
        & =2 m n \\frac{{1}}{{\\sqrt{{\\pi}}}} \\frac{{2 k T}}{{m}} \\int_0^{{\\infty}} u^2 e^{{-u^2}} d u \\\\
        & =\\frac{{4}}{{\\sqrt{{\\pi}}}} n k T \\cdot \\int_0^{{\\infty}} x e^{{-x}} \\frac{{d x}}{{2 \\sqrt{{x}}}}=n k T
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_95(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Making use of the Maxwell distribution function, find $\\langle 1 / v\\rangle$, the mean value of the reciprocal of the velocity of molecules in an ideal gas at a temperature $T$, if the mass of each molecule is equal to $\\mathrm{{m}}$. Compare the value obtained with the reciprocal of the mean velocity.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{aligned}}
        \\left\\langle\\frac{{1}}{{v}}\\right\\rangle & =\\int_0^{{\\infty}}\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{3 / 2}} e^{{-\\frac{{m v^2}}{{2 k T}}}} 4 \\pi v^2 d v \\frac{{1}}{{v}} \\\\
        & =\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{3 / 2}} 4 \\pi \\frac{{1}}{{2}} \\frac{{2 k T}}{{m}} \\int_0^{{\\infty}} e^{{-x}} d x \\\\
        & =2\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{1 / 2}}=\\left(\\frac{{2 m}}{{\\pi k T}}\\right)^{{1 / 2}}=\\left(\\frac{{16}}{{\\pi^2}} \\frac{{m \\pi}}{{8 k T}}\\right)^{{1 / 2}}=\\frac{{4}}{{\\pi<v>}}
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate

    def _problem_2_96(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A gas consists of molecules of mass $m$ and is at a temperature $T$. Making use of the Maxwell velocity distribution function, find the corresponding distribution of the molecules over the kinetic energies $\\varepsilon$. Determine the most probable value of the kinetic energy $\\boldsymbol{{\\varepsilon}}_p$. Does $\\varepsilon_p$ correspond to the most probable velocity?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\displaystyle d N(v)=N\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{3 / 2}} e^{{-m v^2 / 2 k T}} 4 \\pi v^2 d v=d N(\\varepsilon)=\\frac{{d N(\\varepsilon)}}{{d \\varepsilon}} d \\varepsilon$ 
        or, $\\displaystyle \\quad \\frac{{d N(\\varepsilon)}}{{d \\varepsilon}}=N\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{3 / 2}} e^{{-m v^2 / 2 R T}} 4 \\pi v^2 \\frac{{d v}}{{d \\varepsilon}}$ 
        Now, $\\displaystyle \\varepsilon=\\frac{{1}}{{2}} m v^2 \\text {{ so }} \\frac{{d v}}{{d \\varepsilon}}=\\frac{{1}}{{m v}}$
        or, $\\displaystyle \\quad \\frac{{d N(\\varepsilon)}}{{d \\varepsilon}}=N\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{3 / 2}} e^{{-\\varepsilon / k T}} 4 \\pi \\sqrt{{\\frac{{2 \\varepsilon}}{{m}}}} \\frac{{1}}{{m}}$
        $\\displaystyle =N \\frac{{2}}{{\\sqrt{{\\pi}}}}(k T)^{{-3 / 2}} e^{{-\\varepsilon / k T}} \\varepsilon^{{1 / 2}}$
        i.e. $\\displaystyle \\quad d N(\\varepsilon)=N \\frac{{2}}{{\\sqrt{{\\pi}}}}(k T)^{{-3 / 2}} e^{{-\\varepsilon / k T}} \\varepsilon^{{1 / 2}} d \\varepsilon$
        The most probable kinetic energy is given from 
        $\\displaystyle \\frac{{d}}{{d \\varepsilon}} \\frac{{d N(\\varepsilon)}}{{d \\varepsilon}}=0$ or, $\\displaystyle \\frac{{1}}{{2}} \\varepsilon^{{-1 / 2}} e^{{-\\varepsilon / k T}}-\\frac{{\\varepsilon^{{1 / 2}}}}{{k T}} e^{{\\varepsilon / k T}}=0$ or $\\varepsilon=\\frac{{1}}{{2}} k T=\\varepsilon_{{p r}}$ 
        The corresponding velocity is $\\displaystyle v=\\sqrt{{\\frac{{k T}}{{m}}}} \\neq v_{{p r}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_97(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        What fraction of monatomic molecules of a gas in a thermal equilibrium possesses kinetic energies differing from the mean value by $\\delta \\eta=1.0 \\%$ and less?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        The mean kinetic energy is
        $\\displaystyle \\langle\\varepsilon\\rangle=\\int_0^{{\\infty}} \\varepsilon^{{3 / 2}} e^{{-\\varepsilon / k T}} d \\varepsilon / \\int_0^{{\\infty}} \\varepsilon^{{1 / 2}} e^{{-\\varepsilon / k T}} d \\varepsilon=k T \\frac{{\\Gamma(5 / 2)}}{{\\Gamma(3 / 2)}}=\\frac{{3}}{{2}} k T$
        Thus
        $\\begin{{aligned}}
        \\frac{{\\delta N}}{{N}} & =\\int_{{\\frac{{3}}{{2}} k T(1-\\delta \\eta)}}^{{\\frac{{3}}{{2}}(1+\\delta \\eta) k T}}(k T)^{{-3 / 2}} e^{{-\\varepsilon / k T}} \\varepsilon^{{1 / 2}} d \\varepsilon \\\\
        & =\\frac{{2}}{{\\sqrt{{\\pi}}}} e^{{-3 / 2}}\\left(\\frac{{3}}{{2}}\\right)^{{3 / 2}} 2 \\delta \\eta=3 \\sqrt{{\\frac{{6}}{{\\pi}}}} e^{{3 / 2}} \\delta \\eta
        \\end{{aligned}}$
        If $\\delta \\eta=1 \\%$ this gives $0.9 \\%$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_98(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        What fraction of molecules in a gas at a temperature $T$ has the kinetic energy of translational motion exceeding $\\varepsilon_0$ if $\\varepsilon_0 \\gg k T$ ?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\begin{{aligned}}
        \\frac{{\\Delta N}}{{N}}& =\\frac{{2}}{{\\sqrt{{\\pi}}}}(k T)^{{-3 / 2}} \\int_{{\\varepsilon_0}}^{{\\infty}} \\sqrt{{\\varepsilon}} e^{{-\\varepsilon / k T}} d \\varepsilon \\\\
        & \\approx \\frac{{2}}{{\\sqrt{{\\pi}}}}(k T)^{{-3 / 2}} \\sqrt{{\\varepsilon_0}} \\int_{{\\varepsilon_0}}^{{\\infty}} e^{{-\\varepsilon / k T}} d \\varepsilon\\left(\\varepsilon_0 \\gg k T\\right) \\\\
        & =\\frac{{2}}{{\\sqrt{{\\pi}}}}(k T)^{{-3 / 2}} \\sqrt{{\\varepsilon_0}} k T e^{{-\\varepsilon_0 / k T}}=2 \\sqrt{{\\frac{{\\varepsilon_0}}{{\\pi k T}}}} e^{{-\\varepsilon_0 / k T}}
        \\end{{aligned}}$
        (In evaluating the integral, we have taken out $\\sqrt{{\\varepsilon}}$ as $\\sqrt{{\\varepsilon_0}}$ since the integral is dominated by the lower limit.)
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_99(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        The velocity distribution of molecules in a beam coming out of a hole in a vessel is described by the function $F(v)=A v^3 \\mathrm{{e}}^{{-m v^2 / 2 k T}}$, where $T$ is the temperature of the gas in the vessel. Find the most probable values of
        (a) the velocity of the molecules in the beam; compare the result obtained with the most probable velocity of the molecules in the vessel;
        (b) the kinetic energy of the molecules in the beam.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        (a) $F(v)=A v^3 e^{{-m v^2 / 2 k T}}$
        For the most probable value of the velocity
        $\\displaystyle \\frac{{d F(v)}}{{d v}}=0 \\text {{ or }} 3 A v^2 e^{{-m v^2 / 2 k T}}-A v^3 \\frac{{2 m v}}{{2 k T}} e^{{-m v^2 / 2 k T}}=0$
        So, $\\displaystyle \\qquad v_{{p r}}=\\sqrt{{\\frac{{3 k T}}{{m}}}}$
        This should be compared with the value $\\displaystyle v_{{P r}}=\\sqrt{{\\frac{{2 k T}}{{m}}}}$ for the Maxwellian distribution.
        (b) In terms of energy, $\\varepsilon=\\frac{{1}}{{2}} m v^2$
        $\\begin{{gathered}}
        F(\\varepsilon)=A v^3 e^{{-m v^2 / 2 k T}} \\frac{{d v}}{{d \\varepsilon}} \\\\
        =A\\left(\\frac{{2 \\varepsilon}}{{m}}\\right)^{{3 / 2}} e^{{-\\varepsilon / k T}} \\frac{{1}}{{\\sqrt{{2 m \\varepsilon}}}}=A \\frac{{2 \\varepsilon}}{{m^2}} e^{{-\\varepsilon / k T}}
        \\end{{gathered}}$
        From this the probable energy comes out as follows : $F^{{\\prime}}(\\varepsilon)=0$ implies
        $\\displaystyle \\frac{{2 A}}{{m^2}}\\left(e^{{-\\alpha k T}}-\\frac{{\\varepsilon}}{{k T}} e^{{-\\varepsilon / k T}}\\right)=0, \\text {{ or, }} \\varepsilon_{{p r}}=k T$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_100(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        An ideal gas consisting of molecules of mass $m$ with concentration $n$ has a temperature $T$. Using the Maxwell distribution function, find the number of molecules reaching a unit area of a wall at the angles between $\\theta$ and $\\theta+d \\theta$ to its normal per unit time.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        The number of molecules reaching a unit area of wall at angle between $\\theta$ and $\\theta+d \\theta$ to its normal per unit time is
        $\\begin{{aligned}}
        d v&=\\int_{{v=0}}^{{v=\\infty}} d n(v) \\frac{{d \\Omega}}{{4 \\pi}} v \\cos \\theta \\\\
        &=\\int_0^{{\\infty}} n\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{3 / 2}} e^{{-m v^2 / 2 k T}} v^3 d v \\sin \\theta \\cos \\theta d \\theta \\times 2 \\pi \\\\
        &=n\\left(\\frac{{2 k T}}{{m \\pi}}\\right)_0^{{1 / 2}} e_0^{{\\infty}} x d x \\sin \\theta \\cos \\theta d \\theta=n\\left(\\frac{{2 k T}}{{m \\pi}}\\right)^{{1 / 2}} \\sin \\theta \\cos \\theta d \\theta
        \\end{{aligned}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_101(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        From the conditions of the foregoing problem find the number of molecules reaching a unit area of a wall with the velocities in the interval from $v$ to $v+d v$ per unit time.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Similarly the number of molecules reaching the wall (per unit area of the wall with velocities in the interval $v$ to $v+d v$ per unit time is
        $\\begin{{aligned}}
        d v&=\\int_{{\\theta=0}}^{{\\theta-\\pi / 2}} d n(v) \\frac{{d \\Omega}}{{4 \\pi}} v \\cos 0 \\\\
        &=\\int_{{\\theta-0}}^{{\\theta-\\pi / 2}} n\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{3 / 2}} e^{{-m v^2 / 2 k T}} v^3 d v \\sin \\theta \\cos \\theta d \\theta \\times 2 \\pi \\\\
        &=n \\pi\\left(\\frac{{m}}{{2 \\pi k T}}\\right)^{{3 / 2}} e^{{-m v^2 / 2 k T}} v^3 d v
        \\end{{aligned}}$

        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_102(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Find the force exerted on a particle by a uniform field if the concentrations of these particles at two levels separated by the distance $\\Delta h=3.0 \\mathrm{{~cm}}$ (along the field) differ by $\\eta=2.0$ times. The temperature of the system is equal to $T=280 \\mathrm{{~K}}$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        If the force exerted is $F$ then the law of variation of concentration with height reads 
        $\\displaystyle n(Z)=n_0 e^{{-F Z / k T}} \\quad$ So, $\\eta=e^{{F \\Delta h / k T}} \\quad$ or $\\displaystyle \\quad F=\\frac{{k T \\ln \\eta}}{{\\Delta h}}=9 \\times 10^{{-20}} \\mathrm{{~N}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_103(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        When examining the suspended gamboge droplets under a microscope, their average numbers in the layers separated by the distance $h=40 \\mu \\mathrm{{m}}$ were found to differ by $\\eta=2.0$ times. The environmental temperature is equal to $T=290 \\mathrm{{~K}}$. The diameter of the droplets is $d=0.40 \\mu \\mathrm{{m}}$, and their density exceeds that of the surrounding fluid by $\\Delta \\rho=0.20 \\mathrm{{~g}} / \\mathrm{{cm}}^3$. Find Avogadro's number from these data.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Here $\\displaystyle F=\\frac{{\\pi}}{{6}} d^3 \\Delta \\rho g=\\frac{{R T \\ln \\eta}}{{N_a h}}$ or $N_a=\\frac{{6 R T \\ln \\eta}}{{\\pi d^3 g \\Delta \\rho h}}$
        In the problem, $\\displaystyle \\frac{{\\eta}}{{\\eta_0}}=1.39$ here
        $T=290 \\mathrm{{~K}}, \\eta=2, h=4 \\times 10^{{-5}} \\mathrm{{~m}}, d=4 \\times 10^{{-7}} \\mathrm{{~m}}, g=9.8 \\mathrm{{~m}} / \\mathrm{{s}}^2, \\Delta \\rho=0.2 \\times 10^3 \\mathrm{{~kg}} / \\mathrm{{m}}^3$
        and $R=8 \\cdot 31 \\mathrm{{~J}} / \\mathrm{{k}}$
        Hence, $\\displaystyle \\quad N_a=\\frac{{6 \\times 8.31 \\times 290 \\times \\ln 2}}{{\\pi \\times 64 \\times 9.8200 \\times 4}} \\times 10^{{26}}=6.36 \\times 10^{{23}} \\mathrm{{~mole}}^{{-1}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_104(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Suppose that $\\eta_0$ is the ratio of the molecular concentration of hydrogen to that of nitrogen at the Earth's surface, while $\\eta$ is the corresponding ratio at the height $h=3000 \\mathrm{{~m}}$. Find the ratio $\\eta / \\eta_0$ at the temperature $T=280 \\mathrm{{~K}}$, assuming that the temperature and the free fall acceleration are independent of the height.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\displaystyle \\eta=\\frac{{\\text {{ concetration of }} H_2}}{{\\text {{ concentration of }} N_2}}=\\eta_0 \\frac{{e^{{-M_{{H_2}} g h / R T}}}}{{e^{{-M_{{N_2}}-g h / R T}}}}=\\eta_0 e^{{\\left(M_{{N_2}}-M_{{H_2}}\\right)}} g h / R T$
        So more $N_2$ at the bottom, $\\left(\\frac{{\\eta}}{{\\eta_0}}=1.39\\text{{ here}}\\right)$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_105(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A tall vertical vessel contains a gas composed of two kinds of molecules of masses $m_1$ and $m_2$, with $m_2>m_1$. The concentrations of these molecules at the bottom of the vessel are equal to $n_1$ and $n_2$ respectively, with $n_2>n_1$. Assuming the temperature $T$ and the free-fall acceleration $g$ to be independent of the height, find the height at which the concentrations of these kinds of molecules are equal.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $n_1(h)=n_1 e^{{-m_1 g h / k t}}, n_2(h)=n_2 e^{{-m_2 g h / k T}}$
        They are equal at a height $h$ where $\\displaystyle \\frac{{n_1}}{{n_2}}=e^{{g h\\left(m_1-m_2 y k T\\right.}}$
        $\\displaystyle \\text {{or }} h=\\frac{{k T}}{{g}} \\frac{{\\ln n_1-\\ln n_2}}{{m_1-m_2}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate

    def _problem_2_106(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A very tall vertical cylinder contains carbon dioxide at a certain temperature $T$. Assuming the gravitational field to be uniform, find how the gas pressure on the bottom of the vessel will change when the gas temperature increases $\\eta$ times.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        At a temperature $T$ the concentration $n(z)$ varies with height according to
        $\\displaystyle n(z)=n_0 e^{{-m g z / k T}}$
        This means that the cylinder contains $\\int_0^{{\\infty}} n(z) d z$
        $\\displaystyle =\\int_0^{{\\infty}} n_0 e^{{-m g z / k T}} d z=\\frac{{n_0 k T}}{{m g}}$
        particles per unit area of the base. Clearly this cannot change. Thus $n_0 k T=p_0=$ pressure at the bottom of the cylinder must not change with change of temperature.
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_107(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A very tall vertical cylinder contains a gas at a temperature $T$. Assuming the gravitational field to be uniform, find the mean value of the potential energy of the gas molecules. Does this value depend on whether the gas consists of one kind of molecules or of several kinds?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        $\\displaystyle \\langle U\\rangle=\\frac{{\\int_0^{{\\infty}} m g z e^{{-m g z / k t}} d z}}{{\\int_0^{{\\infty}} e^{{-m g z / k t}} d z}}=k T \\frac{{\\int_0^{{\\infty}} x e^{{-x}} d x}}{{\\int_0^{{\\infty}} e^{{-x}} d x}}=k T \\frac{{\\Gamma(2)}}{{\\Gamma(1)}}=k T$
        When there are many kinds of molecules, this formula holds for each kind and the average energy
        $\\displaystyle \\langle U\\rangle=\\frac{{\\sum f_i k T}}{{\\sum f_i}}=k T$
        where $f_i \\alpha$ fractional concentration of each kind at the ground level.
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_108(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A horizontal tube of length $l=100 \\mathrm{{~cm}}$ closed from both ends is displaced lengthwise with a constant acceleration $w$. The tube contains argon at a temperature $T=330 \\mathrm{{~K}}$. At . what value of $w$ will the argon concentrations at the tube's ends differ by $\\eta=1.0 \\%$ ?
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        The constant acceleration is equivalent to a pseudo force wherein a concentration gradient is set up. Then
        $\\begin{{gathered}}
        e^{{-M_A w L / R T}}=1-\\eta \\\\
        \\text {{or }} \\quad w=-\\frac{{R T \\ln (1-\\eta)}}{{M_A l}}=\\frac{{\\eta R T}}{{M_A l}}=70 \\mathrm{{~g}}
        \\end{{gathered}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_109(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        Find the mass of a mole of colloid particles if during their centrifuging with an angular velocity $\\omega$ about a vertical axis the concentration of the particles at the distance $r_2$ from the rotation axis is $\\eta$ times greater than that at the distance $r_1$ (in the same horizontal plane). The densities of the particles and the solvent are equal to $\\rho$ and to $\\rho_0$ respectively.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        In a centrifuge rotating with angular velocity $\\omega$ about an axis, there is a centrifugal acceleration $\\omega^2 r$ where $r$ is the radial distance from the axis. In a fluid if there are suspended colloidal particles they experience an additional force. If $m$ is the mass of each particle then its volume is $\\displaystyle \\frac{{m}}{{\\rho}}$ and the excess force on this particle is
        $\\displaystyle \\frac{{m}}{{\\rho}}\\left(\\rho-\\rho_0\\right) \\omega^2 r$ outward corresponding to a potential energy $\\displaystyle -\\frac{{m}}{{2 \\rho}}\\left(\\rho-\\rho_0\\right) \\omega^2 r^2$
        This gives rise to a concentration variation
        $\\displaystyle n(r)=n_0 \\exp \\left(+\\frac{{m}}{{2 \\rho k T}}\\left(\\rho-\\rho_0\\right) \\omega^2 r^2\\right)$
        Thus $\\displaystyle \\quad \\frac{{n\\left(r_2\\right)}}{{n\\left(r_1\\right)}}=\\eta=\\exp \\left(+\\frac{{M}}{{2 \\rho R T}}\\left(\\rho-\\rho_0\\right) \\omega^2\\left(r_2^2-r_1^2\\right)\\right)$
        where $\\displaystyle \\quad \\frac{{m}}{{k}}=\\frac{{M}}{{R}}, M=N_A m$ is the molecular weight
        Thus $\\displaystyle M=\\frac{{2 \\rho R T \\ln \\eta}}{{\\left(\\rho-\\rho_0\\right) \\omega^2\\left(r_2^2-r_1^2\\right)}}$
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_110(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        A horizontal tube with closed ends is rotated with a constant angular velocity $\\omega$ about a vertical axis passing through one of its ends. The tube contains carbon dioxide at a temperature $T=300 \\mathrm{{~K}}$. The length of the tube is $l=100 \\mathrm{{~cm}}$. Find the value $\\omega$ at which the ratio of molecular concentrations at the opposite ends of the tube is equal to $\\eta=2.0$.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        The potential energy associated with each molecule is : $\\displaystyle -\\frac{{1}}{{2}} m \\omega^2 r^2$ and there is a concentration variation
        $\\begin{{aligned}}
        & n(r)=n_0 \\exp \\left(\\frac{{m \\omega^2 r^2}}{{2 k T}}\\right)=n_0 \\exp \\left(\\frac{{M \\omega^2 r^2}}{{2 R T}}\\right) \\\\
        & \\eta=\\exp \\left(\\frac{{M \\omega^2 l^2}}{{2 R T}}\\right) \\text {{ or }} \\omega=\\sqrt{{\\frac{{2 R T}}{{M l^2}} \\ln \\eta}}
        \\end{{aligned}}$
        Using $\\displaystyle M=12+32=44 \\mathrm{{gm}}, l=100 \\mathrm{{~cm}}, R=8.31 \\times 10^7 \\frac{{\\mathrm{{erg}}}}{{{{ }}^{{\\circ}} \\mathrm{{K}}}}, T=300$, we get $\\omega=280$ radians per second.
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_111(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        The potential energy of gas molecules in a certain central field depends on the distance $r$ from the field's centre as $U(r)=a r^2$, where $a$ is a positive constant. The gas temperature is $T$, the concentration of molecules at the centre of the field is $n_0$. Find:
        (a) the number of molecules located at the distances between $r$ and $r+d r$ from the centre of the field;
        (b) the most probable distance separating the molecules from the centre of the field;
        (c) the fraction of molecules located in the spherical layer between $r$ and $r+d r$
        (d) how many times the concentration of molecules in the centre of the field will change if the temperature decreases $\\eta$ times.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Here $\\displaystyle n(r)=n_0 \\exp \\left(-\\frac{{a r^2}}{{k T}}\\right)$
        (a) The number of molecules located at the distance between $r$ and $r+d r$ is
        $\\displaystyle 4 \\pi r^2 d r n(r)=4 \\pi n_0 \\exp \\left(-\\frac{{a r^2}}{{k T}}\\right) r^2 d r$
        (b) $r_{{p r}}$ is given by $\\displaystyle \\frac{{d}}{{d r}} r^2 n(r)=0$ or, $\\displaystyle 2 r-\\frac{{2 a r^3}}{{k T}}=0$ or $\\displaystyle r_{{p r}}=\\sqrt{{\\frac{{k T}}{{a}}}}$
        (c) The fraction of molecules lying between $r$ and $r+d r$ is
        $\\begin{{aligned}}
        \\frac{{d N}}{{N}}& =\\frac{{4 \\pi r^2 d r n_0 \\exp \\left(-a r^2 / k T\\right)}}{{\\infty}} \\\\
        & \\int_0^{{\\infty}} 4 \\pi r^2 d r \\exp \\left(-\\frac{{a r^2}}{{k T}}\\right)=\\left(\\frac{{k T}}{{a}}\\right)^{{3 / 2}} 4 \\pi r^2 d r n_0 \\exp \\left(-a r^2 / k T\\right) \\\\
        &=\\left(\\frac{{k T}}{{a}}\\right)^{{3 / 2}} 2 \\pi \\Gamma\\left(\\frac{{3}}{{2}}\\right)=\\left(\\frac{{\\pi k T}}{{a}}\\right)^{{3 / 2}} \\exp (-x) \\\\
        \\frac{{d N}}{{N}}& =\\left(\\frac{{a}}{{\\pi k T}}\\right)^{{3 / 2}} 4 \\pi r^2 d r \\exp \\left(\\frac{{-a r^2}}{{k T}}\\right) \\\\
        \\text{{Thus }} \\quad d N& =N\\left(\\frac{{a}}{{\\pi k T}}\\right)^{{3 / 2}} 4 \\pi r^2 d r \\exp \\left(\\frac{{-a r^2}}{{k T}}\\right)
        \\end{{aligned}}$
        (d) $\\displaystyle d N =N\\left(\\frac{{a}}{{\\pi k T}}\\right)^{{3 / 2}} 4 \\pi r^2 d r \\exp \\left(\\frac{{-a r^2}}{{k T}}\\right)$
        So $\\displaystyle n(r)=N\\left(\\frac{{a}}{{\\pi k T}}\\right)^{{1 / 2}} \\exp \\left(\\frac{{-a r^2}}{{k T}}\\right)$
        When $T$ decreases $\\eta$ times $n(0)=n_0$ will increase $\\eta^{{3 / 2}}$ times.

        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _problem_2_112(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        From the conditions of the foregoing problem find:
        (a) the number of molecules whose potential energy lies within the interval from $U$ to $U+d U$
        (b) the most probable value of the potential energy of a molecule; compare this value with the potential energy of a molecule located at its most probable distance from the centre of the field.
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        Write $\\displaystyle U=a r^2$ or $r=\\sqrt{{\\frac{{U}}{{a}}}}$, so $\\displaystyle d r=\\sqrt{{\\frac{{1}}{{a}}}} \\frac{{d U}}{{2 \\sqrt{{U}}}}=\\frac{{d U}}{{2 \\sqrt{{a U}}}}$
        so $\\displaystyle d N=n_0 4 \\pi \\frac{{U}}{{a}} \\frac{{d U}}{{2 \\sqrt{{a U}}}} \\exp \\left(\\frac{{U}}{{k T}}\\right)$
        $\\displaystyle =2 \\pi n_0 a^{{-3 / 2}} U^{{1 / 2}} \\exp \\left(\\frac{{-U}}{{k T}}\\right) d U$
        The most probable value of $U$ is given by
        $\\displaystyle \\frac{{d}}{{d U}}\\left(\\frac{{d N}}{{d U}}\\right)=0=\\left(\\frac{{1}}{{2 \\sqrt{{u}}}}-\\frac{{U^{{1 / 2}}}}{{k T}}\\right) \\exp \\left(\\frac{{-U}}{{k T}}\\right) \\quad \\text {{ or, }} \\quad U_{{p r}}=\\frac{{1}}{{2}} k T$
        From 2.111 (b), the potential energy at the most probable distance is $k T$.
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _sample(self, *args, **kwargs):
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')

        problem_s = f"""
        """
        problemTemplate.add_problem(problem_s.strip(), 'text/html')
        
        soln_s = f"""
        """
        problemTemplate.add_solution(soln_s.strip(), 'text/html')
        
        answer_s = f"""
        """
        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        return problemTemplate
    
    def _init_file_path(self, file_name):
        import pathlib
        from xv.util import locatePath
        rootFolder = pathlib.Path(__file__).parent.absolute()
        file_path = locatePath(file_name, 
                               parent_depth = 6,
                               rootFolder = rootFolder,
                               part_match = False,
                               search_type = 'file',
                               verbose = self.verbose,
                               )
        return os.path.join(rootFolder, file_path)
    
