# Mathematics for Chemistry/Some Mathematical Examples applied to Chemistry
## Variable names

The ubiquitous $x$ is not always the variable as you will all know by now. One problem dealing with real applications is sorting out which symbols are the variables and which are constants. (If you look very carefully at professionally set equations in text books you should find that there are rules that constants are set in Roman type, i.e. straight letters and variables in italics. Do not rely on this as it is often ignored.)
Here are some examples where the variable is conventionally something other than $x$.
* The Euler angles which are used in rotation are conventionally $\alpha ,\beta$ and $\gamma$ not the more usual angle names $\theta$ and $\phi$. The rotation matrix for the final twist in the commonest Euler definition therefore looks like ${\begin{bmatrix}\cos(\gamma )&\sin(\gamma )&0\\-\sin(\gamma )&\cos(\gamma )&0\\0&0&1\\\end{bmatrix}}$
* The energy transitions in the hydrogen atom which give the Balmer series are given by the formula ${\tilde {\nu }}={\rm {R_{H}}}\left({\frac {1}{2^{2}}}-{\frac {1}{n^{2}}}\right)$ ${\tilde {\nu }}$ is just a single variable for the energy the tilde being a convention used by spectroscopists to say it is wavenumbers, (cm$^{-1}$). The H subscript on ${\rm {R_{H}}}$ has no mathematical meaning. It is the Rydberg constant and is therefore in Roman type. ${\rm {R_{H}}}$ is known very accurately as 109,677.581 cm$^{-1}$. It has actually been known for a substantial fraction of the class to make an error putting this fraction over a common denominator in examination conditions.
* In the theory of light $\omega$ is used for frequency and $t$ not surprisingly for time. Light is an oscillating electric and magnetic field therefore the cosine function is a very good way of describing it. You can also see here the use of complex numbers. Using the real axis of the Argand diagram for the electric field and the imaginary axis for the magnetic field is a very natural description mathematically and maps ideally onto the physical reality. Here we are integrating with respect to $t$ and $\omega$, the operating frequency if it is a laser experiment is a constant, therefore it appears on the denominator in the integration. $\int \cos(\omega t)\sin(\omega t)dt=-{\frac {\cos(\omega )^{2}}{2\,\omega }}+c$ In this case we can see a physical interpretation for the integration constant. It will be a phase factor. If we were dealing with sunlight we might well be integrating a different function over $\omega$ in order to calculate all of the phenomenon which has different strengths at the different light frequencies. Our integration limits would either be from zero to infinity or perhaps over the range of energies which correspond to visible light.
* This example is a laser experiment called Second Harmonic Generation. There is an electric field $F$, frequency $\nu$ and a property constant $\chi _{(2)}$. $\epsilon _{0}$ is a fundamental constant. We have an intense monochromatic laser field fluctuating at the frequency $\nu$, (i.e. a strong light beam from a big laser). $F_{v}\sin(2\pi \nu t)$ Therefore the $F^{2}$ term contributes $\epsilon _{0}\chi _{(2)}F_{v}^{2}\sin ^{2}(2\pi \nu t)$ to the polarization. We know from trigonometric identities that $\sin ^{2}$ can be represented as a cosine of the double angle $\cos(2\theta )=1-2\sin ^{2}\theta$ Therefore the polarization is ${\frac {1}{2}}\epsilon _{0}\chi _{(2)}F_{v}^{2}(1-\cos 4\pi \nu t)$ In this forest of subscripts and Greek letters the important point is that there are two terms contributing to the output coming from $(1-\cos 4\pi \nu t)$ which multiplies the rest of the stuff. In summary we have $A\sin ^{2}(t)$ is equal to $B(1-\cos(2t))$ where everything except the trig(t) and trig(2t) are to some extent unimportant for the phenomenon of doubling the frequency. $\sin$ and $\cos$ differ only in a phase shift so they represent the same physical phenomenon, i.e. light, which has phase. (One of the important properties of laser light is that it is coherent, i.e. it all has the same phase. This is fundamentally embedded in our mathematics.)

## van der Waals Energy

The van der Waals energy between two inert gas atoms can be written simply as a function of $r$
$E_{vdw}={\frac {\rm {A}}{r^{12}}}-{\frac {\rm {B}}{r^{6}}}$
Notice that the $r^{12}$ term is positive corresponding to repulsion. The $r^{6}$ term is the attractive term and is negative corresponding to a reduction in energy. A and B are constants fitted to experimental numbers.
This function is very easy to both differentiate and integrate. Work these out. In a gas simulation you would use the derivative to calculate the forces on the atoms and would integrate Newton's equations to find out where the atoms will be next.
Another potential which is used is:
$E_{vdw}={\rm {A}}e^{-{\rm {B}}r}-{\rm {C}}r^{-6}$
This has 1 more fittable constant. Integrate and differentiate this.
The ${\frac {\rm {A}}{r^{12}}}-{\frac {\rm {B}}{r^{6}}}$ is called a Lennard-Jones potential and is often expressed using the 2 parameters of an energy $\epsilon$ and a distance $\sigma$.
$E(r)=4\epsilon \left({{\left({\frac {\sigma }{r}}\right)}^{12}-{\left({\frac {\sigma }{r}}\right)}^{6}}\right)$
$\epsilon$ is an energy. Set the derivative of this to zero and find out where the van der Waals minimum is. Differentiate again and show that the derivative is positive, therefore the well is a minimum, not a turning point.

## A diatomic potential energy surface

In a diatomic molecule the energy is expanded as the bond stretches in a polynomial. We set $x=(r-r_{0})$. At $r_{0}$ the function is a minimum so there is no $dE/dx$ term.
$E={\frac {1}{2}}k_{harm.}{\frac {{\rm {d}}^{2}E}{{\rm {d}}x^{2}}}+{\frac {1}{6}}k_{anharm.}{\frac {{\rm {d}}^{3}E}{{\rm {d}}x^{3}}}$
Whatever function is chosen to provide the energy setting the 1st derivative to zero will be required to calculate $r_{0}$. The 2nd and 3rd derivatives will then need to be evaluated to give the shape of the potential and hence the infra-red spectrum. $E$ is usually modelled by a very complicated function whose differentiation is not entered into lightly.

## A one-dimensional metal

A one-dimensional metal is modelled by an infinite chain of atoms 150 picometres apart. If the metal is lithium each nucleus has charge 3 and its electrons are modelled by the function
$cos^{2}\left\{{\frac {\pi }{2}}{\frac {r}{150}}\right\}$
which repeats every 150 pm. What constant must this function be multiplied by to ensure there are 3 electrons on each atom? (Hint... integrate $cos^{2}$ between either $-{\frac {\pi }{2}}$ and $+{\frac {\pi }{2}}$ or -75pm and +75pm according to your equation. This integral is a dimensionless number equal to the number of electrons, so we will have to multiply by a normalisation constant.)
Here we have modelled the density of electrons. Later in the second year you will see electronic structure more accurately described by functions for each independent electron called orbitals. These are subject to rigorous mathematical requirements which means they are quite fun to calculate.

## Kepler's Laws

Another physics problem but a good example of a log-log plot is the radius and time period relations of the planets.
This data is dimensionless because we have divided by the time / distance of the earth. We can take logs of both.
| | Mercury | Venus | Earth | Mars | Jupiter | Saturn |
| r | 0.3871 | 0.7233 | 1 | 1.524 | 5.203 | 9.539 |
| T | 0.2408 | 0.6152 | 1 | 1.881 | 11.86 | 29.46 |
| | Mercury | Venus | Earth | Mars | Jupiter | Saturn |
| log$_{10}$r | -0.4122 | | 0 | | | 0.9795 |
| log$_{10}$T | -0.6184 | | 0 | | | 1.4692 |
Try a least squares fit on your spreadsheet program. Using the Earth and Saturn data: (which is extremely bad laboratory practice, to usejust two points from a data set!)
$\Delta ({\log }T)/\Delta ({\log }r)=1.5000359$
so ${\log }T=1.5{\log }r={\log }r^{1.5}$
so $T=r^{3/2}$ and $T^{2}=r^{3}$
This is Kepler's 3rd law. If you use either a least squares fit gradient or the mercury to saturn data you get the same powers. We have got away with not using a full data set because the numbers given are unusually accurate and to some extent tautological, (remember the planets go round in ellipses not circles!).

## Newton's law of cooling

$\theta$ is the excess temperature of a cooling body over room temperature (20$^o$C say). The rate of cooling is proportional to the excess temperature.
$-{\frac {{\rm {d}}\theta }{{\rm {d}}t}}=k\theta$
${\rm {using~~~~~}}{\frac {{\rm {d}}x}{{\rm {d}}y}}={\frac {1}{\frac {{\rm {d}}y}{{\rm {d}}x}}}$
${\frac {{\rm {d}}t}{{\rm {d}}\theta }}=-{\frac {1}{k\theta }}$
This is a differential equation which we integrate with respect to $\theta$ to get
$t=-{\frac {1}{k}}\ln \theta +c$
The water is heated to $80^{o}$C and room temperature is $20^{o}$C. At the beginning $t=0$ and $\theta =60$, so
$0=-{\frac {1}{k}}\ln 60+c$
therefore
$c={\frac {\ln 60}{k}}$
$t=-{\frac {1}{k}}\ln \theta +{\frac {1}{k}}\ln 60$
but $\ln 60-\ln \theta =-\ln {\frac {\theta }{60}}$
so $\ln {\frac {\theta }{60}}=-kt$
After 5 minutes the water has cooled to $70^{o}$C.
so $\ln {\frac {50}{60}}=-5k$ so $k=-{\frac {1}{5}}\ln {\frac {5}{6}}={\frac {1}{5}}\ln {\frac {6}{5}}<math>.So<math>k=0.0365$
$\ln {\frac {\theta }{60}}=-0.0365t$
${\frac {\theta }{60}}=e^{-0.0365t}$
by the definition of logarithms. This gives the plot of an exponential decay between 80 and 20$^o$C.
So after 10 minutes $t=20+60e^{-0.365}=61.6^{o}$C. After 20 minutes $t=20+60e^{-0.73}=49.9^{o}$C. After 30 minutes $t=20+60e^{-1.10}=40.1^{o}$C.

## Bacterial Growth

2 grams of an organism grows by 1/10 gram per day per gram.
${\frac {{\rm {d}}m}{{\rm {d}}t}}={\frac {m}{10}}$
This is a differential equation which is solved by integration thus
$\int {\frac {10}{m}}{\rm {d}}m=\int {{\rm {d}}t}$
$10\ln m=t+c$
$\ln m={\frac {t}{10}}+c$
therefore
$m=e^{c}e^{\frac {t}{10}}$
When $t=0$ we have 2 grams so
$m=2e^{t/10}$
For the sample to double in mass
$4=2e^{t/10}$
$2=e^{t/10}$
$\ln 2={\frac {t}{10}}$
$t=10\ln 2=6.9315{\rm {days}}$
Half life calculations are similar but the exponent is negative.

## Partial fractions for the 2nd order rate equation

In chemistry work you will probably be doing the 2nd order rate equation which requires partial fractions in order to do the integrals.
If you remember we have something like
${\frac {1}{(2-x)(3-x)}}={\frac {A}{(2-x)}}+{\frac {B}{(3-x)}}$
Put the right-hand side over a common denominator
${\frac {1}{(2-x)(3-x)}}={\frac {A(3-x)+B(2-x)}{(2-x)(3-x)}}$
This gives $1=3A-Ax+2B-Bx$
By setting x to 3 we get 1 = -B (B=-1). Setting x = 0 and B = -1
Therefore
$\int {\frac {1}{(2-x)(3-x)}}dx=\int {\frac {1}{(2-x)}}-\int {\frac {1}{(3-x)}}dx=\ln(2-x)+\ln(3-x)+c$
noting the sign changes on integrating 1/(2-x) not 1/x.