# Mathematics for Chemistry/Number theory

## Numbers

For more details on this topic, see Number Theory.

Real numbers come in several varieties and forms;

• Integers are whole numbers used for counting indivisible objects, together with negative equivalents and zero, e.g. 42, -7, 0
• Rational numbers can always be expressed as fractions, e.g. 4.673 = 4673/1000.
• Irrational numbers, unlike rational numbers, cannot be expressed as a fraction or as a definite decimal, e.g. ${\displaystyle \pi }$ and ${\displaystyle {\sqrt {2}}}$
• Natural numbers are integers that are greater than or equal to zero.

It is also worth noting that the imaginary unit and therefore complex numbers are used in chemistry, especially when dealing with equations concerning waves.

### Surds

The origin of surds goes back to the Greek philosophers. It is relatively simple to prove that the square root of 2 cannot be a ratio of two integers, no matter how large the integers may become. In a rather Pythonesque incident the inventor of this proof was put to death for heresy by the other philosophers because they could not believe such a pure number as the root of 2 could have this impure property.

(The original use of quadratic equations is very old, Babylon many centuries BC.) This was to allocate land to farmers in the same quantity as traditionally held after the great floods on the Tigris and Euphrates had reshaped the fields. The mathematical technology became used for the same purpose in the Nile delta.

When you do trigonometry later you will see that surds are in the trigonometric functions of the important symmetrical angles, e.g. ${\displaystyle \sin 60={\frac {\sqrt {3}}{2}}}$ and so they appear frequently in mathematical expressions regarding 3 dimensional space.

### Notation

The notation used for recording numbers in chemistry is the same as for other scientific disciplines, and appropriately called scientific notation, or standard form. It is a way of writing both very large and very small numbers in a shortened form compared to decimal notation. An example of a number written in scientific notation is

${\displaystyle 4.65\times 10^{6}}$

with 4.65 being a coefficient termed the significand or the mantissa, and 6 being an integer exponent. When written in decimal notation, the number becomes

${\displaystyle 4650000}$.

Numbers written in scientific notation are usually normalised, such that only one digit precedes the decimal point. This is to make order of magnitude comparisons easier, by simply comparing the exponents of two numbers written in scientific notation, but also to minimise transcription errors, as the decimal point has an assumed position after the first digit. In computing and on calculators, it is common for the ${\displaystyle \times 10}$ ("times ten to the power of") to be replaced with "E" (capital e). It is important not to confuse this "E" with the mathematical constant e.

Engineering notation is a special restriction of scientific notation where the exponent must be divisible by three. Therefore, engineering notation is not normalised, but can easily use SI prefixes for magnitude.

Remember that in SI, numbers do not have commas between the thousands, instead there are spaces, e.g. ${\displaystyle 18~617~132}$, (an integer) or ${\displaystyle 1.861~713~2{\rm {x}}10^{7}}$. Commas are used as decimal points in many countries.

### Exponents

Consider a number ${\displaystyle x^{n}}$, where ${\displaystyle x}$ is the base and ${\displaystyle n}$ is the exponent. This is generally read as “${\displaystyle x}$ to the ${\displaystyle n}$” or “${\displaystyle x}$ to the power of ${\displaystyle n}$”. If ${\displaystyle n=2}$ then it is common to say “${\displaystyle x}$ squared”, and if ${\displaystyle n=3}$ then “${\displaystyle x}$ cubed”. Comparing powers (exponentiation) to multiplication for positive integer values of n ${\displaystyle (n=1,2,3\dots )}$, it can be demonstrated that

${\displaystyle 4x=x+x+x+x}$, i.e. four lots of ${\displaystyle x}$ added together

${\displaystyle x^{4}=x\times x\times x\times x}$, i.e. ${\displaystyle x}$ multiplied by itself four times.

For ${\displaystyle x^{1}}$, the result is simply ${\displaystyle x}$. For ${\displaystyle x^{0}}$ the result is ${\displaystyle 1}$.

### Order of operations

When an expression contains different operations, they must be evaluated in a certain order. Exponents are evaluated first. Then, multiplication and division are evaluated from left to right. Last, addition and subtraction are evaluated left to right. Parentheses or brackets take precedence over all operations. Anything within parentheses must be calculated first. A common acronym used to remember the order of operations is PEMDAS, for "Parentheses, Exponents, Multiplication, Division, Addition, Subtraction". Another way to remember this acronym is "Please Excuse My Dear Aunt Sally".

Keep in mind that negation is usually considered multiplication. So in the case of ${\displaystyle -x^{2}}$, the exponent would be evaluated first, then negated, resulting in a negative number.

Take note of this example:

${\displaystyle 3+x\times 2}$, let x=5.

If evaluated incorrectly (left-to-right, with no order of operations), the result would be 16. Three plus five gives eight, times two is 16. The correct answer should be 13. Five times two gives ten, plus three gives 13. This is because multiplication is solved before addition.

## Partial fractions

Partial fractions are used in a few derivations in thermodynamics and they are good for practicing algebra and factorisation.

It is possible to express quotients in more than one way. Of practical use is that they can be collected into one term or generated as several terms by the method of partial fractions. Integration of a complex single term quotient is often difficult, whereas by splitting it up into a sum, a sum of standard integrals is obtained. This is the principal chemical application of partial fractions.

An example is

${\displaystyle {\frac {x-2}{(x+1)(x-1)}}={\frac {A(x-1)+B(x+1)}{(x+1)(x-1)}}={\frac {A}{(x+1)}}+{\frac {B}{(x-1)}}}$

In the above ${\displaystyle x-2}$ must equal ${\displaystyle A(x-1)+B(x+1)}$ since the denominators are equal. So we set ${\displaystyle x}$ first to +1 giving ${\displaystyle -1=2B}$. Therefore B = -1/2. If we set ${\displaystyle x=-1}$ instead ${\displaystyle -3=-2A}$, therefore ${\displaystyle A=3/2}$. So

${\displaystyle {\frac {x-2}{(x+1)(x-1)}}={\frac {3}{2(x+1)}}-{\frac {1}{2(x-1)}}}$

We can reverse this process by use of a common denominator.

${\displaystyle {\frac {3}{2(x+1)}}-{\frac {1}{2(x-1)}}={\frac {3(x-1)-(x+1)}{2(x+1)(x-1)}}}$

The numerator is ${\displaystyle 2x-4}$, so it becomes

${\displaystyle {\frac {(x-2)}{(x+1)(x-1)}}}$

which is what we started from.

So we can generate a single term by multiplying by the denominators to create a common denominator and then add up the numerator to simplify. A typical application might be to convert a term to partial fractions, do some calculus on the terms, and then regather into one quotient for display purposes. In a factorised single quotient it will be easier to see where numerators go to zero, giving solutions to ${\displaystyle f(x)=0}$, and where denominators go to zero giving infinities.

A typical example of a meaningful infinity in chemistry might be an expression such as

${\displaystyle {\frac {A}{{(E-E_{a})}^{2}}}}$

The variable is the energy E, so this function is small everywhere, except near ${\displaystyle E_{a}}$. Near ${\displaystyle E_{a}}$ a resonance occurs and the expression becomes infinite when the two energies are precisely the same. A molecule which can be electronically excited by light has several of these resonances.

Here is another example. If we had to integrate the following expression we would first convert to partial fractions:

${\displaystyle {\frac {3x}{2x^{2}-2x-4}}={\frac {3x}{2(x+1)(x-2)}}={\frac {A}{x+1}}+{\frac {B}{x-2}}}$

so

${\displaystyle {\frac {3}{2}}x=A(x-2)+B(x-1)}$

let ${\displaystyle x=2}$ then ${\displaystyle 3=B}$

let ${\displaystyle x=1}$ then ${\displaystyle {\frac {3}{2}}=-A}$

therefore the expression becomes

${\displaystyle {\frac {3}{x-2}}-{\frac {3}{2(x+1)}}}$

Later you will learn that these expressions integrate to give simple ${\displaystyle \ln }$ expressions.

### Problems

${\displaystyle {\rm {(1)~~~~~~}}{\frac {3}{x^{2}-1}}{~~~~~~~~~~~~{\rm {(2)~~~~~~}}}{\frac {4x-2}{x^{2}+2x}}}$

${\displaystyle {\rm {(3)~~~~~~}}{\frac {4}{(2x+1)(x-3)}}{~~~~~~~~~~~~{\rm {(4)~~~~~~}}}{\frac {7x+6}{x^{2}+3x+2}}}$

${\displaystyle {~~~~~~{\rm {(5)~~~~~~}}}{\frac {x+1}{2x^{2}-6x+4}}}$

${\displaystyle {~~~~~~{\rm {(1)~~~~~~}}}{\frac {3}{2(x-1)}}-{\frac {3}{2(x+1)}}{~~~~~~~~~~~~{\rm {(2)~~~~~~}}}{\frac {5}{(x+2)}}-{\frac {1}{x}}}$

${\displaystyle {~{\rm {(3)~~~~~~}}}{\frac {4}{7(x-3)}}-{\frac {8}{7(2x+1)}}{~~~~~~~~~~~~{\rm {(4)~~~~~~}}}{\frac {8}{x+2}}-{\frac {1}{x+1}}}$

${\displaystyle {~~{\rm {(5)~~~~~~}}}{\frac {3}{2(x-2)}}-{\frac {2}{2(x-1)}}}$

## Polynomial division

This is related to partial fractions in that its principal use is to facilitate integration.

Divide out

${\displaystyle {\frac {3x^{2}-4x-6}{1+x}}}$

like this

               3x  - 7
-----------------
x + 1  ) 3x2  -4x   -6
3x2  +3x
---------
0   -7x   -6
-7x   -7
--------
1


So our equation becomes ${\displaystyle 3x-7+{\frac {1}{1+x}}}$

This can be easily differentiated, and integrated. If this is differentiated with the quotient formula it is considerably harder to reduce to the the same form. The same procedure can be applied to partial fractions.

## Substitutions and expansions

You can see the value of changing the variable by simplifying

${\displaystyle {\frac {{\left({\frac {J(J+1)}{\epsilon }}\right)}^{3}+2{\left({\frac {J(J+1)}{\epsilon }}\right)}+1}{{\left({\frac {J(J+1)}{\epsilon }}\right)}^{2}-9}}-{\frac {{\left({\frac {J(J+1)}{\epsilon }}\right)}^{2}-2{\left({\frac {J(J+1)}{\epsilon }}\right)}+1}{{\left({\frac {J(J+1)}{\epsilon }}\right)}^{2}+9}}}$

to

${\displaystyle {\frac {x^{3}+2x+1}{x^{2}-9}}-{\frac {x^{2}-2x+1}{x^{2}+9}}}$

where

${\displaystyle x={\frac {J(J+1)}{\epsilon }}}$

This is an example of simplification. It would actually be possible to differentiate this with respect to either ${\displaystyle J}$ or ${\displaystyle \epsilon }$ using only the techniques you have been shown. The algebraic manipulation involves differentiation of a quotient and the chain rule.

Evaluating ${\displaystyle {\frac {{\rm {d}}y}{{\rm {d}}x}}}$ gives

${\displaystyle {\frac {3x^{2}+2}{x^{2}-9}}-2{\frac {(x^{3}+2x+1)x}{(x^{2}-9)^{2}}}-{\frac {2x-2}{x^{2}+9}}+2{\frac {(x^{2}-2x+1)x}{(x^{2}+9)^{2}}}}$

Expanding this out to the ${\displaystyle J}$s and ${\displaystyle \epsilon }$s would look ridiculous.

Substitutions like this are continually made for the purpose of having new, simpler expressions, to which the rules of calculus or identities are applied.