SPH 103 Mathematics For Physics: Dr. N. O.Hashim Department of Physics Kenyatta University September 19, 2017
SPH 103 Mathematics For Physics: Dr. N. O.Hashim Department of Physics Kenyatta University September 19, 2017
SPH 103 Mathematics For Physics: Dr. N. O.Hashim Department of Physics Kenyatta University September 19, 2017
Dr. N. O.Hashim
Department of Physics
Kenyatta University
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.
2 Calculus I 38
3 Calculus II 77
4 Vectors 97
1
Chapter 1
2
SPH103 Mathematics for Physics
Lecture No. 1. Date:
Outline
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.
z = 2 ± i
z = x + iy (1.1)
4
Addition and multiplication of complex numbers: Consider two
complex numbers defined as follows,
z1 = x1 + iy1 z2 = x2 + iy2
(verify this!)
z1 + z2 = z2 + z1 commutativity
Example 1: Find the sum and product of the two complex numbers
z1 = 2 + 3i z2 = 10 − 4i
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
z z ∗ = x2 + y 2 = |z|2 (1.3)
(verify this!)
z + z ∗ = (x + iy) + (x − iy) = 2x = 2 Re z
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,
z2 z3 z4 z5
ez = 1 + z + + + + + ... (1.5)
2! 3! 4! 5!
θ2 θ4 θ3 θ5
iθ
e = 1 − + − ... + i θ − + + ...
2! 4! 3! 5!
hence,
Note that,
θ2 θ4
cos θ = 1 − + − ...
2! 4!
θ3 θ5
sin θ = θ − + + ...
3! 5!
It therefore follows that,
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,
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 θ
or,
and similarly,
or,
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;
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
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.
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.
11
SPH103 Mathematics for Physics
Lecture No. 2. Date:
Outline
• error propagation
1. If c is a constant, then
N
X
c = Nc. (1.13)
i=1
5
X
4 = (4 + 4 + 4 + 4 + 4) = 5(4) = 20.
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
3
X
xi yi = (2)(3) + (10)(5) + (1)(2) = 6 + 50 + 2 = 58
i=1
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.
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
so that,
5
1 X 1
x̄ = xj f j = (264.230) = 17.61533
15 j=1 15
(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
1. Error of a sum: u = x + y
2. Error of a difference: u = x − y
15
3. Error of a product: u = xy
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
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
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
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
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
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.
18
SPH103 Mathematics for Physics
Lecture No. 3. Date:
Outline
• functions
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
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.
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
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
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).
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
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,
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.
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.
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 .
Consider the hyperbolic functions f (x) = cosh x and f (x) = sinh x with
some values tabulated are as follows,
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.
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.
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
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.
f (x) = 7x g(x) = x + 1.
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.
f (x) = x + 2 g(x) = x − 7.
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.
f (x) = a − x g(x) = a − x
Find the composite functions f g(x) and gf (x). Comment on your results.
27
T(K) = T (0 C) + 273
The domain here is from 00 C to 1000 C and the range is 273K to 373K.
In order to convert the temperature values from the Kelvin to the Celsius
scale, one can use the inverse function,
Note that:
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,
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
−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.
29
SPH103 Mathematics for Physics
Lecture No. 4. Date:
Outline
• transformation of 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.
30
The functions that correspond to these translations, i.e.images, are,
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,
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,
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.
x 0 1 2 3 4
N 1 2 4 8 16
36
Figure 1.16: The number of particles in a simplified toy model. The distance
is in units of the interaction length λ.
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.
37
Chapter 2
Calculus I
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
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
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,
lim
f (x) = +∞
x → 0+
lim
f (x) = −∞
x → 0−
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.
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,
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,
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.
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.
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,
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
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
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,
lim c − c
= = 0
δx → 0 δx
hence,
f 0 (x) = 0
lim (x + δx)2 − x2
=
δx → 0 δx
2xδx + (δx)2
lim lim
= = 2x + δx
δx → 0 δx δx → 0
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
cos δx ' 1
δx → 0
lim sin δx
'1
δx → 0 δ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 (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
f 0 (x) = nxn−1
y + δy = (u + δu)(v + δv)
or,
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
u(x)
f (x) = y =
v(x)
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.
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
(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.
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.
y = sin3 x
y = u3 where u = sin x
dy du
= 3u2 = 3 sin2 x = cos x
du dx
hence,
dy dy du
= · = 3 sin2 x cos x
dx du dx
51
Example 2: Consider the function defined by,
2
y = ex
y = eu where u = x2
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.
dy dy dt 10
= · =
dx dt dx 4t
52
Assignment 3: Acurve is defined by the parametric equations,
Next, consider a circle of radius r with its centre at the origin of the x -
y plane as illustrated on Figure 2.4.
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
x2 + y 2 = 25
−1 y −1 4
θ = tan = tan ' 530
x 3
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
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
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.
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.
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.
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.
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.
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.
60
SPH103 Mathematics for Physics
Lecture No. 7. Date:
Outline
• Examples
• Partial differentiation
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)
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.
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.
∂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,
Note that due care must be taken not to mix the terms containing dx and dy.
f (x, y, z) = x2 yz + x2 y 3 + xy 3 sin x
∂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
∂f
= x2 y
∂z
65
Assignment 1: Consider the function u(x, y) defined by,
∂u ∂u
and
∂x ∂y
Hence find the total derivative du.
∂ 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.
f (x, y, z) = x3 y 2 + x4 y 3 + z 4
∂ 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
f (x, y) = 4x3 y 2 + 6y 3
Find,
∂ 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 .
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
∂ ∂f ∂ ∂f ∂ ∂f
fxx = fyy = fxy =
∂x ∂x ∂y ∂y ∂x ∂y
∂ 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
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
∂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.
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.
70
SPH103 Mathematics for Physics
Lecture No. 8. Date:
Outline
• partial differentiation
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
∂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,
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
74
Setting dx=0 in the Equation (2.40), that is,
∂x ∂y ∂x
+ dz = 0
∂y z ∂z x ∂z 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.
dU = T dS − P dV (2.44)
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.
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.
76
Chapter 3
Calculus II
77
SPH103 Mathematics for Physics
Lecture No. 9 Date:
Outline
• integral calculus
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.
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
Z 2 Z 2 Z 2
f (x) + g(x) dx = f (x) dx + g(x) dx
1 1 1
80
Techniques for integration:
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
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),
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.
Z
x
dx
x2
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.
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,
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.
−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
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
−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.
Z
x sin x dx
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.
Z
1
dx
x2 + x
Z Z
1 1
= dx − dx
x x + 1
= ln x − ln(x + 1) + C
x
= ln + C
x + 1
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)
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
Z
5 du 5
= = ln u + C
6 u 6
and hence,
Z
5x 5
dx = ln(3x2 + 4) + C
3x2+ 4 6
Z
x ln x dx
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
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.
89
SPH103 Mathematics for Physics
Lecture No. 10 Date:
Outline
• applications of calculus
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
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.
Note that,
p
∆S = (∆x)2 + (∆y)2
s 2
dS dy
= 1 +
dx dx
(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
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.
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
• at t = 0, A = A0
Further note that the Equation (3.19) represents a linear equation of the
form,
y = mx + c
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.
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.
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.
96
Chapter 4
Vectors
97
SPH103 Mathematics for Physics
Lecture No. 11. Date:
Outline
a + b = b + a (4.1)
which means that vector addition is commutative. Similarly,
a − b = a + (−b)
98
Figure 4.2: Illustration of the vectors a and b
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.
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,
n
X
ci êi = c1 ê1 + c2 ê2 + c3 ê3 + ... + cn ên 6= 0 (4.5)
i=1
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,
that is,
and similarly,
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)
ab = b − a
that is,
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,
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̂.
î · î = ĵ · ĵ = k̂ · k̂ = 1
î · ĵ = ĵ · k̂ = k̂ · î = 0
a · b = ax bx + ay by + az bz .
102
It also follows that,
î × î = ĵ × ĵ = k̂ × k̂ = 0
î × ĵ = −ĵ × î = k̂
ĵ × k̂ = −k̂ × ĵ = î
k̂ × î = −î × k̂ = ĵ
so that,
a × b = ay bz − az by î + az bx − ax bz ĵ + ax by − ay bx k̂
a · b = b · a commutativity (4.13)
a · (b + c) = a · b + a · c distributivity (4.14)
103
Example 3: Consider a parallelepiped of sides a and b as sketched on
the Figure 4.4.
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
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
v = 4 t î + 2t ĵ + 2 k̂
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
= 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,
= 10 + 6 − 16 = 0
and hence,
p · q = 0
The following are more examples on the application of vectors and calculus
to study physical systems.
that is, the integration of the scalar or dot product of the force F along
the path.
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.
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.
108
Chapter 5
Probability Theory
109
SPH103 Mathematics for Physics
Lecture No. 12. Date:
Outline
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.
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
110
Figure 5.2: 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)
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.
0 ≤ P(A) ≤ 1
P(S) = 1
P(A) = 1 − P(A)
so that if P (A ∩ B) = 0 then,
112
The description of the events is as follows,
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,
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)
n n!
Pr = = n (n − 1) (n − 2) (n − 3)...(n − r + 1) (5.5)
(n − r)!
3 3! 3(2)(1)
P2 = = = 6
(3 − 2)! 1
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.
n n!
Cr = (5.6)
(n − r)! (r!)
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.
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,
where f (x) defines the probability density function (PDF) of the continuous
random variable x.
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 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.
Z 2 2
−x −x
= e dx = −e ' 0.23
1 1
ψ = A e−r/a0
Find the value of the real constant A and deduce the mean radius of the
electron orbital.
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
represents their probability density function (PDF) at any point x(cm) along
the x-axis.
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.
118
Appendix A
Binomial Expansion
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,
= a3 + + 3a2 b + 3ab2 + b3 .
120