SPH 103 Notes 21

Download as pdf or txt
Download as pdf or txt
You are on page 1of 122

SPH 103 Mathematics for Physics

Dr. N. O.Hashim
Department of Physics
Kenyatta University

October 15, 2021


Abstract

This is a first year undergraduate course for students of both pure and ap-
plied sciences. The course aims to develop the students mathematical skills
in various topics including mathematical functions, differential and integral
calculus, vectors, and elements of probability theory. Emphasis is made on
the applications of the mathematical skills to science and engineering.

Mathematics provides tools to describe physical processes in nature, for


example the motion of objects or particles in a medium etc. A set of physical
laws governing a physical system in condideration can be expressed by a set
of mathematical relations in order to study and understand the system.

In this first part of the course, a brief introduction is made on numbers


and their applications in experiments. This includes some practical examples
on caclculation of mean values and their standard errors. The next section
is on mathematical functions and their applications in physics. That is, the
use of mathematical functions to describe and hence understand physical
processes. This is followed by the use of calculus and vectors in studying
physical systems. The applications range from mechanics, electricity and
magnetism, thermal physics and radioactivity. Finally, an introduction to
the elements of probability theory is presented.

The course is presented in a series of lectures. The course participants are


encouraged to attend the lectures and actively participate in the discussions.
Most importantly, the participants should solve as many examples as possible
on their own.
Contents

1 Numbers and Mathematical Functions 2

2 Calculus I 38

3 Calculus II 77

4 Vectors 97

5 Probability Theory 109

A Binomial Expansion 119

1
Chapter 1

Numbers and Mathematical


Functions

• Lecture No. 1: Numbers, errors and uncertainties

• Lecture No. 2: Errors and uncertainties, error propagation

• Lecture No. 3: Functions, composite functions

• Lecture No. 4: Transformation of functions, application of functions

2
SPH103 Mathematics for Physics
Lecture No. 1. Date:
Outline

• numbers, complex numbers

• errors and uncertainties

Numbers: Measurements or observations of a physical system are quantified


using numbers. For example, the dimensions or mass of a physical object are
expressed as 2m long pole weighing 60kg. The numbers 1,2,3, ... are known
as natural numbers or positive integers and are primarily used in counting.
Integers, on the other hand, are 0, ±1, ±2, ±3... . Rational numbers result
from the division of any two integers, eg. 5/7, −8/9, etc.

Note: division by zero is NOT allowed.



Irrational numbers, for example 2, cannot be expressed as a quotient of two
integers. Real numbers are either rational or irrational. They are governed
by the following rules of algebra. If a, b, c are any real numbers, then,

a+b=b+a Commutative law of addition

a + (b + c) = (a + b) + c Associative law of addition

ab = ba Commutative law of multiplication

a(bc) = (ab)c Associative law of multiplication

a(b + c) = ab + ac Distributive law

Real numbers may be raised to exponents n, m such that the following rules
apply,

am
an am = an+m = am − n (am )n = amn
an

The modulus or absolute value of a real number, defined as |a| = a2 ,
gives the numerical value of the number.

3
The limits of a quantity are often expressed as follows, |x| ≤ 2 which
means that the variable x takes values between -2 and 2, that is −2 ≤ x ≤ 2,
thus introducing the range or interval for the variable x. Imaginary numbers
will be introduced later on with the topic of complex numbers.

Complex numbers: Consider the polynomial equation, z 2 − 4z + 5 = 0


whose solution,

−4
z = 2 ±
2

contains the square root of a negative number, that is −4, which can be
expressed as follows,
√ √ √ √
−4 = 4 −1 = 2 i where i = −1

so that the solution is,

z = 2 ± i

This is a complex number of the form,

z = x + iy (1.1)

in which x is the real part denoted by Re z and y is the imaginary part


denoted by Im z. The components of a complex number are often represented
on an x-y plane known as the Argand diagram as illustrated on the Figure
1.1,

Figure 1.1: Representation of a complex number on an Argand diagram

4
Addition and multiplication of complex numbers: Consider two
complex numbers defined as follows,

z1 = x1 + iy1 z2 = x2 + iy2

The sum of the two complex numbers is,

z1 + z2 = (x1 + iy1 ) + (x2 + iy2 ) = (x1 + x2 ) + i(y1 + y2 )

and their product is,

z1 z2 = (x1 + iy1 ) (x2 + iy2 ) = (x1 x2 − y1 y2 ) + i(x1 y2 + x2 y1 )

(verify this!)

Note the following properties of addition,

z1 + z2 = z2 + z1 commutativity

z1 + (z2 + z3 ) = (z1 z2 ) + z3 associativity

Example 1: Find the sum and product of the two complex numbers

z1 = 2 + 3i z2 = 10 − 4i

The sum of the two complex numbers is,

z1 + z2 = (2 + 3i) + (10 − 4i) = 12 − i

and their product is,

z1 z2 = (2 + 3i) (10 − 4i) = (20 + 12) + i(−8 + 30) = 32 + 22i

p
The modulus of a complex number is defined as, |z| = x2 + y 2 , and rep-
resents the length of the joining the point z and the origin on the Argand
diagram. The argument of a complex number z denoted by arg z is defined
by,  
−1 y
arg z = tan (1.2)
x
and it represents the angle between the line joining the point z and the origin
with the positive x-axis as illustrated on the Figure 1.2

5
Figure 1.2: Illustration of the argument of a complex number on an Argand
diagram

The modulus and argument of the complex number z1 = 2+3i are calculated
as follows,
√ √
 
−1 3
2 2
|z| = 2 + 3 = 13 arg z = tan = 56.310
2

The complex conjugate of a complex number z = x + iy is defined as


z ∗ = x − iy so that,

z z ∗ = x2 + y 2 = |z|2 (1.3)

(verify this!)

Example 2: Consider the complex number z1 = x + iy. The complex


conjugate is z ∗ = x − iy so that,

z + z ∗ = (x + iy) + (x − iy) = 2x = 2 Re z

z − z ∗ = (x + iy) − (x − iy) = 2iy = 2 Im z

Assignment 1: Show that,

z x2 − y 2 2xy

= 2 2
+ i 2
z x + y x + y2

6
Polar representation of complex numbers: In the polar coordinate
system, the x and y coordinates are expressed as follows,

x = r cos θ y = r sin θ (1.4)

so that using the exponential function,

z2 z3 z4 z5
ez = 1 + z + + + + + ... (1.5)
2! 3! 4! 5!

(iθ)2 (iθ)3 (iθ)4 (iθ)5


eiθ = 1 + iθ + + + + + ...
2! 3! 4! 5!

θ2 θ4 θ3 θ5
 

e = 1 − + − ... + i θ − + + ...
2! 4! 3! 5!

hence,

eiθ = cos θ + i sin θ

Note that,

θ2 θ4
cos θ = 1 − + − ...
2! 4!

θ3 θ5
sin θ = θ − + + ...
3! 5!
It therefore follows that,

r eiθ = r cos θ + i sin θ = x + iy




or,
z = r eiθ (1.6)
which is the polar form of a complex number. Note that the modulus is
|z| = r and the argument is arg z = θ. Note that since (eiθ )n = einθ then,

(cos θ + i sin θ)n = cos nθ + i sin nθ (1.7)

which is an important result known as the de Moivre’s theorem and is valid


for all n, real or complex.

7
Example 3: Using de Moivre’s theorem one can express cos 3θ and sin 3θ
as follows,
3
cos 3θ + i sin 3θ = cos θ + i sin θ

= cos3 θ − 3 cos θ sin2 θ + i 3 sin θ cos2 θ − sin3 θ




so that on equating the real and imaginary coefficients one gets,

cos 3θ = cos3 θ − 3 cos θ sin2 θ

or,

cos 3θ = 4 cos3 θ − 3 cos θ

and similarly,

sin 3θ = 3 sin θ cos2 θ − sin3 θ

or,

sin 3θ = 3 sin θ − 4 sin3 θ

Assignment 2: Use de Moivre’s theorem to show that,

cos 4θ = 8 cos4 θ − 8 cos2 θ + 1

8
Errors and Uncertainties: In experimental work it is often useful to esti-
mate the mean value of a set of measurements and also it’s uncertainty. The
errors are either systematic or random. For a sample of measurements x1 ,
x2 , x3 , ... xn , the mean value is calculated as follows,
n
1 X
x̄ = xi (1.8)
n i=1
which represents the arithmetic mean of the sample.
The assumption here is that the values xi and their errors are normally
distributed. The Gaussian or normal distribution is a continuous,symmetric
distribution whose density is described by;
!
1 (x − µ)2
P (x) = √ exp − (1.9)
σ 2π 2 σ2
In the limit n → ∞, that is for a large sample size, the value of x̄ ap-
proaches the theoretical mean,
n
lim 1 X
µ = xi (1.10)
n → ∞ n i=1
The standard deviation σ of the measured xi values is calculated as fol-
lows,
1 X
σ̂ 2 = (xi − µ)2 (1.11)
n
so that the average value for the measurements is represented as x̄ ± σ(x̄),
where
σ̂
σ 2 (x̄) = √ (1.12)
n

9
Example 4: The results for the measurements of the length of an object
in cm are as follows;

17.62 17.62 17.615 17.62 17.61


17.61 17.62 17.625 17.62 17.61
17.61 17.615 17.61 17.605 17.61

Calculate the mean and standard error for the measurements.

The following Table shows the possible steps that can be used in this
example.

i xi xi − µ (xi − µ)2
1 17.620 0.00467 0.00002
2 17.620 0.00467 0.00002
3 17.615 -0.00033 0.00000
4 17.620 0.00467 0.00002
5 17.610 -0.00533 0.00003
6 17.610 -0.00533 0.00003
7 17.620 0.00467 0.00002
8 17.625 0.00967 0.00009
9 17.620 0.00467 0.00002
10 17.620 0.00467 0.00002
11 17.610 -0.00533 0.00003
12 17.615 -0.00033 0.00000
13 17.610 -0.00533 0.00003
14 17.605 -0.01033 0.00011
15 17.610 -0.00533 0.00003

The calculations for the mean value x̄ or µ are as follows,


15
1 X 1
µ = x̄ = xi = (17.620 + 17.620 + ...) = 17.61533
15 i=1 15

and the standard error on the mean value,


σ̂
σ(x̄) = √ = 0.0015
15
Note that the calculations make use of the unbiassed estimate of the
sample variance,
(xi − x̄)2
P
2 1
σ̂ = = (0.00002 + 0.00002 + ...) = 0.00581
n − 1 14

10
The length of the object is therefore x = 17.616 ± 0.002 cm. The sample
size in Example 1 is (N = 15) is rather small and the calculations are easy
to perform using a pocket calculator. For large sample sizes, e.g. N > 100,
the calculations may be tedious for a pocket calculator. In such cases one
would typically make use of advanced data analysis techniques on a personal
computer.

Example 5: It is assumed that the heights of a sample of 10,000 stu-


dents in a University Campus are normally distributed with a mean value of
171cm and standard deviation of 6cm. Illustrate the distribution of students
heights using a graph.

A normal or Gaussian distribution described in the Expression (1.9) is


assumed for the distribution of the heights students. The data are generated
using the following parameters, sample size N = 10,000, mean height µ =
171cm, and standard deviation σ = 6cm. The graph on Figure 1.3 shows the
assumed distribution of the heights of students generated.

Figure 1.3: Distribution of the heights of students generated randomly. Note


that for such a large sample size it is necessary to make use of a personal
computer to generate the data and hence do the analysis.

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

11
SPH103 Mathematics for Physics
Lecture No. 2. Date:
Outline

• errors and uncertainties

• error propagation

Recall: The algebra of summations.

1. If c is a constant, then
N
X
c = Nc. (1.13)
i=1

That is, adding a constant value c N times is equivalent to multiplying the


constant c with the number N. For example, c = 4, N = 5

5
X
4 = (4 + 4 + 4 + 4 + 4) = 5(4) = 20.
i=1

2. If c is a constant, and x1 , x2 , x3 , ..., xN is any set of N numbers, then


N
X N
X
c xi = c xi (1.14)
i=1 i=1

That means the constant term c can be taken out of the summation. For
example x1 = 2, x2 = 10, x3 = 1, c = 2. In this case the sample size is N = 3,
hence,

3
X
2 xi = 2(2) + 2(10) + 2(1) = 2(2 + 10 + 1) = 2(13) = 26
i=1

That is,

3
X 3
X
2 xi = 2 xi = 2(13) = 26
i=1 i=1

12
3. If x1 , x2 , x3 , ..., xN and y1 , y2 , y3 , ..., yN are any sets each of N numbers,
then
N
X
xi yi = x1 y1 + x2 y2 + x3 y3 + ... + xN yN (1.15)
i=1

That is, a summation of the products of the individual elements xi yi .

For example, x1 = 2, x2 = 10, x3 = 1, y1 = 3, y2 = 5, y3 = 2, then,

3
X
xi yi = (2)(3) + (10)(5) + (1)(2) = 6 + 50 + 2 = 58
i=1

4. If x1 , x2 , x3 , ..., xN and y1 , y2 , y3 , ..., yN are any sets each of N numbers,


then
N
X N
X N
X
(xi + yi ) = xi + yi (1.16)
i=1 i=1 i=1

That is, a sum of the individual summations of the elements xi , yi .

As in the previous example, x1 = 2, x2 = 10, x3 = 1, y1 = 3, y2 = 5, y3 = 2,


then,

3
X 3
X 3
X
(xi + yi ) = xi + yi = (1 + 10 + 3) + (3 + 5 + 2) = 23
i=1 i=1 i=1

These rules for summation are useful in data analysis, for example when cal-
culating mean values from a set of measurements.

As an example, consider the following set of measurements for the length of


an object.

17.62 17.62 17.615 17.62 17.61


17.61 17.62 17.625 17.62 17.62
17.61 17.615 17.61 17.605 17.61

13
Some of the measured values are repeated hence the calculation of the mean
value for the length of the object is as follows,
m
1X
x̄ = xj f j (1.17)
N j=1

where fj represents the frequency for the occurence of the value xj . The
sample size N is obtained from the sum of all frequencies,
m
X
N = fj (1.18)
j=1

The observations can therefore be presented as follows,

j xj fj xj f j xj − x̄ (xj − x̄)2 (xj − x̄)2 fj


1 17.605 1 17.605 -0.01033 0.00011 0.00011
2 17.610 5 88.050 -0.00533 0.00003 0.00014
3 17.615 2 35.230 -0.00033 0.00000 0.00000
4 17.620 6 105.720 0.00467 0.00002 0.00013
5 17.625 P 1 P 17.625 0.00967 0.00009 P 0.00009
= 15 = 264.230 = 0.00047

so that,

5
1 X 1
x̄ = xj f j = (264.230) = 17.61533
15 j=1 15

The sample variance is therefore calculated as follows,

(xj − x̄)2 fj
P
2 0.00047
σ̂ = = = 0.00003381
N − 1 14
and the standard error on the mean,

r
σ̂ 0.00003381
σ(x̄) = √ = = 0.0015
N 15

Hence the length of the object is x = 17.616±0.002 cm. Note that this result
is in agreement with the earlier calculations.

14
Error Propagation

In experimental work it is often necessary to make more than one mea-


surement for a system under study. Each of the set of measurement has its
own measure of uncertainty or errors. In this section we will learn how to
combine these errors.

Consider a quantity u = f (x, y) measured using the variables x, y having


errors σx and σy respectively. The standard deviation σu is a function of σx
and σy so that the variance σu2 can be defined as,
N
1 X
σu2 = (u − ū)2 (1.19)
N i=1
A first order approximation of ū allows the expansion of (u − ū) so that,
 2  2
2 ∂f 2 ∂f ∂f ∂f
σu ' σx + σy2 + 2 cov(x, y) (1.20)
∂x ∂y ∂x ∂y
where the covariance of the variables x, y is defined as,
N
1 X
cov(x, y) = (x − x̄) (y − ȳ) (1.21)
N i=1

Note that the symbols ( ∂f∂x


) and ( ∂f
∂y
) denote the partial derivatives of the
function f (x, y) with respect to x and y respectively.

In general, the covariance is assumed tobe zero for independent sets of


measurements. For example, consider the following combinations for the
variables x, y,

1. Error of a sum: u = x + y

σu2 = σx2 + σy2 + 2cov(x, y)

2. Error of a difference: u = x − y

σu2 = σx2 + σy2 − 2cov(x, y)

15
3. Error of a product: u = xy

σu2 = y 2 σx2 + x2 σy2 + 2xy cov(x, y)

4. Error of a ratio: u = x/y

σu2 = y −2 σx2 + x2 y −4 σy2 − 2xy −3 cov(x, y)

Example 1: Consider the following two sets of data.

i 1 2 3 4 5 6 7 8 9 10
xi 25 26 24 23 27 21 24 27 22 24
yi 48 49 46 46 47 43 47 48 43 46

Source: H. Frank, S.C. Althoen. Statistics. Concepts and Applications.


Cambridge Univ. Press. (1994). pg 109.

The covariance of the two data sets cov(x, y) is calculated as follows,

i xi (xi − x̄) (xi − x̄)2 yi (yi − ȳ) (yi − ȳ)2 (xi − x̄)(yi − ȳ)
1 25 0.7 0.49 48 1.7 2.89 1.19
2 26 1.7 2.89 49 2.7 7.29 4.59
3 24 -0.3 0.09 46 -0.3 0.09 0.09
4 23 -1.3 1.69 46 -0.3 0.09 0.39
5 27 2.7 7.29 47 0.7 0.49 1.89
6 21 -3.3 10.89 43 -3.3 10.89 10.89
7 24 -0.3 0.09 47 0.7 0.49 -0.21
8 27 2.7 7.29 48 1.7 2.89 4.59
9 22 -2.3 5.29 43 -3.3 10.89 7.59
10 24 -0.3 P 0.09 46 -0.3 P 0.09 P 0.09
= 36.1 = 36.1 = 31.1

The calculations are as follows; the mean values,

10 10
1 X 1 X
x̄ = xi = 24.3 ȳ = yi = 46.3
10 i=1 10 i=1

16
and the sample variances,

10
1 X
σx2 = (x − x̄)2 = 3.61
10 i=1

10
1 X
σy2 = (y − ȳ)2 = 3.61
10 i=1

Note that for these data sets σx2 = σy2 . This is not necessarily the case for
other data sets. The covariance is calculated as follows,

10
1 X
cov(x, y) = (x − x̄) (y − ȳ) = 3.11
10 i=1

Therefore for the case u = x + y, the propagation of errors is as follows,

σu2 = σx2 + σy2 + 2cov(x, y) = 3.61 + 3.61 + 2(3.11) = 13.44

so that with a mean value obtained as,

10 10 10
1 X 1 X 1 X
ū = ui = xi + yi = 24.30 + 46.30 = 70.60
10 i=1 10 i=1 10 i=1

and the uncertainty calculated as,

r r
σu2 13.44
σ(ū) = = = 1.159
10 10
Therefore the mean value can be expressed as u = 70.60 ± 1.16.

17
Assignment 1: Consider the following two sets of data.

i 1 2 3 4 5 6 7 8 9 10
xi 12 11 12 13 10 11 12 11 13 12
yi 9 10 10 9 11 12 10 11 11 12

Calculate the following,


(i) the mean values x̄ and ȳ and their variances σx2 and σy2 ,
(ii) the covariance of the two data sets, cov(x, y),

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

18
SPH103 Mathematics for Physics
Lecture No. 3. Date:
Outline

• functions

Functions: Consider two sets A, B of real variables x, y respectively. A


function f is a rule that assigns each element x of set A to an element(s) y
in set B, as illustrated on the Figure 1.4.

Figure 1.4: An illustration of a function

In the above illustration for the function f (x), x is termed as the inde-
pendent variable while y is the dependent variable. Y is a function of x,that
is y = f (x). The sets A and B are called the domain and co-domain of
the function respectively.
If the function maps each element xi in the set A to a unique element yi
in the set B, then the function is termed as a one-to-one function. Figure
1.5 illustrates a one-to-one function. An example of a one-to-one function is
f (x) = x + a where a is aconstant. For example the values for the function
f (x) = x + 2 are listed in the Table below.

x 0 1 2 3 4 5 6
f(x) = x + 2 2 3 4 5 6 7 8

Assignment 1: Give an example of a one-to-one function.

19
Figure 1.5: An illustration of a one-to-one function

A function that maps an element xi from the set A into many elements
yi , yj , ... in the set B is called a one-to-many function. This is illustrated
on Figure 1.6.

Figure 1.6: An illustration of a one-to-many function

p
An example of a one-to-many function is f (x) = (x) with some values
listed below.
xp 4 9 16 25 36 49
f(x)= (x) ± 2 ± 3 ± 4 ± 5 ± 6 ± 7

Assignment 2: Give an example of a many-to-one function.

20
Examples of functions
1. Polynomial functions are of the form,

n
X
f (x) = ai xi = a0 + a1 x + a2 x2 + ... + an xn an 6= 0
i=o

n is the order or degree of the polynomial. For example, 3x2 − 5x + 10 is


a polynomial of order 2, also termed as a quadratic expression.

2. Rational functions are expressed as follows,

P (x)
f (x) = Q(x) 6= 0
Q(x)
where P (x) and Q(x) are polynomial functions. For example,

x3 + 2x + 6
y =
x + 3
is a rational function, but it is not defined at x = −3 (since the denomi-
nator will be zero).

3. Exponential functions are generally of the form f (x) = ax . They


are also known as growth functions and a is known as the growth factor. For
an exponential function, a = e = 2.7182818... and the functions have useful
applications in physics.

4. Logarithmic functions are expressed as f (x) = loga x, where a is


known as the base of the logarithm. If y = f (x) = loga x the x = ay . For
the special case where a = e = 2.7182818... the function is called the natural
logarithm and is written loge = ln.

Note the following rules for the algebra of logarithms,


ln(m n) = ln m + ln n

 
m
ln = ln m − ln n
n

ln ma = a ln m

21
Assignment 3: Using the properties of logarithms evaluate the follow-
ing,
(a) log 125 (b) log 1.5

Note: log 3 = 0.4771 log 5 = 0.6989

5. Trigonometric functions are sin x, cos x, tan x etc. They are peri-
odic, that means the function repeats itself at regular intervals. For example,
the periodic interval for the functions sin x, cos x is 3600 or 2π, or generally
expressed as follows, f (x) = sin(x + 2nπ) = sin(x) where n = 0, 1, 2, ... . In
general, for a periodic function, f (x) = f (x + nT ) where T is the periodic
interval of the function.
As an example, consider the trigonometric function f (x) = sin x. Some
values of the function are tabulated as follows,

x (deg) 0 90 180 270 360


x(rad) 0 π/2 π 3π/2 2π
f(x)= sin(x) 0 1 0 -1 0

and the function is sketched on the Figure 1.7.

Figure 1.7: A sketch of the function f (x) = sin x

Note the periodic nature of the function, T = 2π. Transformations of


such a function will be discussed later on.
Assignment 4: Sketch the function f (x) = cos x and investigate the
following relationship,
 
π
sin x = cos − x
2

22
6. Hyperbolic functions functions are defined in terms of the expo-
nential function as follows,

ex − e−x
sinh x =
2

ex + e−x
cosh x =
2

sinh x ex − e−x
tanh x = = x
cosh x e + e−x
These functions are useful in describing periodic or oscillatory systems.

Even and odd functions

If f (−x) = f (x) then the function f (x) is an even function and it’s graph
has a line of reflection symmetry (x = 0).

If f (−x) = −f (x) then the function f (x) is an odd function and it’s graph
has a point of rotational symmetry about the origin or point of inflection.

Example 1: The functions f (x) = x2 and f (x) = x3 are examples of even


and odd functions respectively. Some values for the function are tabulated
as follows,

x -10 ... -3 -2 -1 0 1 2 3 ... 10


f(x)= x2 100 ... 9 4 1 0 1 4 9 ... 100
f(x)= x3 -1000 ... -27 -8 -1 0 1 8 27 ... 1000

The graph of the functions are sketched on the Figure1.8.


The function f (x) = x2 results into the same value for both negative and
positive values of the variable x resulting into a line of relfection symmetry
at x = 0. The function f (x) = x3 for the positive values of x can be rotated
about the point (0,0) to obtain a function which corresponds to the negative
values of x. The point (0,0) is known as the point of rotational symmetry
for the function.

23
Figure 1.8: A sketch of the functions f (x) = x2 and f (x) = x3 . Note the
line of reflection symmetry x = 0 for the function f (x) = x2 and the point
of rotational symmetry (x, y) = (0, 0) for the function f (x) = x3 .

Assignment 5: Sketch the following functions and determine whether


they are even or odd.

(a) f (x) = x2 + x3 (b) f (x) = cos x

Consider the hyperbolic functions f (x) = cosh x and f (x) = sinh x with
some values tabulated are as follows,

x -2 -1.5 -1 -0.5 0 0.5 1 1.5 2


f(x)= cosh x 3.76 2.35 1.54 1.13 1 1.13 1.54 2.35 3.76
f(x)= sinh x -3.63 -2.13 -1.18 -0.52 0 0.52 1.18 2.13 3.62

and their graphs are illustrated on the Figure 1.9.


The inverse of a function
As already observed, the complete definition of a function includes the
rule and the domain of the function (the set of values for which the rule
applies). The range or co-domain of a function is the set of values which
the function can take. The function f −1 (x) is defined as the inverse of the
function f (x) such that the following condition is satisfied,

f −1 f (a) = a (1.22)
for any value of a in the domain of the function f (x). For a one-to-one
function,the inverse function tends to reverse the effect or action of that
function.

24
Figure 1.9: A sketch of the functions f (x) = cosh x and f (x) = sinh x. Note
line of reflection symmetry y = 0 for the function f (x) = cosh x, and the
point of rotational symmetry (x, y) = (0, 0) for the function f (x) = sinh x.

In general, the graph of the inverse function f −1 (x) is a reflection of the


graph of the function f (x) along the line y = x, as illustrated on the Figure
1.10.

Figure 1.10: An illustration of the inverse of a function.

Example 2: Consider the function f (x) = x + 2. The inverse of this


function is f −1 (x) = x − 2, so that one can test the Equation (1.22) using
some values of x as follows,
x 0 1 2 3
f (x) 2 3 4 5
f −1 f (x) 0 1 2 3

25
Note that on applying the inverse function f −1 (x) on the results of the func-
tion f (x) one gets the initial values of the variable x used, which is in agree-
ment with the Equation (1.22).
Determination of the inverse of a function:
The functions considered so far are simple and the determination of their
inverses is rather straight forward. Difficulties may arise, for example, when
the independent variable appears more than once in the function. Such cases
may require a re-arrangement of the function by expressing the independent
variable x as the subject of the formula describing the function. This pro-
cedure followed by an interchange of the variables is often a suitable means
to obtain the inverse of such complicated functions. The following examples
illustrate this procedure of finding the inverse of a function.

Example 3: Find the inverse of the following function,


x + 3
f (x) = x 6= −1
x + 1
Let the function be described by the formula,

x + 3
y =
x + 1
A re-arrangement to make x the subject of the formula results into,

3 − y
x =
y − 1
so that an interchange of the variables gives the required inverse function,

3 − x
f −1 (x) = x 6= 1
x − 1
Some values for the function f (x) and its inverse are tabulated below.

x 0 1 2 3 4 5
f (x) 3.00 2.00 1.67 1.50 1.40 1.33
f −1 f (x) 0 1 2 3 4 5

Note: f −1 f (a) = a with a 6= −1.

26
Composite functions: Composite functions result from applying two or
more functions successively. For example, gf (x) means that the function
g(x) is applied to the result(s) of applying the function f (x) on the set of
the variable x.

Example 4: The functions f (x) and g(x) are defined as follows,

f (x) = 7x g(x) = x + 1.

The composite functions f g(x) and gf (x) are calculated as follows,

f g(x) = f (x + 1) = 7(x + 1) = 7x + 7

gf (x) = g(7x) = 7x + 1

hence f g(x) 6= gf (x). That means the order in which the functions are ap-
plied matters.

Example 5: The functions f (x) and g(x) are defined as follows,

f (x) = x + 2 g(x) = x − 7.

The composite functions f g(x) and gf (x) are calculated as follows,

f g(x) = f (x − 7) = (x − 7) + 2 = x − 5

gf (x) = g(x + 2) = (x + 2) − 7 = x − 5

hence f g(x) = gf (x), the order in which the functions are applied does not
matter.

Assignment 6: The functions f (x) and g(x) are defined as follows,

f (x) = a − x g(x) = a − x

Find the composite functions f g(x) and gf (x). Comment on your results.

Some practical examples: Consider the measurement of the temper-


ature of water in 0 C. To convert these measurements into the Kelvin scale,
one adds 273, that is,

27
T(K) = T (0 C) + 273

The domain here is from 00 C to 1000 C and the range is 273K to 373K.

This conversion of the values of temperature can be expressed as a function


as follows,

g(x) = x + 273 (1.23)


where x is the temperature in 0 C.

In order to convert the temperature values from the Kelvin to the Celsius
scale, one can use the inverse function,

g −1 (x) = x − 273 (1.24)


with x in Kelvin.

For example, consider water at room temperature T = 230 C, such that,

g(230 C) = 23 + 273 = 296K

g −1 (296K) = 296 − 273 = 230 C.

Note that:

g −1 g(230 C) = g −1 (296K) = 230 C

in agreement with the Equation (1.22) defining the inverse of a function.

The function,
9
f (x) = x + 32 (1.25)
5
with x in 0 C, converts the values of temperature from the celsius scale (0 C)
to the Fahrenheit scale (0 F).
For the water at room temperature T = 230 C,

9
f (230 C) = (23) + 32 = 73.40 F
5
The function f (x) has an inverse of the form,

28
5
f −1 (x) = (x − 32) (1.26)
9
with x in 0 F so that,

5
f −1 (73.40 F) = (73.4 − 32) = 230 C
9
hence,

f −1 f (230 C) = f −1 (73.40 F) = 230 C

in agreement with the Equation (1.22) defining the inverse of a function.

For example, one can formulate a composite function to convert values of


temperature from 0 F to 0 K as follows,
 
−1 5 5
gf (x) = g (x − 32) = (x − 32) + 273 (1.27)
9 9
0
with x in F.

As an example, consider the boiling point for water T = 1000 C. This value
can be converted as follows,

9
f (1000 C) = (100) + 32 = 2120 F
5

g(1000 C) = 100 + 273 = 373K

 
−1 0 5 5
gf (212 F) = g (212 − 32) = (212 − 32) + 273 = 373K
9 9

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

29
SPH103 Mathematics for Physics
Lecture No. 4. Date:
Outline

• transformation of functions

Transformation of functions Mathematical functions can be transformed


in various ways, for example rotations of the function about a point or trans-
lation(s) of the function along the axes. In this section we will only consider
the translation of a function along it’s axes and a brief description of cyclic
functions.

In general, f(x − a) + b represents the image of the function f (x) under the
a
translation and the transformation is denoted as follows,
b
f (x) → f (x − a) + b.

This transformation results into a translation of the function f (x) a units


along the x-axis and b units along the y-axis as illustrated on the Figure 1.11.

Figure 1.11: An illustration of the transformation f (x) → f (x − a) + b.

Example 1: Consider the function f (x) = x2 under the following trans-


lations,
     
10 0 10
(a) (b) (c)
0 20 20

30
The functions that correspond to these translations, i.e.images, are,

(a) f (x) = (x − 10)2 (b) f (x) = x2 + 20 (c) f (x) = (x − 10)2 + 20

and some values are tabulated as follows,

x -10 -5 0 5 10 15 20
f (x) = x2 100 25 0 25 100 225 400
f (x) = (x − 10)2 400 225 100 25 0 25 100
f (x) = x2 + 20 120 45 20 45 120 245 420
f (x) = (x − 10)2 + 20 420 245 120 45 20 45 120

The images of the function f (x) = x2 under these translations are illus-
trated on Figure 1.12. Note the following,
 
10
• Figure 1.12 (a) illustrates the translation hence the curve is de-
0
scribed by f (x) = (x − 10)2 . That means the function f (x) = x2 is
translated by 10 units along the x-axis,
 
0
• Figure 1.12 (b) illustrates the translation hence the curve is de-
20
scribed by f (x) = x2 + 20. That means the function f (x) = x2 is
translated by 20 units along the y-axis,
 
10
• Figure 1.12 (c) illustrates the translation hence the curve is de-
20
scribed by f (x) = (x − 10)2 + 20. That means the function f (x) = x2
is translated by 10 units along the x-axis and 20 units along the y-axis.

31
The transformation of cyclic functions, for example f (x) = sin(x) presents
interesting results which are often useful in describing oscilatory systems. In
general,the function is represented as follows,

f (x) = a sin(bx + c) (1.28)


where,

2π −c
T = and
b b
are the period and phase shift of the function as illustrated on Figure 1.13.
The constant term a determines the amplitude of the function,while the term
b determines the frequency of the function. Figure 1.14 illustrates this for
somevalues of a, b, c. Note the following in Figure 1.14,

• (a) the amplitude a = 2, there are no changes frequency or phase of


the signal

• (b) the period is doubled, there are no changes in amplitude

• (c) there is a phase shift of about 1.5, with no change in amplitude or


frequency

Assignment 1: The electrical power of an ac power supply is trans-


formed such that the output voltage is given by,

V (t) = 24 sin(21600t + 720)

Determine the amplitude, frequency and phase shift of the power supply.

32
Figure 1.12: Illustrations of the function f (x) = (x − a)2 + b .

33
Figure 1.13: An illustration of the function f (x) = a sin(bx + c). Note that
on this illustration a = 2, b = 1, c = 0.5

34
Figure 1.14: Illustrations of the function f (x) = a sin(bx + c) .

35
Application of functions:
As already mentioned, mathematical functions are useful in the description
of physical systems. The following examples illustrate the application of
mathematical functions to understand some concepts in physics.

Example 2: In a simplified toy model for the development of a cascade


of particles in the atmosphere, the number of particles N doubles after each
interaction length λ as illustrated on Figure 1.15.

Figure 1.15: Development of a cascade of particles

Express the number of particles N as a function of the distance X in units


of the interaction length λ. Sketch the function and find the number of par-
ticles after 5 interaction lengths.

This example is drawn from the specialised area of Astroparticle physics.


The model chosen is rather simplified. The number of particles after each
interaction length λ are listed in the following Table.

x 0 1 2 3 4
N 1 2 4 8 16

The values presented suggest a growth function of the form f (x) = ax to


describe the development of the cascade of particles. Since the number of
particles double after each interaction length λ, the growth factor is a = 2.
The function is therefore f (x) = 2x as illustrated on the Figure 1.16
Note that after five interaction lengths, x = 5λ, the number of particles
is N = 25 = 32.

36
Figure 1.16: The number of particles in a simplified toy model. The distance
is in units of the interaction length λ.

Example 3: The output of a power supply is described by,


V (t) = 240 sin (t + 1.2)

where v(V ) is the voltage after time t(ms). The output voltage is sketched
on the Figure 1.17.

Figure 1.17: The output voltage of a power generator. Note the amplitude
of the output voltage and the time delay.

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

37
Chapter 2

Calculus I

• Lecture No. 5: Limits, conitnuity and differentiability of a function

• Lecture No. 6: Techniques of differentiation

• Lecture No. 7: Applications of differentiation, partial differentiation

• Lecture No. 8: Further partial differentiation and applications

38
SPH103 Mathematics for Physics
Lecture No. 5. Date:
Outline:
• Limits, continuity and differentiability of a function
• Differentiation from first principles
Limits and continuity of a function

A function f (x) is said to have a limit if it has a particular value, e.g. L,


as the variable x approaches a particular value, e.g x = a. This is denoted
as follows,

lim
f (x) = L (2.1)
x → a
The function f (x) is said to be continuous at the value x = a if,
• the limit
lim
f (x) exists,
x → a

• the function f (x) is defined at the value x = a,


• and
lim
f (x) = f (a)
x → a

The function f (x) is said to be continuous in the interval x1 ≤ x ≤ x2 if f (x)


is continuous at each point in the interval. In the case where the function
becomes arbitrarily large when x is sufficiently close to the value a, the limit
in the Equation (2.1) is written as follows,

lim
f (x) = ∞ (2.2)
x → a

The symbol ∞ denotes an infinite value for the function f (x). An example
of such a function is f (x) = 1/x2 which approaches infinity ∞, as the value
of x approaches zero, that is,

lim
f (x) = ∞
x → 0

39
The function f (x) = 1/x provides another example where the function ap-
proaches both values of infinity, −∞ and +∞, depending on the how the
value x = 0 is approached, that is,

from the positive x-axis,

lim
f (x) = +∞
x → 0+

and from the negative x-axis,

lim
f (x) = −∞
x → 0−

as illustrated on the Figure 2.1.

Figure 2.1: Sketches of the functions f (x) = 1/x and f (x) = 1/x2 .

Note that the curves of f (x) = 1/x and f (x) = 1/x2 are undefined at the
value x = 0. This is also known as the point of discontinuity or singularity
for the curves. Generally, functions have no values defined at their point(s)
of singularities.

Next, consider the function f (x) = tan x. The curves for this function are dis-
continuous at any value of x that is an odd multiple of π/2, that is x = nπ/2
with n = ±1, ±3, ... as illustrated on Figure 2.2.

40
Figure 2.2: Sketches of the function f (x) = tan x.

It is often useful to carefully examine the denominator of a function in


order to determine the point(s) of disontinuity as illustrated in the following
example.

Example 1: The function f (x) defined by,

x2 − 3x + 2
f (x) =
x2 − 2x
has a point of discontinuity at x = 2. Some values of the function f (x) for
values of x approaching the point of discontinuity x = 2 are tabulated below,

x 1.90000 1.99000 1.99900 2.00100 2.01000 2.10000


f (x) 0.47368 0.49749 0.49975 0.50025 0.50249 0.52381

suggesting that,

lim
f (x) = 0.5
x → 2

the function approaches a value f (x) ' 0.5 as the value of x approaches
the point of discontinuity, x = 2. In this case, the direction in which one
approaches the point of discontinuity does not matter.

41
Example 2: Consider the function f (x) defined by,

3x + 7
f (x) =
10 − 4x
Some values of the function f (x) as x approaches infinity are tabulated as
follows,

x 1 10 100 1000 10000


f (x) 1.66667 -1.23333 -0.78718 -0.75363 -0.75036

suggesting that,

lim
f (x) = −0.75
x → ∞

the function approaches a value f (x) ' −0.75 as the value of x approaches
infinity.

Note: when using a pocket calculator it is advisable to use the Table mode
when calculating the values of a function.

Assignment 1: Given the function is,


1
f (x) =
x2 − 2x
An investigation of the function in the limit x → 2 is tabulated as follows,

x 1.90000 1.99000 1.99900 2.00100 2.01000 2.10000


f (x) -5.26316 -50.25126 -500.25013 499.75012 49.75124 4.76190

suggesting that,

lim
f (x) = ±∞
x → 2

42
Differentiability of a function
Consider a function y = f (x). Let A be a typical point on the curve with
the coordinates (x, y) as illustrated on Figure 2.3.

Figure 2.3: Sketch of a function y = f (x).

The coordinates of point B can be written as (x + δx, y + δy) where δy is a


small change in y produced by a small change δx in x.

The slope or gradient of the line joining the points A and B, expressed as,

f (x + δx) − f (x)
= tan BAC (2.3)
δx
can be considered as the mean value of the gradient on curve y = f (x) in
the range (x, x + δx). As the point B approaches the point A, that is δx → 0
one can express the limit,

lim f (x + δx) − f (x)


= l (2.4)
δx → 0 δx
such that l = tan θ, where θ is the angle between the tangent at the point P
and the x-axis.

43
The Equation (2.4) is referred to as the differential coefficient of the function
f (x) with respect to x, and is denoted as,

df (x) dy
= = f 0 (x) (2.5)
dx dx
or simply

lim f (x + δx) − f (x)


f 0 (x) = (2.6)
δx → 0 δx
A function y = f (x) is said to be differentiable if it has a differential coeffi-
cient, and to be differentiable at the point x = a if the differential coefficient
exists at that point. Higher order derivatives are denoted by,

d2 y
 
00 d 0 d dy
y = y = =
dx dx dx dx2

d2 y d3 y
 
000 d 00 d
y = y = =
dx dx dx2 dx3

and are applied to investigate the rates of change of variables describing a


physical system under consideration.

Some differentiation formulae

The process of finding the differential coefficient, or derivative, of a func-


tion is called differentiation. We will next learn some formulae for differen-
tiation. If u(x) and v(x) represent differentiable functions of x and c is a
constant, then
d
(c) = 0 (2.7)
dx
that is, the derivative of a constant term is zero,
d du
(cu) = c (2.8)
dx dx
that is, a constant term is taken out of the differentiation,

44
d n du
u = n un − 1 (2.9)
dx dx
note that if u = x then,

d n
x = n xn − 1
dx
dx
note that dx
=1
d du dv
(u ± v) = ± (2.10)
dx dx dx
that is, the derivative of a sum of two functions is equivalent to the sum of
their derivatives,
d dv du
(u v) = u + v (2.11)
dx dx dx
also known as the product rule,

v du − u dv
 
d u
= dx 2 dx (2.12)
dx v v
also known as the quotient rule,
d du
sin u = cos u (2.13)
dx dx
d du
cos u = − sin u (2.14)
dx dx
note that for the case u = x,

d
sin x = cos x
dx

d
cos x = − sin x
dx
The differentiation formulae can be obtained from first principles using Equa-
tion (2.6). The following examples illustrate the technique to obtain deriva-
tives from first principles.

45
Example 3: Consider the function f (x) = c where c is a constant. The
derivative of this function is obtained from first principles using the Equation
(2.6) as follows,

df lim f (x + δx) − f (x)


f 0 (x) = =
dx δx → 0 δx

lim c − c
= = 0
δx → 0 δx

hence,

f 0 (x) = 0

in agreement with Equation (2.7).

Example 4: The derivative of the function f (x) = x2 is obtained from


first principles using Equation (2.6) as follows,

lim f (x + δx) − f (x)


f 0 (x) =
δx → 0 δx

lim (x + δx)2 − x2
=
δx → 0 δx

lim x2 + 2xδx + (δx)2 − x2


=
δx → 0 δx

2xδx + (δx)2
 
lim lim
= = 2x + δx
δx → 0 δx δx → 0

hence, on application of the limit δx → 0, one gets the result,

f 0 (x) = 2x

46
Example 5: The derivative of the function f (x) = sin x is obtained from
first principles using Equation (2.6) as follows,

lim f (x + δx) − f (x)


f 0 (x) =
δx → 0 δx

lim sin(x + δx) − sin x


=
δx → 0 δx

Using the following trigonometric identity,

sin(A ± B) = sin A cos B ± cos A sin B

the first term on the limit can be expanded so that,

lim sin x cos δx + cos x sin δx − sin x


f 0 (x) =
δx → 0 δx

and with the following limits,

lim
cos δx ' 1
δx → 0

lim sin δx
'1
δx → 0 δx

one gets the result,


f 0 (x) = cos x

Assignment 2: Find the derivative of the following functions from first


principles.

(a) f (x) = xn (b) f (x) = cos x

47
Example 6: Consider the function f (x) = xn . The derivative of this
function is obtained from first principles using the Equation (2.6) as follows,

lim f (x + δx) − f (x)


f 0 (x) =
δx → 0 δx

lim (x + δx)n − xn
=
δx → 0 δx

xn n xn−1 δx (δx)n xn
 
lim
= + + ... + −
δx → 0 δx δx δx δx

n xn−1 δx (δx)n
 
lim
= + ... +
δx → 0 δx δx

hence in the limit δx → 0, all the terms with δx vanish so that,

f 0 (x) = nxn−1

Example 7: Let the function f (x) be defined by f (x) = y = u(x)v(x),


that is, a product of two functions u and v which are functions of the variable
x, such that

y + δy = (u + δu)(v + δv)

or,

y + δy = uv + vδu + uδv + δuδv

subtracting y from both sides of the equation and dividing each term by δx,

δy δu δv δuδv
= v + u +
δx δx δx δx
and on application of the limit δx → 0, δu → 0 and δv → 0. The term with
δuδv vanishes so that one gets the derivative of the function,

48
dy lim δy du dv
= = v + u
dx δx → 0 δx dx dx

which is the product rule in Equation (2.11).

Assignment 3: Let the function f (x) be defined by,

u(x)
f (x) = y =
v(x)

show that the derivative of the function is given by,

   
du dv
v dx
− u dx
dy
f 0 (x) = =
dx v2
In the following examples we shall apply differentiation formulae to find the
derivative of some functions.

Example 8: Consider the follwing functions,

(a) y = 4x3 − 2x4 (b) y = 2x2 sin x

their derivatives are evaluated as follows,

dy
(a) y = 4x3 − 2x4 = 12x2 − 8x3
dx
For the function in (b) y = 2x2 sin x, let u = 2x2 and v = sin x, so
that the function can be expressed as a product of the two functions, that is
y = uv. Making use of the product rule in Equation (2.11), the derivative of
the function is,

dy du dv
= v + u = 4x sin x + 2x2 cos x
dx dx dx

49
Example 9: Consider the following function,

2x
y =
2 + x
The function can be expressed in form of a ratio of two functions,

u(x)
y =
v(x)
where u(x) = 2x and v(x) = 2 + x. The derivatives of the functions u(x) and
v(x) are as follows,

du dv
= 2 = 1
dx dx
The quotient rule in Equation (2.12) can therefore be applied to determine
the derivative of the function y as follows,

du dv
− u
 
dy d u v dx dx
= =
dx dx v v2

2(2 + x) − 2x 4
= 2
=
(2 + x) (2 + x)2

Assignment 4: Find the derivative of the following functions,

(a) y = 2x cos x

3x2
(b) y =
x + 1

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

50
SPH103 Mathematics for Physics
Lecture No. 6. Date:
Outline
• Techniques for differentiation
• Stationary points on a curve
Besides the product rule and the quotient rule there are other useful tech-
niques for differentiation of functions. In the next examples, we shall learn
about the chain rule and implicit differentiation.

Chain rule: Consider a function y, which is a function of u and u is a


function of x, that is y = y(u) and u = u(x). The derivative of the function
y with respect to the variable x is obtained as follows,
dy dy du
= · (2.15)
dx du dx
which is known as the chain rule, and can be extended to more functions.

Example 1: Consider the function defined by,

y = sin3 x

The function can be written as follows,

y = u3 where u = sin x

so that the derivative of the function y with respect to x is evaluated using


the chain rule in Equation (2.15) as follows,

dy du
= 3u2 = 3 sin2 x = cos x
du dx
hence,
dy dy du
= · = 3 sin2 x cos x
dx du dx

Assignment 1: Find the derivative of y = sin x3 with respect to x.

51
Example 2: Consider the function defined by,

2
y = ex

The function can be written as follows,

y = eu where u = x2

so that with the following derivatives,

dy d u 2 du
= e = eu = ex = 2x
du du dx
the derivative of y with respect to x is,
dy dy du 2
= · = 2x ex
dx du dx
Note the following formula for the derivative of an exponential function,
d x
e = ex (2.16)
dx
(show this!)
2
Assignment 2: Find the derivative of y = esin x with respect to x.

Differentiation of parametric equations: It is often useful to describe


a system by a set of parametric equations. These equations, or functions,
relate the variables of the system in an implicit form. The process of differ-
entiating these functions, also known as implicit differentiation, is illustrated
in the next examples.

Example 3: Consider the motion of a particle on a curve, such that the


position coordinates of the particle are described by the parametric equations
x = 2t2 + 1 and y = 10t. Both are functions of the variable t (= time). The
derivative of the function y can be evaluated as follows,

dy dy dt 10
= · =
dx dt dx 4t

52
Assignment 3: Acurve is defined by the parametric equations,

x = (t + 3)2 and y = t3 . Find the derivative of y with respect to x.

Next, consider a circle of radius r with its centre at the origin of the x -
y plane as illustrated on Figure 2.4.

Figure 2.4: Sketch of a circle of radius r at the origin of the x - y plane.

The point P on the circle has coordinates (x, y) such that,

x = r cos θ y = r sin θ (2.17)


represent the parametric equations describing the circle. The equation of the
circle is usually expressed in implicit form as follows,

x2 + y 2 = r2 (cos2 θ + sin2 θ) = r2 (2.18)


such that the derivative with respect to x can be taken on both sides,

d 2 d 2 d 2
x + y = r
dx dx dx

dy
2x + 2y = 0
dx
and hence,
dy x
= − (2.19)
dx y
which provides the gradient of the curve at the point (x, y).

53
Consider the circle illustrated on Figure 2.4. The angle θ made by the
line joining the point P(x, y) to the origin and the x - axis can be evaluated
using the coordinates of the point as follows,
 
−1 y
θ = tan (2.20)
x
or by using the parametric equations in (2.17) and the gradient at the point
as follows,

dy dy dθ r cos θ
= · = = − cot θ
dx dθ dx −r sin θ
or,
   
−1 dy −1 x
θ = cot = cot − (2.21)
dx y

Example 4: Consider a circle described by the equation,

x2 + y 2 = 25

with the centre at the


√ origin of the x-y plane. The radius of the circle is
evaluated from r = 25 = 5. Next consider the point (3,4) which lies on the
circle. The angle θ is calculated as follows,

   
−1 y −1 4
θ = tan = tan ' 530
x 3

and the gradient is,

dy x 3
= − = −
dx y 4

which also represents the gradient or slope of the tangent at the point (3,4)
as illustrated on Figure 2.5.

54
Figure 2.5: Sketch of a circle of radius r at the origin of the x - y plane, with
a tangent at the point P(3,4).

Note that the tangent makes a right angle, that is 900 , with the line joining
the point P and the origin (0,0). Considering another point Q(x, y) which lies
on the tangent, then the equation for the tangent is determined as follows,

dy y − 4 3
= = −
dx x − 3 4
or,

25 3
y = − x
4 4
This technique can be applied to find the equation of the tangent at any
point on a curve as illustrated in the next example.

Example 5: Consider the point (1,2) that lies on the curve described by,

2x3 + y 2 − 2x + 3y = 10

The gradient at any point on the curve is obtained by taking the derivative
with respect to x on both sides of the equation describing the curve,

 
d 3 2 d
2x + y − 2x + 3y = (10)
dx dx

55
dy dy
6x2 + 2y − 2 + 3 = 0
dx dx
or,

dy 2 − 6x2
=
dx 2y + 3

and at the point (1,2),

dy 2 − 6 4
= = −
dx 4 + 3 7
The equation of the tangent at this point is obtained by considering a point
(x, y) on the curve so that,

dy y − 2 4
= = −
dx x − 1 7
or,

18 4
y = − x
7 7

Assignment 4: The point (1,3) lies on the circle described by,

x2 + y 2 = 10

Find the equation of the tangent at the point (1,3) on the circle.

56
Stationary points on a curve: As already observed, the derivative of
a function provides the gradient of the curve described by the function. The
gradient represents the rate of change of the dependent variable, for example
y, with respect to the independent variable, for example x. If the derivative
is zero at any point on the curve, then the point is termed as a turning point
or stationary point on the curve. That is, the rate of change of the variables
is zero. A stationary point can either be a maximum, a minimum or a point
of inflection on the curve. Consider a function y = f (x) illustrated on Figure
2.6.

Figure 2.6: Sketch of a function with stationary points A, B, and C.

The curve of the function y = f (x) has three stationary points,

• A - a maximum, the value of the function y = f (x) decreases in both


directions from this point,

• B - a point of inflection, the function y = f (x) decreases on one side


and increases on the other side of this point,

• C - a minimum, the value of the function y = f (x) increases in both


directions from this point.

Note that at the stationary points,


dy
f 0 (x) = = 0 (2.22)
dx

57
The second derivative of the function provides a means to investigate the
nature of the stationary points, that is,

00 d2 y
f (x) = < 0 for a maximum (2.23)
dx2
d2 y
f 00 (x) = = 0 for a point of inflection (2.24)
dx2
d2 y
f 00 (x) = > 0 for a minimum (2.25)
dx2
These concepts are illustrated in the following examples.

Example 6: Consider the function y = x2 − 4x. The first derivative is,

dy
f 0 (x) = = 2x − 4
dx
so that using the condition for stationary points in Equation (2.22),
2x − 4 = 0, the point x = 2 represents the stationary point on the curve.

Note that the second derivative,

d2 y
f 00 (x) = = 2
dx2
is greater than zero, hence the stationary point is a minimum. The curve of
this function is illustrated on Figure 2.7

58
Figure 2.7: Illustration of the function y = x2 − 4x. Note the minimum at
x = 2.

Example 7: Consider a curve described by the function,

y = 2x3 − 3x2 − 36x + 2

The first derivative is,


dy
f 0 (x) = = 6x2 − 6x − 36
dx
so that using the condition for stationary points in Equation (2.22),
6x2 − 6x − 36 = 0

which can be expressed as,


(x − 3)(x + 2) = 0

showing that the function has two stationary points, x = −2 and x = 3.

The nature of the stationary points is investigated using the second derivative
as follows,

d2 y
f 00 (x) = = 12x − 6
dx2
at the point x = −2,

00 d2 y
f (−2) = = 12(−2) − 6 = −30 a maximum
dx2
59
at the point x = 3,

d2 y
f 00 (3) = = 12(3) − 6 = 30 a minimum
dx2
The curve of this function is illustrated on Figure 2.8

Figure 2.8: Illustration of the function y = 2x3 − 3x2 − 36x + 2. Note the
maximum at x = −2 and the minimum at x = 3.

Assignment 5: A function f (x) is defined as follows,


x3
f (x) = − 2x2 − 5x
3
(i) Determine the first derivative of f (x) with respect to x and find
the stationary point(s) on the curve of f (x),

(ii) Determine the second derivative of f (x) with respect to x and


investigate the nature of the stationary points.

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

60
SPH103 Mathematics for Physics
Lecture No. 7. Date:
Outline

• Examples

• Partial differentiation

Example 1: Consider a body of mass m attached to a spring such that


it oscillates about the point x = 0 on the x-axis as illustrated on Figure 2.9

Figure 2.9: A sketch of a simple harmonic oscillator

This is an example of a simple harmonic oscillator and the body experiences


a potential force field described by,
1
V (x) = k x2 k > 0 spring constant (2.26)
2
which tends to restore the body to the point x = 0. At the stationary point
the first derivative of the potential is zero, that is,

dV
V 0 (x) = = kx = 0
dx
hence the point x = 0 represents the stationary point for the body.
The nature of the stationary point is investigated using the second derivative
of the potential as follows,

d2 V
V 00 (x) = = k
dx2
since k > 0, the stationary point x = 0 is a point of stable equilibrium for
the body.

61
Example 2: Consider a particle moving on the x-axis in a force field
described by the potential,
V (x) = x2 (6 − x)

The first derivative of the potential is,


dV
V 0 (x) = = 12x − 3x2
dx
so that at equilibrium,
dV
= 12x − 3x2 = 0
dx
which means the point x = 0 is a point of equilibrium, and also from,
12x = 3x2

x = 4 is another point of equilibrium. The nature of these points of equilib-


rium are investigated using the second derivative of the potential as follows,

d2 V
V 00 (x) = = 12 − 6x
dx2
so that at the point x = 0,
d2 V
= 12 − 6(0) = 12 a minimum
dx2
and at the point x = 4,

d2 V
= 12 − 6(4) = −12 a maximum
dx2
as illustrated on Figure 2.10. Note that a system of particles in a conservative
force field will be in stable equilibrium when the potential V is a minimum.

62
Figure 2.10: Illustration of the potential function V (x) = x2 (6 − x). Note
the minimum at x = 0 and the maximum at x = 4.

Example 3: The displacement of a particle at any time t(s) is given by,


x(t) = t (t − 2)2 m

The particle’s velocity is obtained from the first derivative of x(t),


dx
ẋ = = (t − 2) (3t − 2)
dt
so that at the stationary point(s)
dx
= (t − 2) (3t − 2) = 0
dt
a condition which is satisfied at the values t = 2 and t = 2/3.

The particle’s acceleration is obtained from the second derivative of x(t),


d2 x
ẍ = = 6t − 8
dt2
so that at t = 2,
d2 x
2
= 6(2) − 8 = 4 ms−2 a minimum
dt
and at t = 2/3,
d2 x
= 6(2/3) − 8 = − 4 ms−2 a maximum
dt2

63
Partial differentiation: In cases where a function has more than one
variable, the technique of partial differentiation is applied to determine the
derivative of the function. In this technique the differentiation is performed
with respect to only one variable at a time, that is, holding the other vari-
ables as constants. In general if f (x1 , x2 , ..., xn ) is a function of n number of
variables, then the total derivative of the function is expressed as follows,
n
X ∂f ∂f ∂f ∂f
df = dxi = dx1 + dx2 + ... + dxn (2.27)
i=1
∂x i ∂x 1 ∂x 2 ∂x n

where,
∂f
∂xi
denotes the partial derivative of the function f (x1 , x2 , ..., xn ) with respect to
the variable xi (i = 1, 2, ..., n). The following examples illustrate the tech-
nique of partial differentiation.

Example 4: Consider the function u(x, y) defined as follows,


u(x, y) = 2x3 − x2 y + 2y 2

The partial derivative of the function u(x, y) with respect to x is obtained


by considering the variable y as constant and performing the differentiation
as follows ,

∂u
= 6x2 − 2xy
∂x
and the partial derivative of the function u(x, y) with respect to y is obtained
by considering the variable x as constant and performing the differentiation
as follows ,

∂u
= 4y − x2
∂y
so that the total derivative du is obtained as follows,

∂u ∂u
du = dx + dy
∂x ∂y

64
or,

du = (6x2 − 2xy) dx + (4y − x2 ) dy

Note that due care must be taken not to mix the terms containing dx and dy.

Example 5: Consider the function f (x, y, z) defined by,

f (x, y, z) = x2 yz + x2 y 3 + xy 3 sin x

The partial derivative of f (x, y, z) with respect to x is,

∂f
= 2xyz + 2xy 3 + y 3 sin x + xy 3 cos x
∂x
note the partial derivative of the last term of f (x, y, z),


(xy 3 sin x) = y 3 sin x + xy 3 cos x
∂x
The partial derivative of f (x, y, z) with respect to y is,

∂f
= x2 z + 3x2 y 2 + 3xy 2 sin x
∂y

and the partial derivative of f (x, y, z) with respect to z is,

∂f
= x2 y
∂z

65
Assignment 1: Consider the function u(x, y) defined by,

u(x, y) = 3x3 − 2x2 y + 4y 2

Find the partial derivatives,

∂u ∂u
and
∂x ∂y
Hence find the total derivative du.

Higher order partial derivatives are obtained by successive partial differentia-


tion of the function being studied. For example, consider the function f (x, y)
so that,

∂ 2f
 
∂ ∂f
= (2.28)
∂y∂x ∂y ∂x
or,

∂ 2f
 
∂ ∂f
= (2.29)
∂x∂y ∂x ∂y
Note the order of performing the partial differentiation. For some functions,
the order in which the partial differentiation is performed does not matter,
that is,

∂ 2f ∂ 2f
= (2.30)
∂y∂x ∂x∂y
as illustrated in the next example.

Example 6: Consider the function f (x, y, z) defined by,

f (x, y, z) = x3 y 2 + x4 y 3 + z 4

An investigation of the result in Equation (2.30) requires the determination


of the following second order partial derivatives,

∂ 2f
 
∂ 2 2 3 3
= 3x y + 4x y = 6x2 y + 12x3 y 2
∂y∂x ∂y

66
∂ 2f
 
∂ 3 4 2
= 2x y + 3x y = 6x2 y + 12x3 y 2
∂x∂y ∂x

showing that,

∂ 2f ∂ 2f
=
∂y∂x ∂x∂y

Assignment 2: The function f(x,y) is defined as follows;

f (x, y) = 4x3 y 2 + 6y 3

Find,

(a) the partial derivatives, ∂f ,


∂f
∂x ∂y

(b) the total derivative df

hence show that,

∂ 2f ∂ 2f
=
∂y ∂x ∂x ∂y

67
Stationary points in two-dimensional functions: Consider the func-
tion f (x1 , x2 , ..., xn ) of n variables. The following condition is required at the
stationary points,
∂f
f xi = = 0 for all xi (2.31)
∂xi
Note the use of the symbol fxi to denote the first order partial derivative of
the function f (x1 , x2 , ..., xn ) with respect to the variable xi .

An investigation of the nature of stationary points for such a function of


many variables requires the knowledge of the eigenvectors and eigenvalues
of matrices. This is rather beyond the scope of a first year undergraduate
course in mathematical physics, hence we will only consider functions of two
variables, that is two-dimensional functions.

For example, consider the function f (x, y) such that the condition for
stationary points in Equation (2.31) requires,
∂f ∂f
fx = = 0 and fy = = 0 (2.32)
∂x ∂y
so that the nature of the stationary points can be investigated as follows,
2
• a minimum if fxy < fxx fyy , fxx > 0 and fyy > 0
2
• a maximum if fxy < fxx fyy , fxx < 0 and fyy < 0
2
• a saddle point if fxy < fxx fyy

Note the use of the symbols,

     
∂ ∂f ∂ ∂f ∂ ∂f
fxx = fyy = fxy =
∂x ∂x ∂y ∂y ∂x ∂y

Points of inflection in two-dimensional functions are reffered to as saddle


points and in some cases one observes,

∂ 2f ∂ 2f
fxx = = 0 and fyy = = 0 (2.33)
∂x2 ∂y 2
However, these conditions do not neccessarily imply the presence of saddle
points.

68
Example 5: Find the stationary points of the function,

f (x, y) = x3 + xy 2 − 12x − y 2

and identify their nature.

Source: K.F. Riley, M.P. Hobson and S.J. Bence. Mathematical methods
for physics and engineering. Cambridge University Press. (1998) Page 126.
Q 4.5

The partial derivatives of the function f (x, y) are as follows,

∂f
= 3x2 + y 2 − 12
∂x

∂f
= 2xy − 2y
∂y
so that at the stationary points,
∂f
= 3x2 + y 2 − 12 = 0 (2.34)
∂x
∂f
= 2xy − 2y = 0 (2.35)
∂y
From the Equation (2.35) one identifies the points y = 0, x = 1 being some of
the coordinates of the stationary points. Using the value y = 0 in Equation
(2.34),

3x2 − 12 = 0 or x = ±2

hence the points (2,0) and (-2,0) are stationary points. Also using the value
x = 1 in Equation (2.34),

3 + y 2 − 12 = 0 or y = ±3

hence the points (1,3) and (1,-3) are also stationary points.

69
The nature of the stationary points is investigated using the second order
partial derivative as follows,

∂ 2f
= 6x
∂x2
so that at x = 2
∂ 2f
= 6(2) = 12 a minimum
∂x2
and at x = −2
∂ 2f
= 6(−2) = −12 a maximum
∂x2
Also note that at the points (1,3) and (1,-3)
∂f
= 0
∂x
indicating that they are saddle points. The function is illustrated on the
Figure 2.11.

Figure 2.11: Illustration of the function f (x, y) = x3 + xy 2 − 12x − y 2 . Note


the minimum at x = 2 and the maximum at x = −2.

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

70
SPH103 Mathematics for Physics
Lecture No. 8. Date:
Outline

• partial differentiation

Example 1: Find the stationary points of the function,

f (x, y) = x3 exp −x2 − y 2




and identify their nature.

Since this is a two dimensional function, one has to consider the partial
derivatives of the function. But first it is convenient to express the function
as follows,

f (x, y) = uv

where u = x3 , v = ew and w = −x2 − y 2 so that using the product rule, the


partial derivative of f (x, y) with respect to x is,

∂f ∂v ∂u
= u + v
∂x ∂x ∂x
that is,
 
∂f (−x2 − y 2 ) 2 2
3
= x · −2x e + e(−x − y ) · 3x2
∂x
or,
∂f 2 2
= (3x2 − 2x4 ) e(−x − y )
∂x
Note that the partial derivative of the function v with respect to x is obtained
using chain rule as follows,
∂v ∂v ∂w 2 2
= · = −2x e(−x − y )
∂x ∂w ∂x

71
Similarly, the partial derivative of the function v with respect to y is obtained
using chain rule as follows,
∂v ∂v ∂w 2 2
= · = −2y e(−x − y )
∂y ∂w ∂y

so that the partial derivative of the function f (x, y) with respect to y is,

∂f ∂v ∂u
= u + v
∂y ∂y ∂y
that is,
∂f 2 2
= − 2x3 y e(−x − y )
∂y
At the stationary points one requires,
∂f 2 2
= (3x2 − 2x4 ) e(−x − y ) = 0 (2.36)
∂x
∂f 2 2
= − 2x3 y e(−x − y ) = 0 (2.37)
∂y
The condition in Equation (2.37) requires x = 0 or y = 0, and the condition
in Equation (2.36) requires,
p
(3x2 − 2x4 ) = 0, hence x = 0 or x = ± 3/2.
p
Therefore the stationary points are (0, 0) and (± 3/2, 0). The nature of the
stationary points is investigated using the second order partial derivatives as
follows,

∂ 2f 2 2

2
= (4x5 − 14x3 + 6x) e(−x − y )
∂x

∂ 2f 2 2

2
= x3 (4y 2 − 2) e(−x − y )
∂y

∂ 2f 2 2
= 2x2 y(2x2 − 3) e(−x − y )
∂x ∂y

72
At the point (0, 0)
∂ 2f ∂ 2f ∂ 2f
= = = 0
∂x2 ∂y 2 ∂x ∂y
p
and at the points (± 3/2, 0)
∂ 2f p
= ∓ 6 3/2 e(−3/2)
∂x2

∂ 2f p
= ∓ 3 3/2 e(−3/2)
∂y 2

∂ 2f
= 0
∂x ∂y
p
Therefore the point
p (0, 0) is an undetermined stationary point, (− 3/2, 0)
is minimum and ( 3/2, 0) is a maximum as illustrated in Figure 2.12.


Figure 2.12: Illustration of the function f (x, y) = x3 exp −x2 − y 2 . Note
p p
the minimum at (− 3/2, 0) and the maximum at ( 3/2, 0) .

Recall that x3 is an odd function, and hence the minimum obtained for neg-
ative values of x is due to the contribution x3 term in the function f (x, y).

Note: this example is adapted from: K.F. Riley, M.P. Hobson and S.J.
Bence. Mathematical methods for physics and engineering. Cambridge Uni-
versity Press. (1998) Page 113.

73
Some relations in partial differentiation: Consider the variables
x, y, z to be related such that x is a function of y and z, while y is itself a
function of x and z. That is,

x = x(y, z) and y = y(x, z)

so that the total derivatives dx and dy are as follows,


   
∂x ∂x
dx = dy + dz (2.38)
∂y z ∂z y
   
∂y ∂y
dy = dx + dz (2.39)
∂x z ∂z x
in which, ∂x

∂y z
is the partial derivative of x with respect to y keeping z
constant. Similar definitions for the other terms apply.

Replacing the Equation (2.39) for dy in the Equation (2.38), one gets

        
∂x ∂y ∂y ∂x
dx = dx + dz + dz
∂y z ∂x z ∂z x ∂z y

or,
        
∂x ∂y ∂x ∂y ∂x
dx = dx + + dz (2.40)
∂y z ∂x z ∂y z ∂z x ∂z y

Holding z constant, that is dz=0, in the Equation (2.40), one gets


  
∂x ∂y
dx = dx
∂y z ∂x z

implying that,    −1


∂x ∂y
= (2.41)
∂y z ∂x z
which is known as the reciprocity relation.

74
Setting dx=0 in the Equation (2.40), that is,
      
∂x ∂y ∂x
+ dz = 0
∂y z ∂z x ∂z y

and since dz 6= 0, one gets the result,


    
∂x ∂y ∂x
= − (2.42)
∂y z ∂z x ∂z y

Note the reciprocity relation,


 −1  
∂x ∂z
=
∂z y ∂x y

∂x −1

so that multiplying both sides of the Equation (2.42) by ∂z y
, one gets,
    
∂x ∂y ∂z
= −1 (2.43)
∂y z ∂z x ∂x y
which is known as the cyclic relation and is particularly useful, for example,
in thermodynamics.

Example 2: According to the first law of thermodynamics, the change


in internal energy dU of a substance is given by,

dU = T dS − P dV (2.44)

where U, T, S, P, V are the internal energy, temperature, entropy, pressure


and volume of the substance respectively. Consider the internal energy U to
be a function of the entropy S and volume V , that is U = U (S, V ). Find an
expression for the total derivative dU and hence show one of the Maxwell’s
relations,
   
∂T ∂P
= −
∂V S ∂S V

75
Given that U = U (S, V ) then the total derivative dU is,
   
∂U ∂U
dU = dS + dV (2.45)
∂S V ∂V S
which can be compared with Equation (2.44) to get,
   
∂U ∂U
= T and = −P (2.46)
∂S V ∂V S
Using the relation,

∂ 2U ∂ 2U
= (2.47)
∂V ∂S ∂S ∂V
which can also be expressed as,

   
∂ ∂U ∂ ∂U
=
∂V ∂S V ∂S ∂V S
and also using the relations in Equation (2.46), one gets,

   
∂T ∂P
= −
∂V S ∂S V

which is the required Maxwell’s relation. The physics content in this exam-
ple is clearly beyond the scope for first year undergraduate work, but the
mathematical skills gained will be useful for the undergraduate courses in
thermodynamics. This should help to make the learning of advanced physics
topics more enjoyable.

Assignment 1: Show that (∂S/∂V )T = (∂P/∂T )V .

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

76
Chapter 3

Calculus II

• Lecture No. 9: Integration, techniques of integration

• Lecture No. 10: Applications of calculus

77
SPH103 Mathematics for Physics
Lecture No. 9 Date:
Outline

• integral calculus

• techniques for integration

Integral calculus: Consider the function f (x) defined by the following


derivative,
dy
= f (x) (3.1)
dx
The function y is refferred to as the indefinite integral of the function f (x)
and is described by,
Z
y = f (x) dx (3.2)
R
where the symbol denotes the process of integration.

Note that the Equation (3.2) is obtained by taking integrals with respect to
x on both sides of the Equation (3.1). The process of finding the integral
of a function is known as integration and is the inverse of the process of
differentiation.

The definite integral of the function f (x) between the limits x = a and x = b
is denoted by,
Z b
I = f (x) dx (3.3)
a

with the condition that the integral exists only if the function f (x) is con-
tinuous in the interval a ≤ x ≤ b.

The function f (x) , also refferred to as the integrand, may take the form of
a polynomial, rational, trigonometric, logarithmic, exponential or any other
function. In the next sections we will consider various techniques to perform
the integration of these functions.

78
Consider the function f (x) which is continuous in an interval a ≤ x ≤ b as
sketched on the Figure 3.1.

Figure 3.1: Sketch of a function f (x). The shaded area represents the inte-
gration of the function f (x) in the interval a ≤ x ≤ b.

Geometrically, the integration in Equation (3.3) represents the area under


the curve of the function f (x) between the limits x = a and x = b as illus-
trated in the Figure 3.1.

The integration of a function f (x) is expressed as,


Z
f (x) dx = F (x) + C (3.4)

where C represents the constant of integration. For a definite integral,


Z b
I = f (x) dx = F (b) − F (a) = F |ba . (3.5)
a

You may recall that in general, if a is a constant, then,


axn+1
Z
axn dx = + C (3.6)
n+1
so that for example, if f (x) = 2x2 , then,
2x3
Z Z
f (x) dx = 2x2 dx = + C.
3
Note that the derivative of the results of integration leads to the function
f (x), that is,
d 2x3
 
+ C = 2x2 = f (x)
dx 3
showing that differentiation is indeed the inverse of the process of integration.

79
Next, we consider the functions f (x) and g(x) to be continuous in the interval
a ≤ x ≤ c such that the point x = b lies within this interval. The following
are some useful properties of definite integrals,
Z b
0 dx = 0 (3.7)
a
Z b Z a
f (x) dx = − f (x) dx (3.8)
a b
Z c Z b Z c
f (x) dx = f (x) dx + f (x) dx (3.9)
a a b
Z b  Z b Z b
f (x) + g(x) dx = f (x) dx + g(x) dx (3.10)
a a a
In order to investigate these properties of definite integrals, consider the
function f (x) = 2x2 such that,

Z 2 Z 2  2
2 3
2 2 14
f (x) dx = 2x dx = x = (23 − 1) =
1 1 3 1 3 3
and,
Z 1 Z 1  1
2 3
2 2 14
f (x) dx = 2x dx = x = (1 − 23 ) = −
2 2 3 2 3 3
showing that,
Z 2 Z 1
f (x) dx = − f (x) dx
1 2

which is in agreement with the Equation (3.8).

Assignment 1: Consider the two functions f (x) = 2x2 and g(x) = 3,


show that,
Z 3 Z 2 Z 3
f (x) dx = f (x) dx + f (x) dx
1 1 2

Z 2  Z 2 Z 2
f (x) + g(x) dx = f (x) dx + g(x) dx
1 1 1

80
Techniques for integration:

In general, if the integrand in an integration can be expressed as a quotient


of two functions, such that the numerator is a derivative of the denominator,
then the integral results in a logarithmic function. That is,
Z 0
f (x)
dx = lnf (x) + C (3.11)
f (x)
which is an important result that is applicable in many other techniques for
integration (show this!)

Example 1: Consider the following integral,

Z
x
dx.
x2
The numerator of the integrand can be expressed as a derivative of the de-
nominator so that using Equation (3.11),

Z Z
x 1 2x 1
2
dx = 2
dx = lnx2 + C
x 2 x 2

Example 2: Consider the following integral,

6x2 + 2 cos x
Z
dx.
x3 + sin x
The numerator of the integrand can be expressed as a derivative of the de-
nominator so that using Equation (3.11),

6x2 + 2 cos x 3x2 + cos x


Z Z
dx = 2 dx = 2 ln(x3 + sin x) + C
x3 + sin x x3 + sin x

81
Integration by substitution of variables: This technique involves a
change of variables in order to simplify the integrand in an integration. The
technique is often useful in performing complicated integrations as illustrated
in the next examples.

Example 3: Consider the following integral,

Z
x
dx
x2

If we introduce another variable u = x2 such that,

du
= 2x or du = 2x dx
dx
and make the appropriate substitutions, then the integral becomes,

Z Z
x 1 2x
2
dx = dx
x 2 x2

Z
1 du
=
2 u

1
= ln u + C
2

1
= ln x2 + C
2
in agreement with the previous result.

Assignment 2: Evaluate the following integral,


Z 3
x
2
dx
0 x + 1

82
Example 4: Consider the following integral,

Z
1
√ dx
1 − x2
If we let x = sin u such that,

dx
= cos u or dx = cos u du
du
and make the appropriate substitutions, then the integral becomes,

Z Z
1 1
√ dx = p cos u du
1 − x2 1 − sin2 u
At this point you may recall that,

sin2 u + cos2 u = 1 or 1 − sin2 u = cos2 u

so that the integration is,

Z Z
1 1
p cos u du = √ cos u du = u + C
1 − sin2 u cos2 u

and hence,

Z
1
√ dx = sin−1 x + C
1 − x2
which is a standard integral.

Assignment 3: Show that,

−1
Z
√ dx = cos−1 x + C
1 − x 2

83
In general, the standard integral obtained in the Example 4 of Lect. No. 16,
is expressed as follows,

Z  
1 −1 x
√ dx = sin + C
a2 − x 2 a
where a is a constant. To show this, we proceed in a similar way, that is let

x
= sin u such that,
a

1 dx
= cos u or dx = a cos u du
a du
so that on re-writing the integral,

Z Z
1 1 1
√ dx = q dx
a − x2 a 1 − x2
a2

and making the appropriate substitutions, one gets,

Z Z
1 1 1 a cos u
q dx = du = u + C
a 1 − x2 a cos u
a2

and hence,

Z  
1 −1 x
√ dx = sin + C
a2 − x 2 a

which is the required standard integral.

Assignment 4: Show that,

 
−1
Z
−1 x
√ dx = cos + C
a2 − x 2 a

84
Integration by parts: Recall the product rule in the Equation (2.11)
for differentiation,

d dv du
(u v) = u + v
dx dx dx
so that on integrating both sides with respect to x and re-arranging the terms
to get,
Z Z
dv du
u dx = uv − v dx (3.12)
dx dx
which is useful when the integrand can be expressed in terms of two func-
tions such that one of the functions is considered as a derivative of another
function. This technique is illustrated in the next example.

Example 5: Consider the following integral,

Z
x sin x dx

In this case it is convenient to let u = x and,

dv
= sin x or v = − cos x
dx
so that using the Equation (3.12) for integration by parts,

Z Z
x sin x dx = −x cos x − − cos x dx = −x cos x + sin x + C

85
Integration using partial fractions: In this technique, the integrand
is usually a fraction that can be written as a sum of two or more simpler
fractions, that is, partial fractions of the integrand. This makes the integra-
tion easier to handle as illustrated in the next example.

Example 6: Consider the following integral,

Z
1
dx
x2 + x

The denominator can be expressed as x(x + 1) so that the integrand is,


1 1 1 1
= = −
x2 + x x(x + 1) x x + 1

and the integration is therefore,


Z Z  
1 1 1
dx = − dx
x2 + x x x + 1

Z   Z  
1 1
= dx − dx
x x + 1

= ln x − ln(x + 1) + C

 
x
= ln + C
x + 1

Assignment 5: Evaluate the following integral,

Z
3
dx
x2 + x

86
Example 7: Consider the following integral,

Z
6
dx
x2 + 4x − 5
The denominator can be factorised as (x − 1)(x + 5) so that the integrand is,
6 6 A B
= = +
x2 + 4x − 5 (x − 1)(x + 5) x − 1 x + 5
where the constants A and B are evaluated as follows,
6 A(x + 5) + B(x − 1)
=
(x − 1)(x + 5) (x − 1)(x + 5)
or simply equating the numerators on both sides of the equation,

6 = A(x + 5) + B(x − 1)

if x = 1, then 6 = 6A or A = 1. Similarly, if x = −5, then 6 = −6B, or


B = −1, so that the integral is,
Z Z  
6 1 1
dx = − dx
x2 + 4x − 5 x − 1 x + 5

Z   Z  
1 1
= dx − dx
x − 1 x + 5

= ln(x − 1) − ln(x + 5) + C

 
x − 1
= ln + C
x + 5

Note that in the two examples, the numerator of the integrand is of a lower
degree than the denominator. Some rational functions in the integrand can
be such that the degree of the numerator is equal to or greater than that
of the denominator. In such cases one has to clearly identify any repeated
functions and make use of the appropriate form of partial fractions. Such
detailed treatments of partial fractions are not included in this course.

87
Example 8: Consider the following integral,

Z
5x
dx
3x2+ 4

If we let u = 3x2 + 4 so that, du = 6x dx the integral can be evaluated by


change of variables as follows,
Z Z
5x 5 6x
2
dx = 2
dx
3x + 4 6 3x + 4

Z
5 du 5
= = ln u + C
6 u 6
and hence,
Z
5x 5
dx = ln(3x2 + 4) + C
3x2+ 4 6

Example 9: Consider the following integral,

Z
x ln x dx

This integration is conveniently evaluated by parts as follows. Let,


dv
u = ln x and, = x
dx
so that,

du 1 x2
= and, v =
dx x 2
Making use of Equation (3.12) for the integration by parts,
Z Z
dv du
u dx = uv − v dx
dx dx

88
the integral becomes,

x2
Z Z  2 
x 1
x ln x dx = ln x − · dx
2 2 x

x2 x2
Z
x ln x dx = ln x − + C
2 4

Assignment 6: Evalutate the following integral,

Z
sin θ
(i) dθ
1 − cos θ

Z
(ii) x2 e−x dx

Z
(iii) sin−1 x dx

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

89
SPH103 Mathematics for Physics
Lecture No. 10 Date:
Outline

• applications of calculus

The mean value of a function: Consider a function f (x) to be con-


tinuous in the interval a ≤ x ≤ b. The mean value m of the function in the
given interval is defined as follows,
Z b
1
m = f (x) dx. (3.13)
b − a a
For example, the mean value of the function f (x) = x2 between x = 0 and
x = 2 is evaluated as follows,
Z 2  2
1 2 1 x3 4
m = x dx = = ' 1.333
2 − 0 0 2 3 0 3

The root mean square value of a function: The mean value of a


function defined in the expression (3.13) clearly takes into account the sign
of the function f (x). It is often useful, for example in engineering sciences, to
calculate an average value of a function by considering the numerical value
of the function and not it’s sign. This is achieved by squaring the function
f (x) and calculating the mean value followed by the square root of the result,
that is,
 Z b  21
1 2
mrms = f (x) dx (3.14)
b − a a

which is known as the root mean square value of the function or simply the
r.m.s. value of the function. Note that for the function f (x) = x2 between
x = 0 and x = 2, the r.m.s value is,
2  12 2  21  12
1 x5 1 25
 Z  
1 4
mrms = x dx = · = · ' 1.788
2 − 0 0 2 5 0 2 5

which is clearly higher than the mean value of the function.

Assignment 1: Find the r.m.s. value of sin x for 0 ≤ x ≤ π2 .

90
The length of a curve: Consider the curve of the function y = f (x)
sketched in Figure 3.2 such that the distance ∆S on the curve results from
small the small changes ∆x and ∆y.

Figure 3.2: Illustration of the length of a curve

Note that,

p
∆S = (∆x)2 + (∆y)2

so that in the limit ∆x → 0,

s  2
dS dy
= 1 +
dx dx

hence the length of the curve is,


s 2
Z b 
dy
S = 1 + dx (3.15)
a dx
For example, the length of the curve y = x3/2 from x = 0 to x = 2 is
calculated as follows,
Z 2s     32 
9 8 11
S = 1 + x dx = − 1
0 4 27 2

(verify this!)

91
The surface and volume of revolution: Consider the curve y = f (x)
to be rotated about the x-axis, as illustrated on the Figure 3.3.

Figure 3.3: The surface area of a curve rotated about the x-axis

The total surface area is obtained as follows,


Z b
A = 2πyds (3.16)
a
and the volume is obtained as follows,
Z b
V = πy 2 dx (3.17)
a
Note that for the curve y = 2x the volume enclosed by a length h is,

Z h
4 3
V = π4x2 dx = πh
0 3
which represents the volume of a cone of length h.

92
Formulation of physical laws: As already noted, calculus provides
useful mathematical tools that enable one to study physical systems in na-
ture. This includes the rate(s) of change of the variables describing the state
of a system as illustrated in the next examples.

Example 1: Radioactive decay. According to the radioactive decay


law, the rate of change of a radioactive substance, that is radioactive decay, is
directly proportional to the amount of substance A present in the substance.
This is expressed in a mathematical form as follows,
dA
∝ A
dt
and introducing a constant of proportionality k, the decay constant,
dA
= − k A. (3.18)
dt
Note that the negative sign denotes a decrease (or decay) in the substance.
An integration with respect to t on both sides of the Equation (3.18) gives,
Z Z
dA
= −k dt
A

ln A = −kt + C (3.19)
so that with the initial condition, at t = 0, A = A0 , the constant of integration
is C = ln A0 , and hence,
 
A
ln = −kt
A0

A = A0 exp(−kt) (3.20)
which describes the amount of the radioactive substance at any time t. This
represents a simple exponential decay function describing the decrease of the
amount of radioactive substance in time as illustrated on the Figure 3.4.

93
Figure 3.4: Illustration of the exponential decay function

Note the salient features of the graph:

• at t = 0, A = A0

• the exponential decrease in A with time, and,

• after a sufficiently long time, the amount of substance reduces rather


slowly to a very small value but not to absolute zero.

Further note that the Equation (3.19) represents a linear equation of the
form,

y = mx + c

where the gradient m = −k and the y-intercept c = ln A0 . This means


that the decay constant k and the initial amount A0 can be evaluated from
measurements of the amount of substance A at different time intervals t and
plotting a graph of ln A against t. The graph will have a negative slope due
to the decrease in the amount of substance. Such data analysis skills will be
useful in laboratory experiments.

Assignment 2: The half-life T 1 of a radioactive substance is defined as


2
the time it takes for the radioactive substance to reduce to half it’s initial
value. Find a general expression for the half-life of a radioactive substance.

94
Example 2: According to Newton’s law of cooling, the rate of change in
temperature of a body is proportional to the difference in the temperature
between the body and it’s sorroundings.

(i) Using Ua and Us for the temperatures of a body and its sorround-
ings respectively, express this law in a mathematical form and find a general
expression for the temperature of the body as a function of time.

(ii) Sketch the function obtained in (i) and explain the salient features
of the graph.

We begin by expressing the law in a mathematical form as follows,


dUa
∝ Ua − Us
dt
and introducing a constant of proportionality k,
dUa 
= k Ua − Us (3.21)
dt
and integrating with respect to t,
Z Z
dUa
 dt = k dt
Ua − Us

assuming a constant temperature for the sorrounding,



ln Ua − Us = kt + C

and hence,
Ua = C exp(kt) + Us (3.22)
so that for a colder sorrounding Ua > Us then k has a negative value repre-
senting cooling of the body as illustrated on Figure 3.5.

Note that besides the salient features already observed for an exponen-
tial curve, after a sufficiently long time the body attains thermal equilibrium
with it’s sorroundings, that is, Ua ' Us .

95
Figure 3.5: Illustration of the cooling of a body.

Assignment 3: Consider Newton’s law of cooling described in the Ex-


ample 2. If a body cools from 1500 C to 1000 C in 10 minutes, find the
temperature of the body at 30 minutes. Assume the sorrounding tempera-
ture is 200 C.

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

96
Chapter 4

Vectors

• Lecture No. 11: Vectors - definitions and algebra

97
SPH103 Mathematics for Physics
Lecture No. 11. Date:
Outline

• Vectors: definitions and algebra

Definitions: A scalar is a physical quantity that can be completely spec-


ified or described by it’s magnitude only, for example: time, temperature,
density etc. A vector on the other hand, requires both a magnitude and a
direction in space to completely specify it, for example: force, velocity, ac-
celeration, electric field etc. Vectors are denoted by bold type fonts or with


an arrow, that is A or A .

Vector algebra: Consider the two vectors a and b represented by the


displacements illustrated on the Figure 4.1

Figure 4.1: Illustration of the vectors a and b

The resultant displacement of the vectors a and b is,

a + b = b + a (4.1)
which means that vector addition is commutative. Similarly,

a − b = a + (−b)

where −b is a vector of equal magnitude to b but in the opposite direction


as illustrated on the Figure 4.2.

98
Figure 4.2: Illustration of the vectors a and b

Note the associative property of vector addition,

a + (b + c) = (a + b) + c (4.2)
for any three vectors a, b, and c. Vectors can also be multiplied by a scalar
quantity, for example λ, such that,

d = λa

results into another vector d. Note also the distributive property of vector
multiplication,
e = λ (a + b) = λ a + λ b (4.3)
where e is the resulting vector.

Basis vectors: In an n-dimensional space, any vector a can be expressed


as a linear combination of the basis vectors ê1 , ê2 , ê3 ...ên as follows,
n
X
a = ai êi = a1 ê1 + a2 ê2 + a3 ê3 + ... + an ên (4.4)
i=1

The scalar quantities ai may be positive, negative or zero and are the com-
ponents of the vector a with respect to the basis êi .

99
In general, the basis of a vector space must;

1. span the vector space, that is, the number of basis vectors must be
equal to the number of dimensions in that vector space,

2. be linearly independent, that is,

n
X
ci êi = c1 ê1 + c2 ê2 + c3 ê3 + ... + cn ên 6= 0 (4.5)
i=1

for any set of coefficients ci except c1 = c2 = c3 = ... = cn = 0.

In the 3-dimensional Cartesian coordinate system (x,y,z), the unit vectors


î, ĵ, k̂ form the basis of any vector in this system. The unit vectors î, ĵ, k̂
point along the X, Y and Z-axes respectively, that is, they are mutually
orthogonal, such that any vector a can be expressed as follows,

a = ax î + ay ĵ + az k̂ (4.6)
where ax , ay , az are the components of the vector a in the x, y and z direc-
tions respectively.

The sum of two vectors a and b is therefore obtained by adding the respective
components as follows,

a + b = ( ax î + ay ĵ + az k̂) + (bx î + by ĵ + bz k̂)

that is,

a + b = ( ax + bx ) î + (ay + by ) ĵ + (az + bz )k̂

and similarly,

a − b = ( ax − bx ) î + (ay − by ) ĵ + (az − bz )k̂

Example 1: Consider the the vectors

a = 2î + 3î − 4k̂ , b = î − 3ĵ then

a + b = ( 2 + 1) î + (3 − 3) ĵ + (−4 + 0)k̂ = 3 î − 4k̂

100
The magnitude of a vector, evaluated as follows,
q
a = |a| = a2x + a2y + a2z (4.7)

is a measure of it’s length. The unit vector â in the direction of the vector a
is evaluated as follows,
a
â = (4.8)
|a|
such that the vector a can be expressed as follows,

a = λ â (4.9)

where λ is a scalar quantity equivalent to the magnitude of the vector a.

Example 2: Consider the vectors a,b in the Example 1,

a = 2î + 3î − 4k̂ b = î − 3ĵ

The magnitude of the vector a is evaluated as follows,


p √
a = |a| = 22 + 32 + (−4)2 = 29

so that the unit vector is,


1 
â = √ 2î + 3ĵ − 4k̂ .
29
Similarly, if we define the displacement vector ab as follows,

ab = b − a

that is,

ab = b − a = −î + −6ĵ + 4k̂

so that the magnitude and unit vector are determined as follows,


p √
ab = |ab| = (−1)2 + (−6)2 + 42 = 53

c = √1 −î − 6ĵ + 4k̂ .



ab
53

Note: the unit vector ab


c is in the direction of the displacement vector ab.

101
Multiplication of vectors: Consider any two vectors a and b. There
are two ways of multiplying vector quantities, namely,
1. the scalar or dot product denoted by,

a · b = |a| |b| cos θ (4.10)

2. the vector or cross product denoted by,

a × b = |a| |b| sin θ (4.11)

where θ is the angle between the two vectors.

Note: the unit vectors î, ĵ, k̂ in the Cartesian coordinate system are mutually
orthogonal, that is the angle between them is 900 as illustrated on the Figure
4.3

Figure 4.3: Illustration of the Cartesian coordinate system. Note the unit or
basis vectors î, ĵ, k̂.

It therefore follows that,

î · î = ĵ · ĵ = k̂ · k̂ = 1

î · ĵ = ĵ · k̂ = k̂ · î = 0

which is rather trivial (cos 00 = 1, cos 900 = 0) so that,

a · b = ax bx + ay by + az bz .

102
It also follows that,

î × î = ĵ × ĵ = k̂ × k̂ = 0

which is rather trivial (sin 00 = 0). Note the cyclic relations,

î × ĵ = −ĵ × î = k̂

ĵ × k̂ = −k̂ × ĵ = î

k̂ × î = −î × k̂ = ĵ

so that,
  
a × b = ay bz − az by î + az bx − ax bz ĵ + ax by − ay bx k̂

which is often expressed as a determinant of a 3 × 3 matrix as follows,

î ĵ k̂
a × b = ax ay az (4.12)
bx b y bz

from which you may readily realise that a × b = −b × a.

Note the following properties of the scalar product,

a · b = b · a commutativity (4.13)

a · (b + c) = a · b + a · c distributivity (4.14)

Assignment 4: Calculate the scalar product and vector product of the


vectors a and b in Example 1.

103
Example 3: Consider a parallelepiped of sides a and b as sketched on
the Figure 4.4.

Figure 4.4: Illustration of a parallelepiped of sides a and b.

The area of the parallelepiped is evaluated as follows,

Area = h |b|

where h = a sin θ is the height of the parallelepiped, so that the area is,

Area = a b sin θ = |a × b|

so that if a = î + 2ĵ + 3k̂ and b = 4î + 5ĵ + 6k̂ then the area is evaluated as
follows,

î ĵ k̂
a × b = 1 2 3
4 5 6

  
= 2(6) − 3(5) î − 1(6) − 3(4) ĵ + 1(5) − 2(4) k̂

= −3 î + 6 ĵ − 3 k̂

so that,
p √
area = (−3)2 + 62 + (−3)2 = 54 square units

104
Assignment 5: Show that the volume of a parallelepiped of sides a, b
and c is given by,

Volume = a · b × c

Example 4: Vector calculus and parametric equations. Consider


the motion of a particle along a curve defined by the following parametric
equations,

x = 2 t2 + 3 y = t2 z = 2t

where t = time. The position vector r of the particle at any time t is expressed
as follows,
r = x î + y ĵ + z k̂ (4.15)
and hence,

r = 2 t2 + 3 î + t2 ĵ + 2t k̂ m
  

so that the velocity at any time t is determined as follows,


 
dr d 2
 2
 
v = = 2 t + 3 î + t ĵ + 2t k̂
dt dt

v = 4 t î + 2t ĵ + 2 k̂

so that at the time t = 1 the speed of the particle is,



|v| = 42 + 22 + 22 ' 4.89 ms−1

Similarly, the acceleration of the particle at any time t is determined as


follows,
 
dv d
a = = 4 t î + 2t ĵ + 2 k̂ = 4 î + 2 ĵ
dt dt

whose magnitude is,



|a| = 42 + 22 ' 4.47 ms−2

Note: in this example there is no time-dependence in the acceleration of the


particle, that is, the acceleration is constant in time.

105
Example 5: A particle of mass m with position vector r relative to
some origin O, experiences a force F which produces a torque or turning
effect T = r × F about the origin O. The angular momentum of the parti-
cle about the origin O is given by L = r×mv where v is the particle’s velocity.

Show that the rate of change of angular momentum is equal to the applied
torque, that is,
dL
= T
dt

The rate of change of angular momentum is,


dL d 
= r × mv
dt dt
which is evaluated using the product rule for differentiation as follows,
dL dr d
= × mv + r × (mv)
dt dt dt

= v × mv + r × F

Note that the first term vanishes, that is, v × mv = m(v × v) = 0 and that
from Newton’s second law of motion,
d
(mv) = ma = F
dt
that is, the rate of change of momentum of the particle is equal to the force
experienced by the particle. Therefore, with the definition T = r × F, one
gets the result,
dL
= T
dt
which is the required solution.

Note: this example is adapted from: K.F. Riley, M.P. Hobson and S.J. Bence.
Mathematical methods for physics and engineering. Cambridge University
Press. (1998) Page 252.

106
Example 6: Calculate the scalar product of the two vectors p and q
defined by,

p = 2î + 3ĵ + 4k̂ q = 5î + 2ĵ − 4k̂

and comment on the result.

The scalar product of the two vectors is evaluated as follows,


 
p · q = 2î + 3ĵ + 4k̂ · 5î + 2ĵ − 4k̂

= 10 + 6 − 16 = 0

and hence,

p · q = 0

which means that the two vectors are perpendicular, that is p ⊥ q.

The following are more examples on the application of vectors and calculus
to study physical systems.

1. the workdone by a force F along a path c is determined as follows,


Z
W = F · dr (4.16)
c

that is, the integration of the scalar or dot product of the force F along
the path.

2. the potential energy UE gained by moving a charge q along a path c


in an electrostatic field E is,
Z
UE = −q E · dr (4.17)
c

Note that the force F on a charge q in an electric field E is given by


F = qE.

107
3. for a current-carrying or conducting loop,
I
B · dr = µo I (4.18)
c

which is the mathematical form of Ampere’s Law for the magnetic field
B associated with the current I in the loop.

4. the force experienced by a loop of wire with a current I in a magnetic


field B is, I
F = I dr × B (4.19)
c
H
Note that the symbol represents an integral over a closed loop. Detailed
treatments on the applications of these examples will be covered in other
courses of physics, for example mechanics, electricity and magnetism, etc.

Assignment 6: A particle of mass m moves in space under the influence


of a force field F. Assuming that at times t1 and t2 the velocity is v1 and
v2 respectively, prove that the work done is equal to the change in kinetic
energy, that is,
Z t2
1 1
F · dr = mv22 − mv12
t1 2 2

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

108
Chapter 5

Probability Theory

• Lecture No. 12: Elements of Probability Theory

109
SPH103 Mathematics for Physics
Lecture No. 12. Date:
Outline

• Elements of probability theory

Venn diagrams: Recall that when tossing a coin, the chance or prob-
ability of getting a head is 1/2. The assumption here is that the coin is
unbiassed. In this example, the sample size is 2, that is head or tail - which
represents all the possible outcomes. Venn diagrams are generally used to
graphically illustrate the outcomes of an event(s). The sample space S is
represented by a rectangle and the outcomes that belong to the event A are
enclosed by a circle as illustrated on the Figure 5.1.

Figure 5.1: Illustration of an event on a Venn diagram.

The events in the sample space S that do not belong to the possible outcomes
of the event A are denoted by A and are also known as the complement of
the set A, such that,
A + A = S (5.1)
the sum of the number of all possible outcomes of an event and it’s comple-
ment represents the size of the sample space.

For any two events A and B, the outcomes are such that they belong to,
(i) event A but not event B,
(ii) event B but not event A,
(iii) event A and event B,
(iv) neither event A nor event B

as illustrated on the Figure 5.2.

110
Figure 5.2: Illustration of two events A and B on a Venn diagram.

Example 1: A six-sided die is thrown. Let event A be ”the number


obtained is divisible by 2” and the event B be ”the number obtained is
divisible by 3”. The sample size is 6, that is S = {1, 2, 3, 4, 5, 6}, with
the following posible outcomes, A = {2, 4, 6} and B = {3, 6} which are
represented on a Venn Diagram on the Figure 5.2.

Figure 5.3: Illustration of two events A and B on a Venn diagram.

Note that the outcomes {1, 5} do not belong to any of the two events. The
outcome {6} is a common outcome representing an intersection of the sets
of possible outcomes for the events A and B and is denoted by A ∩ B. The
union of the two events, denoted by A ∪ B contains the outcomes {2, 3, 4, 6}.
If no outcome is in the intersection of the events A and B, then the events
are said to be mutually exclusive or disjoint. That is, they have no common
outcome and is represented as follows,

A ∩ B = φ (5.2)

where φ denotes the empty set.

111
The probability of an event: The probability that an event A will
occur is evaluated as follows,
nA
P(A) = (5.3)
nS
where nA and nS represent the number of all possible outcomes for the event
A and the total number of outcomes in the sample space, respectively. For
example when throwing a six-sided unbiased die, all the possible outcomes
{1, 2, 3, 4, 5, 6} have equal chances of occuring. The probability of any of the
possible outcome is therefore 1/6.

The axioms of probability theory are as follows,

1. For any event A in a sample space S,

0 ≤ P(A) ≤ 1

If P(A)=1 the event A is a certainty, and if P(A)=0 then the event A


has no chance to occur.

2. For the entire sample space S,

P(S) = 1

That is, one is certain to obtain at least one of the outcomes.

3. If A is the complement of A then,

P(A) = 1 − P(A)

4. For any two events A and B in a sample space S,

P(A ∪ B) = P(A) + P(B) − P(A ∩ B)

so that if P (A ∩ B) = 0 then,

P(A ∪ B) = P(A) + P(B)

which is only applicable when the events are mutualy exclusive.

Example 2: Calculate the probability P (A ∪ B) for the events A and B


in the Example 1.

112
The description of the events is as follows,

A = ”the outcome is divisible by 2”

B = ”the outcome is divisible by 3”

that is, S = {1, 2, 3, 4, 5, 6}, A = {2, 4, 6}, B = {3, 6}, and A ∩ B = {6} so
that the probabilities are calculated as follows,
3 outcomes 3 1
P(A) = = =
6 possible outcomes 6 2

2 outcomes 2 1
P(B) = = =
6 possible outcomes 6 3

1 outcome 1
P(A ∩ B) = =
6 possible outcomes 6
Note that since the die is unbiased, each outcome has an equal chance to
occur, the probabilities for the events A and B can also be calculated as
follows,
1 1 1 1
P(A) = P(2) + P(4) + P(6) = + + =
6 6 6 2

1 1 1
P(B) = P(3) + P(6) = + + =
6 6 3
so that,
3 2 1 2
P(A ∪ B) = P(A) + P(B) − P(A ∩ B) = + − =
6 6 6 3
Note that since the die is unbiased and the outcomes are mutualy exclusive,
then,

P(1 ∪ 2 ∪ 3 4 ∪ 5 ∪ 6) = P(1) + P(2) + P(3) + P(4) + P(5) + P(6)

1 1 1 1 1 1
= + + + + + = 1
6 6 6 6 6 6

113
Permutations and combinations: In some instances one is interested
in determining the number of ways in which n number of objects may be
arranged. That is, the permutations of the n objects given by,

n! = n (n − 1) (n − 2) (n − 3)...(1) (5.4)

so that for example 3! = 3(2)(1) = 6.

If one is interested in choosing only r number of distinct objects from the


total of n objects, then the total number of ways is given by,

n n!
Pr = = n (n − 1) (n − 2) (n − 3)...(n − r + 1) (5.5)
(n − r)!

where P denotes permutations. The r objects are distinguishable.

Example 3: Consider the arrangement of 2 chairs (A,B) out of a total


of 3 chairs. The total number of ways of arranging the two chairs is,

3 3! 3(2)(1)
P2 = = = 6
(3 − 2)! 1

as illustrated on the Figure 5.4.

Figure 5.4: Illustration of the arrangement of two out of three chairs.

114
Note that the objects in Example 1, that is the chairs, are labelled A and B,
therefore the order in which they are arranged matters. This means that, for
example the arrangements 1 and 2 on the Figure 5.4 are two distinguishable
arrangements.

If the order of arranging the r number of objects from a total of n objects


does not matter, then the total number of ways to arrange them is,

n n!
Cr = (5.6)
(n − r)! (r!)

where C denotes combinations. The r objects are indistinguishable.

For example, if the three chairs in the Example 1 are not labelled, then the
order in which they are arranged does not matter and the total number of
ways to arrange them is,

3 3! 3(2)(1)
C2 = = = 3
(3 − 2)! (2!) 1(2)(1)

This means that the arrangements 1 and 2 on the Figure 5.4 are indistin-
guishable and therefore represent only one arrangement. Similarly, the ar-
rangements 3 and 4 are indistiguishable, and the arrangements 5 and 6 are
also indistinguishable. Therefore one has only three distinguishable arrange-
ments if the objects are not labelled, that is if the order in which they are
arranged does not matter.

Example 4: In a laboratory for first year students, there are a total of


12 sessions in which the students can conduct their experiments. A student
may choose to attend any two of those sessions. Find the number of ways in
which a student can attend any two lab sessions.

Since the students may choose to attend any two laboratory sessions, the
order in which they attend the sessions does not matter. Therefore the total
number of ways of choosing any two sessions out of the twelve sessions is,

12 12! 12(11)10!
C2 = = = 66
(12 − 2)! (2!) 10!(2)(1)

115
Continuous random variables: If a variable is randomly selected over
a given sample X, then the probability of the variable taking a value x is
expressed as follows,

P(x < X ≤ x + dx) = f (x)dx (5.7)

where f (x) defines the probability density function (PDF) of the continuous
random variable x.

The properties of a probability density function (PDF) are as follows,

f (x) > 0 for x in X (5.8)

and, Z +∞
f (x) dx = 1 (5.9)
−∞

which mean that the PDF must be defined for any variable x in the sample
space X, and that the sum of all probabilities must be unity.

The mean value E[X] of a probability distribution is obtained as follows,


 P

 i xi f (xi ) for a discrete distribution

E[X] = (5.10)

 ∞
 R

x f (x) dx, for a continuous distribution

and is also termed as the expectation value of X.

The probability density function carries all the information on the probabil-
ity distribution of a random variable and has useful applications in physics.
For example in quantum mechanics, a particle is usually described by a wave-
function such that the location of the particle at any given time is computed
from it’s probability distribution.

The next examples illustrate these concepts and are intended to equip the
students with the necessary mathematical skills for the advanced courses in
physics.

116
Example 5: A random variable has a PDF f (x) = e−x in the interval
0 < x < ∞ and zero elsewhere. Find the probability that X lies in the
interval 1 < X < 2.

The probability is calculated as follows,


Z 2
P(1 < X ≤ 2) = f (x)dx
1

Z 2  2
−x −x
= e dx = −e ' 0.23
1 1

Example 6: The probability of finding a 1s electron in a hydrogen atom


in a given infinitesimal volume dV, is ψ ∗ ψ dV , where the wavefunction ψ is
given by,

ψ = A e−r/a0

Find the value of the real constant A and deduce the mean radius of the
electron orbital.

Making use of the properties of a probability density function,


Z
ψ ∗ ψ dV = 1
all space

and since the 1s orbital is spherically symmetric, that is no θ− or φ -


dependence, dV = 4πr2 dr, so that,
Z Z ∞

ψ ψ dV = A 2
e−2r/a0 4πr2 dr = 1
all space 0

which can be integrated by parts to find the constant A as,


1
A = p 3
πa0

(verify this! ... after your exams.)

117
Next, if we consider the random variable R to be the radius at which the
electron is located, then the mean or expectation value for the radius is,
Z
E[R] = rψ ∗ ψdV

Z ∞ Z ∞
2 −2r/a0 4
E[R] = 3
4πr A e dr = 3 r3 e−2r/a0 dr
0 a0 0

which on integration by parts gives the soultion,


3
E[R] = a0
2
(verify this! ... after your exams.)

Assignment 1: Particles are confined by a potential field such that,

f (x) = c x2 0 < x < 5

represents their probability density function (PDF) at any point x(cm) along
the x-axis.

(i) State the properties of a probability density function (PDF)

(ii) Find the constant c and hence determine the probability

P (4 < X < 5)

that a particle is located between 4cm and 5cm along the x-axis.

NB: These notes are an outline of what is discussed during the Lecture.
Students are encouraged to actively attend lectures and most importantly,
solve as many examples as possible on their own.

Dr. N.O. Hashim

118
Appendix A

Binomial Expansion

The binomial expansion for (a + b)n ,

n  
n
X n n−i i
(a + b) = a b
i=0
i
or,

       
n n n n n−1 n n−2 2 n n
(a + b) = a + a b + a b + ... + b
0 1 2 n
Note that,

 
n n!
= n Ci =
i i! (n − i)!
denotes the combination of n objects taken r at a time. For example,

 
n n! n!
= n C0 = = = 1
0 0! (n − 0)! n!

 
n n! n(n − 1)!
= n C1 = = = n
1 1! (n − 1)! (n − 1)!

 
n n! n!
= n Cn = = = 1
n n! (n − n)! n!

119
Further note the factorial notation,

n! = n(n − 1)(n − 2)(n − 3) ... 1


so that for example,
 
2 2! 2!
= 2 C0 = = = 1
0 0! (2 − 0)! 2! 0!
 
2 2! 2!
= 2 C1 = = = 2
1 1! (2 − 1)! 1! 1!
 
2 2! 2!
= 2 C2 = = = 1
2 2! (2 − 2)! 2! 0!
and hence,
     
2 2
2 2 2−1 2 2−2 2
(a + b) = a + a b + a b = a2 + 2ab + b2 .
0 1 2
Similarly,
 
3 3! 3!
= 3 C0 = = = 1
0 0! (3 − 0)! 3! 0!
 
3 3! 3!
= 3 C1 = = = 3
1 1! (3 − 1)! 1! 2!
 
3 3! 3!
= 3 C2 = = = 3
2 2! (3 − 2)! 2! 1!
 
3 3! 3!
= 3 C3 = = = 1
3 3! (3 − 3)! 3! 0!
and hence,
       
3 33 3 3−1 3 3−2 2 3 3−3 3
(a + b) = a + a b + + a b + a b
0 1 2 3

= a3 + + 3a2 b + 3ab2 + b3 .

120

You might also like