This material has been adapted from material by Fergus Cooper from the "Essential Mathematics" module of the SABS R³ Center for Doctoral Training.
This course material was developed as part of UNIVERSE-HPC, which is funded through the SPF ExCALIBUR programme under grant number EP/W035731/1
Indices, logs and exponentials
YouTube lecture recording from October 2020
The following YouTube video was recorded for the 2020 iteration of the course.
The material is still very similar:
Indices
In mathematics, an index refers to the power to which a number (the base) is raised.
The index is usually written as a small number above and to the right of the base.
For example, in the expression 23, 2 is the base, and 3 is the index or power.
This expression is read as "2 to the power of 3" or simply "2 cubed", and it equals 2×2×2=8.
(1) Multiplication of expressions with powers
Let's recap by example:
52=5×5=25,
and
53=5×5×5=125.
Now,
55=5×5×5×5×5=3125
and
25×125=3125.
So,
55=52×53.
And, by extension:
am×an=am+n.
When we multiply two expressions with powers, we add the powers.
(2) Division of expressions with powers
Again, let's look at an example:
5253=5×55×5×5
We can cancel both fives on the bottom with two from the top, leaving just 5, or, 51 left.
Generalising, by extension:
aman=an−m
When we divide two expressions with powers, we subtract the powers.
(3) Powers of expressions with powers
Back to our example:
(53)4=53×53×53×53=244140625
Using the addition rule from above, the resulting power should be 3+3+3+3=12.
And, sure enough:
512=244140625.
So, generalising again:
(an)m=anm
When we raise an expression containing a power to another power, we multiply the powers.
(4) Negative powers
What happens when we divide indices, but there are more numbers on the bottom of the fraction?
a5a3=a×a×a×a×aa×a×a=a×a1=a21
Using the division rule above, the power should be 3−5=−2.
And, so:
a−2=a21
and, in general,
a−n=an1
where n is a positive integer.
(5) Zero index
Similarly,
a3a3=a×a×aa×a×a=1,
and by using the division rule, the power should be 3−3=0.
Thus, anything to the power of zero equals one, except 00
which is undefined:
Powers of differences are not pretty: (a−b)x=ax−bx
A useful formula for products of sums:
(p+q)⋅(s+t)=ps+pt+qs+qt
Three important consequences:
(a+b)2=(a+b)(a+b)=a2+2ba+b2
(a−b)2=(a−b)(a−b)=a2−2ba+b2
(a+b)(a−b)=a2−b2
Logarithms
If y=ax, x is the power to which the basea must be raised to give
y, OR
x is the logarithm which, with basea, gives y.
In general we write x=logay⇔y=ax.
The base of a logarithm may be any number. Commonly, logarithms either have base 10 or basee.
It is almost always a good idea to explicitly state the base, e.g. log39=2 implies 32=9.
Getting a feel for logarithms
Here's a graph of y=log10x:
Some physical phenomena use log metrics due to their huge dynamic range:
volume of sound (decibels)
pitch (1 octave is doubling of frequency, 2 octaves is quadrupling of
frequency)
earthquakes (Richter scale)
pH ([H+] ion concentration)
Used a lot in computer programming to improve the speed and/or accuracy of calculations.
The laws of logarithms
(1) Using the same base a for both operations
Taking the logarithm undoes raising to a power:
logaar=r
Raising to a power undoes taking the logarithm:
alogab=b
(2) Multiplication
loga(bc)=logab+logac(Add)
(3) Division. In a similar way to multiplication
loga(cb)=logab−logac(Subtract)
(4) Powers
logabn=nlogab(Multiply)
(5) Changing the base of a logarithm
logac=logbalogbc
(6) Special case: if b and c are the same, (5) reduces to
logab=logbalogbb=logba1
(7) The log of any number to the base itself is 1
logaa=1
(8) The log of 1 is 0 (unless a=0, in which case it is undefined)
loga1=0sincea0=1
(9) Inverse operation
logaax=x
(10) Or
alogax=x
(11) Negative logs
logax1=loga1−logax=0−logax=−logax
(12) Two cautionary remarks
loga(x+y) and loga(x−y) cannot be simplified any further, and should be left as they are.
Neither can logax⋅logay or logaylogax. Leave them as they are.
Example 1: graphs
Can the data below be fitted to the form: y=Axn?
x
y
4.0
6.0
16.0
12.0
25.0
15.0
64.0
24.0
Take logs of both sides: This is the equation of a straight line (cf. y=mx+c)
logy=logAxn=logA+logxn=logA+nlogx
Gradient = 0.5 = n
Intercept = 0.48=log10A so A=3.0
Data fit curve of the form:
y=3.0×x1/2
Example 2: pH
What is the pH of a 0.011M solution of HCl?
pH=−log10[H+]
import numpy as np
pH =-np.log10(0.011)print('pH =',pH)
pH = 1.958607314841775
What is the H+ concentration of a solution of HCl with a pH of 3?
pH=−log[H+]=3so
[H+] = 0.001 M
Example 3: Simplifying logs
Write an expression for x without using logarithms:
log(x)=log(p)+2log(q)−log(k)−3 > log(x)= > x=
Use the laws of logarithms (above) to put all terms on the right hand side
within the logarithm. This means we have to rewrite 3 as 3log(10).
Raise both sides to the (same) power which will undo the logarithm function. (i.e. raise both sides to the power of 10)
The exponential function and the real number e
Definition of the Real Number e
The real number e, also known as Euler's number, is that base for which the graph y=ex
passes through the point (0,1) with gradient exactly equal to 1.
So for the function (called the exponential function):
y=exthegradientat(0,1)is1=e0.
This turns out to be true at any point on the curve.
The function y=ex is the only function that is unchanged when differentiated (more tomorrow).
e has been found to arise in many branches of mathematics. It is also used as a base for logarithms. e.g.:
y=loge10=ln10andy=logex=lnx
Logs to base e are called natural logarithms.
Definition of the natural logarithm
The natural logarithm of a number is the logarithm of that number taken using the base e.
We usually write ln(x) for loge(x). Here are some examples:
ln(e)=loge(e)=1
ln(10)=loge(10) = "The power I need to raise e to in order to get 10"
ln(10)≈2.303. Which means that e2.303≈10
ln(exp(b))=lneb=logeeb=b
exp(ln(b))=eln(b)=elogeb=b
Note that examples (d) and (e) confirm the property that
the functions "exp" and "ln" are functional
inverses of one another.
Evaluate the following expressions without using a calculator:
2−4
3621+6432
(31)−2
(981)23
Introductory problems 3
Express the following in logarithmic form:
53=125
8−31=21
xy=4
Introductory problems 4
Evaluate the following expressions without using a calculator:
log4(64)
logπ(1)
logb(ba)
6log6(π)
Introductory problems 5
Solve the following equations for x:
ex=4
e−x=2
One of your solutions should be exactly −2 times the value of your other solution. Why?
Introductory problems 6
Simplify:
ln(e3)
ln(2e1)
elnx4
e3+lnx
Main problems
Main problems 1
In an experiment, the mass, m grams, of a reaction product is measured at various times, t minutes. It is believed that m and t are related by a law of the form:
m=Atn
The results are shown in the table below:
time (min)
1
2
3
4
5
6
7
8
12
mass (g)
0.5
0.63
0.72
0.8
0.85
0.9
0.95
0.99
1.0
Confirm this postulate graphically. There is one result that does not conform to this law. Which?
Find appropriate values of A and n, and in this context, explain the meaning of n. What are the units of A?
Explain, with reasons, whether you would use these results to predict the mass when t=15.
Main problems 2
These problems deal with pH:
What is the pH of 130ml of a solution containing 4.7mg HCl, assuming that HCl is completely ionised in solution, and its molecular mass is 36.46?
What would be the pH if the concentration of HCl were tripled?
Main problems 3
Express in terms of log(a), log(b), log(c) and log(d):
log(acb)
log(a2bc3d4)
log(abcd)
Main problems 4
Simplify:
log(8)+log(3)−log(6)
log(x2−1)−log(x2+1)
3loga(4)+loga(5)−2loga(9)
log(x9)−log(x6)
Main problems 5
This problem gives you a chance to use the identity loga(b)=logb(a)1.
Consider the equation log3(x)+4logx(3)=5:
Verify that x=3 satisfies this equation
There is one other value of x that also satisfies this equation. Find it.
Main problems 6
Solve the following equations for x:
2(22x)−5(2x)+2=0
32x+1−28(3x)+9=0
16=log2(x)
(23log(x))2−7log(x2)+2=0
Main problems 7
Write an expression for x or y without using logarithms: