0% found this document useful (0 votes)
28 views77 pages

STK110 Math notes - Quarter 1, 2025 (2)

The document contains class notes for STK110, focusing on fundamental mathematical concepts such as linear functions, inequalities, differentiation, integration, matrices, and linear programming. It serves as a self-study guide based on the textbook 'Quantitative Statistical Techniques' and includes various mathematical applications and examples. The notes are structured into sections with detailed explanations and examples for each topic covered.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views77 pages

STK110 Math notes - Quarter 1, 2025 (2)

The document contains class notes for STK110, focusing on fundamental mathematical concepts such as linear functions, inequalities, differentiation, integration, matrices, and linear programming. It serves as a self-study guide based on the textbook 'Quantitative Statistical Techniques' and includes various mathematical applications and examples. The notes are structured into sections with detailed explanations and examples for each topic covered.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

Class Notes: STK110

Department of Statistics

Quarter 1, 2025

Contents
1 Introduction 3
1.1 Linear functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Linear inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Quadratic functions (parabolas) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Absolute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.1 Piecewise functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.2 The Absolute Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.3 Absolute value equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.4 Absolute value inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2 Differentiation 14
2.1 The limit of a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2 Continuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3 Rates of change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4 Rules of differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.5 The derivatives of inverse functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.6 The derivatives of special functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.7 Higher order derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.8 Optimisation problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.8.1 Maximum and minimum points of a function . . . . . . . . . . . . . . . . . . . . . . 30
2.8.2 The basics of partial differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3 Integration 36
3.1 Indefinite integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2 Definite integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.3 Some economic applications of integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.3.1 Indefinite integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.3.2 Definite integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.3.3 More examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

1
CONTENTS CONTENTS

4 Matrices 49
4.1 Introduction to matrix concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.2 Matrix operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.2.1 Matrix addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.2.2 Matrix subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.2.3 Transpose of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.2.4 Scalar multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.2.5 Matrix multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2.6 The identity matrix (I) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.3 The determinant of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.3.1 The determinant of a 2 × 2 matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.3.2 The determinant of a 3 × 3 matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.4 Cramer’s rule used to solve a system of linear equations . . . . . . . . . . . . . . . . . . . . 57
4.4.1 Set of two linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.4.2 Set of three linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.5 The inverse of a matrix used to solve a system of linear equations . . . . . . . . . . . . . . . 59
4.6 Practical applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.7 Excel functions for matrix algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.7.1 Calculating the transpose of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.7.2 Calculating the determinant of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.7.3 Calculating the inverse of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.7.4 Multiplying two matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

5 Linear Programming 66
5.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.2 The graphical solution method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.3 The extreme point method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.4 More examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

©Copyright reserved 2
1 INTRODUCTION

1 Introduction
This document is based on the recommended textbook of Swanepoel, A; Vivier, FL; Millard, SM; Ehlers,
R: Quantitative Statistical Techniques. (3rd ed.)

This study theme is mainly self-study, comprising of basic mathematical concepts of which the majority
has already been done at school level.

1.1 Linear functions


Equations of the form y = bx + a are called linear equations in x.

Example 1.1. Obtain the equation of the line, y = 7x + a, which passes through the point (−5; 12).

Solution 1.1. It is given that (x; y) = (−5; 12) and by replacing that into the linear equation we obtain:

y = 7x + a
12 = 7(−5) + a
12 = −35 + a
a = 47

Therefore, the equation is given by: y = 7x + 47

Example 1.2. Finding linear equations from a graph.

Find the linear equations of lines A, B and C in the graph below:

©Copyright reserved 3
1.1 Linear functions 1 INTRODUCTION

Solution 1.2. The solutions for each of the lines A, B and C are discussed below.

Line A: Horizontal line through y-axis, without a gradient: y = bx+a where b = 0, therefore y = a = 30
[a is known as the y-intercept of the equation].

Line B: Vertical line through x-axis: x = 40 .

Line C: Line with intercepts known. A linear equation can be written in the form:
x y
+ =1
x − intercept y − intercept
x y
+ =1
30 10
(multiply equation by lowest common denominator, i.e., 30)
x + 3y = 30
(the line can be written in the y = bx + a form)
1
3y = −x + 30 therefore y = − x + 10
3

Example 1.3. Equilibrium (intersecting) points

Consider the following two-variable system of linear equations:

y = 3x + 4
y = −x + 2

Graphically, it can be presented as follows:

Solve the equilibrium point (i.e., the point of intersection).

©Copyright reserved 4
1.2 Linear inequalities 1 INTRODUCTION

Solution 1.3. From the above graph, we can see that there is exactly one (x, y) pair where both linear
equations are equal. Algebraically, we can solve this point of intersection by setting the two equations
equal, and solving for x.

3x + 4 = −x + 2 ∴ 3x + x = 2 − 4
1
4x = −2 ∴ x = −
2
1
Substituting x = − into y = 3x + 4 (or y = −x + 2) we get
 2
1 3 8 5 1
y=3 − +4=− + = =2
2 2 2 2 2
 
1 1
It follows that the equilibrium point is − , 2
2 2

1.2 Linear inequalities


A linear inequality is of the same form as a linear equation, but the equal sign is replaced by one of the
inequality signs in brackets (>, <, ≤ or ≥). To represent a linear inequality graphically (used in Study
Theme 5 - LP), the equality is drawn first and then the feasible region that consists of all points whose
coordinates satisfy the inequality, is determined.

Example 1.4. Draw x + y ≥ 2.

Solution 1.4. The line x + y ≥ 2 can be represented in the y = bx + a form: y ≥ −x + 2

Note: The line is included (solid line) because of the ”≥” sign and the shaded area is above the line.

©Copyright reserved 5
1.2 Linear inequalities 1 INTRODUCTION

Example 1.5. Draw x + y < 2.

Solution 1.5. The line x + y < 2 can be represented in the y = bx + a form: y < −x + 2

Note: The line is excluded (dotted line) because of the ”<” sign and the shaded area is below the line.

Example 1.6. Draw y < 2.

Solution 1.6. The line y = 2 is excluded (dotted line) because of the ”<” sign and the shaded area is
below the horizontal line.

©Copyright reserved 6
1.3 Quadratic functions (parabolas) 1 INTRODUCTION

Example 1.7. Draw x ≥ 2.

Solution 1.7. The line is included (solid line) because of the ”≥” sign and the shaded area is to the right
of the vertical line.

Remark 1. If we multiply both sides of an inequality by the same negative number, the sign of the inequality
changes.
For example, consider x − y < 2. Make y the subject of the formula by following the steps below:

1. −y < 2 − x

2. Multiply both sides of the inequality by −1.

3. The sign of the inequality changes such that y > −2 + x.

In Study Theme 5 (LP) a system of linear inequalities will be given, i.e., more than one linear inequality
represented on the same graph. Linear programming (LP) includes applied problems in which several
conditions expressed as linear inequalities must be satisfied at the same time.

1.3 Quadratic functions (parabolas)


Equations of the form y = a + bx + cx2 are called quadratic equations and are part of the class of functions
called polynomial functions. The expression a0 + a1 x + a2 x2 + ... + an xn is called a polynomial of the nth
degree and consists of n + 1 terms. The quadratic equation y = a + bx + cx2 is of second degree where:
a = the constant
b = the coefficient of x
c = the coefficient of x2
A quadratic function can be drawn if the x-intercepts, y-intercept and the turning point are known.

Example 1.8. Draw the function y = x2 + 7x − 18.

Solution 1.8. Follow the steps below to draw the function given above:

©Copyright reserved 7
1.3 Quadratic functions (parabolas) 1 INTRODUCTION

a. y-intercept: Let x = 0 then y = −18


b. x-intercepts: Let y = 0 then x2 + 7x − 18 = 0 ∴ (x − 2)(x + 9) = 0
∴ x = 2 or x = −9
We attempt to find two numbers that add to give +7 and multiply to give −18 (note the minus)
c. Turning point: x = −b −7
2c = 2(1) = −3.5 (in study unit 2, the x-coordinate of the turning point can also
be determined using differentiation)
y = (−3.5)2 + 7(−3.5) − 18 = −30.25 (alternatively, the formula
2 2
y = 4ac−b
4c = 4(−18)(1)−(7)
4(1) = − 121
4 = −30.25, can be used)
Turning point: (−3.5; −30.25)
d. Sketch:

Example 1.9. Consider the following system of equations:


y = x2 − 1
y=x
Graphically, this can be represented as follows:

From the above graph, we can clearly see that the system has two solutions (or two equilibrium points).
Solve for x where the system is in equilibrium.

©Copyright reserved 8
1.4 Absolute values 1 INTRODUCTION

Solution 1.9. Algebraically, we can solve for x by setting the two equations equal:
x2 − 1 = x
x2 − x − 1 = 0
It is known that when we have a function of the form a + bx + cx2 = 0, which cannot be factorized,
one can solve for x using the quadratic formula:

−b ± b2 − 4ac
x=
2c
In the case of our example, a = −1, b = −1 and c = 1, so it follows that
p p
1 + 1 − 4(−1)(1) 1 − 1 − 4(−1)(1)
x= ≈ 1.618 or x = ≈ −0.618
2 2
Therefore, the system is in equilibrium when x = 1.618 or x = −0.618.

Remark 2. If b2 − 4ac is negative, the square root does not exist and thus the quadratic equation a + bx +
cx2 = 0 cannot be solved.

1.4 Absolute values


1.4.1 Piecewise functions
We can create functions that behave differently based on the input (x) value. For example, consider the
function f (x) with the following characteristics:
• When x is less than 2, it gives x2 .
• When x is exactly 2, it gives 6.
• When x is more than 2 and less than or equal to 6, it gives the line 10 − x.
A graph of f (x) is given below:

We can express the above mathematically as follows:



2
x
 if x < 2
f (x) = 6 if x = 2

10 − x if 2 < x < 6

©Copyright reserved 9
1.4 Absolute values 1 INTRODUCTION

The domain (all the values that can go into the function) is all real numbers up to and including 6, which
we can write as
Dom(f ) = (−∞, 6]
or
Dom(f ) = {x ∈ R|x ≤ 6}.
Here are some example values:

x f (x)
-4 16
-2 4
0 0
1 1
2 6
3 7

Consider another example of a piecewise function:


(
2 if x ≤ 1
h(x) =
x if x > 1

which is represented as follows:

Consider the following questions:

• What is h(−1)?
x is ≤ 1, so we use h(x) = 2. Thus, h(−1) = 2.

• What is h(1)?
x is ≤ 1, so we use h(x) = 2. Thus, h(−1) = 2.

• What is h(4)?
x is > 1, so we use h(x) = x. Thus, h(4) = 4.

©Copyright reserved 10
1.4 Absolute values 1 INTRODUCTION

1.4.2 The Absolute Value


The absolute value function can be expressed as:
(
x if x ≥ 0
|x| =
−x if x < 0

The symbol |x| denotes the absolute value of x, which represents the non-negative of x, or the number of
x without its sign. For example, |3| = 3 or | − 3| = −(−3) = 3.

Geometrically, |x| represents the distance of x from 0 (note that distance cannot be negative).

1.4.3 Absolute value equations


Consider |a| = 5. What values could a have? From the definition of an absolute value, a could be either
−5 or 5. If we replace a with either of these values, the statement (or equation) will be true.
In general, for any b ≥ 0, |a| = b implies that a = b or a = −b.

Example 1.10. Solve for x considering the equation |x − 2| = 8.

Solution 1.10. x − 2 is the argument. The argument will either be 8, or −8. In other words,

x − 2 = 8, or x − 2 = −8.

We must solve these two equations. The first implies:

x−2=8
x=8+2
x = 10

The second implies:

x − 2 = −8
x = −8 + 2
x = −6

Thus, the two solutions are x = 10 or x = −6.

©Copyright reserved 11
1.4 Absolute values 1 INTRODUCTION

1.4.4 Absolute value inequalities


There are two forms of absolute value inequalities:

1. |x| < c and

2. |x| > c,

where c ≥ 0.

Consider the inequality |x| < 3. For this inequality to be true, what values could x have? Geometrically,
x is less than 3 units from 0 (represented below).

Therefore, −3 < x < 3.

Now, consider the inequality |x| > 3. For which values of x will this be true? Geometrically, x is more
than 3 units away from 0 (represented below).

Thus, it follows that x < −3 or x > 3.

In general:

|x| < c |x| > c


−c < x < c, for c ≥ 0 x < −c or x > c, for c ≥ 0

Example 1.11. For which values of x will the following inequality be true?

|2x − 1| < 5

Solution 1.11.

−5 < 2x − 1 < 5
−5 + 1 < 2x < 5 + 1
−4 < 2x < 6
−2 < x < 3

©Copyright reserved 12
1.4 Absolute values 1 INTRODUCTION

Example 1.12. Solve for x in the following inequality:

|1 − 2x| > 9

Solution 1.12. Note that the above is equivalent to

1 − 2x < −9 or 1 − 2x > 9

Thus, for the first we have:

1 − 2x < −9
−2x < −9 − 1
−2x < −10
x>5

For the second we have:

1 − 2x > 9
−2x > 9 − 1
−2x > 8
x < −4

It follows that x < −4 or x > 5.

©Copyright reserved 13
2 DIFFERENTIATION

2 Differentiation
Functions represent the relationships that exist between variables, denoted symbolically by y = f (x), e.g.
y = x + 3. Here, y is called the dependent variable and x the independent or explanatory variable or
predictor.
In the study of functions, it is easy to find the value of y that corresponds to a given value of x. In the
above example, it follows that if x = 2, then y = 2 + 3 = 5. It is also easy to determine the change in the
value of y when the value of x changes over a given interval. If x, in the above example, changes from 2 to
5, y changes from 5 to 5 + 3 = 8, i.e., the value of y increases by 3 units.
Differentiation is all about the rate of change. To study the method of differentiation, it is necessary to
first consider the concept of the limit of a function. According to Khan Academy, limits describe how a
function behaves near a point, instead of at that point.

2.1 The limit of a function


Example 2.1. To understand limits, let us consider a function, f (x) = x + 3, represented by the following
graph:

The limit of f at x = 3 is the value f approaches as it gets closer and closer to x = 3. Approaching from
the left-hand side:
lim f (x) = lim (x + 3) = 6
x→3− x→3−

Approaching from the right-hand side:

lim f (x) = lim (x + 3) = 6


x→3+ x→3+

And:
lim f (x) = lim (x + 3) = 6
x→3 x→3

©Copyright reserved 14
2.1 The limit of a function 2 DIFFERENTIATION

Example 2.2. Consider the function h that is like f in every aspect but undefined at x = 3.

The limit of h at x = 3 is equal to 6 (limx→3 h(x) = limx→3 (x + 3) = 6) but, the value of h(3) is undefined
at x = 3. A possible function could be a rational function:

x2 − 9 (x + 3)(x − 3)
h(x) = = = x + 3, provided that x ̸= 3.
x−3 x−3
Another option is a piecewise function:
(
x + 3, x ̸= 3
h(x) =
undefined, x = 3

Example 2.3. Consider the function below:


(
x − 2, x≥2
g(x) = |x − 2| =
−x + 2, x<2

©Copyright reserved 15
2.1 The limit of a function 2 DIFFERENTIATION

It follows that
lim |x − 2| = lim (−x + 2) = 0
x→2− x→2−

lim |x − 2| = lim (x − 2) = 0
x→2+ x→2+

and subsequently:
lim |x − 2| = 0
x→2

Example 2.4. Consider the function below:


(
1, x≥2
f (x) =
−1, x<2

x 1.9 1.99 1.999 2.001 2.01 2.1


f (x) -1 -1 -1 1 1 1

lim f (x) = lim (−1) = −1


x→2− x→2−

lim f (x) = lim (1) = 1


x→2+ x→2+

and therefore limx→2 f (x) does not exist.

©Copyright reserved 16
2.1 The limit of a function 2 DIFFERENTIATION

Definition 1 (A limit). When the value of the function y = f (x) approaches the single value L (or remains
constant as L) as x assumes values that approach a from both the left and right sides, then L is called the
limit of f (x) when x approaches a. The left limit is written as
lim f (x) = L
x→a−

and the right limit as


lim f (x) = L.
x→a+
If the left and right limits are equal, the limit of the function is given as
lim f (x) = L.
x→a

Put differently, the difference between f (x) and L can be made arbitrarily small by confining x to a
sufficiently small interval about a, excluding x = a.
Remark 3. The essence of limits is that the value of x only approaches, but never reaches, a. The limit
of a function therefore does not depend on the value of f (x) at the point x = a, or even upon whether f (x)
is defined at that point.

Limit Theorems
Calculating limits can be simplified considerably using several theorems. The theorems are given without
proof. Assume that f (x) and g(x) are two functions of x whose limits exist when x approaches a, for
example:
lim f (x) = L
x→a
and
lim g(x) = M.
x→a

1. The limit of a constant:


If h(x) = k; and k is constant, then
lim h(x) = k, where k is a constant.
x→a

The value of the function therefore does not change.


2. The limit of a sum:
lim [f (x) + g(x)] = lim f (x) + lim g(x) = L + M.
x→a x→a x→a

3. The limit of a difference:


lim [f (x) − g(x)] = lim f (x) − lim g(x) = L − M.
x→a x→a x→a

4. The limit of a product:


If h(x) = f (x) · g(x), then
lim [f (x)g(x)] = lim f (x) · lim g(x)] = L · M
x→a x→a x→a

5. The limit of a quotient:


If h(x) = f (x)/g(x), then
f (x) limx→a f (x) L
lim h(x) = lim = = ,
x→a x→a g(x) limx→a g(x) M

©Copyright reserved 17
2.2 Continuity 2 DIFFERENTIATION

Example 2.5. Determine the limit (if it exists):

5x(x − 8)
lim
x→2 3x2 − 2x

Using the theorems above:

5x(x − 8) (limx→2 5) (limx→2 x) (limx→2 (x − 8))


lim 2
=
x→2 3x − 2x (limx→2 3) (limx→2 x2 ) − (limx→2 2) (limx→2 x)
5 (limx→2 x) (limx→2 x − limx→2 8)
=
3 (limx→2 x2 ) − 2 (limx→2 x)
5(2)(2 − 8) −60
= = = −7.5.
3(4) − 2(2) 8

Remark 4. Although the limit of a function at a specific point does not depend on the value of the function
at that point (see Remark 3), results from various examples indicate that the following is often true:

lim f (x) = f (a)


x→a

The question of whether there is a specific rule or pattern to determine when this will be true, arises. The
answer is that it will always be true, provided that f (x) is a continuous function.

2.2 Continuity
The behavior of a function at or close to a point is strongly influenced by its continuity or lack of continuity
at that point. Continuity can be defined as follows:

Definition 2 (Continuity). If f (x) is a function for which the following is true:

1. f (a) is defined,

2. limx→a f (x) exists, and

3. limx→a f (x) = f (a),

then y = f (x) is said to be continuous at the point x = a.

Definition 3. A function f (x) is continuous in an interval if it is continuous at each point of the interval.
A function which is not continuous is said to be discontinuous.

©Copyright reserved 18
2.3 Rates of change 2 DIFFERENTIATION

Example 2.6. The function y = −x2 + 10x − 9 is continuous at the point x = 5, since

1. f (5) = 16 (thus, it is defined),

2. lim f (x) = 16, and


x→5

3. lim f (x) = f (5).


x→5

18
16
y
14
12
10
8
6
4
2
0
-2 0 1 2 3 4 5 6 7 8 9 10 11
-4 x
-6
-8
-10

Example 2.7. The function h(x) in Example 2.2 is discontinuous at the point x = 3, since, although
condition (ii) of Definition 2 is satisfied. That is,

lim f (x) = 6,
x→3

neither condition (i) nor condition (iii) is satisfied, as h(3) is undefined.

2.3 Rates of change


Generally, rate of change is defined as follows:

Definition 4 (Rate of change).


∆y
RC =
∆x

Two types of rates of change exist:

• Average rate of change (ARC) over the interval [x1 , x2 ] → Slope of the line segment.

• Instantaneous rate of change (IRC) at the point x → Slope of the tangent.

©Copyright reserved 19
2.3 Rates of change 2 DIFFERENTIATION

Example 2.8 (ARC). The supply of a certain product (in 1000) is given by the following function:

y = f (x) = 6x + x2

Calculate the ARC over the interval [5, 10].

f (10) − f (5) 160 − 55


ARC = = = 21
10 − 5 10 − 5
or
f (5) − f (10) 55 − 160
ARC = = = 21
5 − 10 5 − 10
where

f (10) = 6(10) + 102 = 160, and


f (5) = 6(5) + 52 = 55

The average rate of change in the example above can generally be visualized by the figure below. Consider
the curve y = f (x) and two points on the curve, P (x, f (x)) and Q(x + h, f (x + h)). The slope of the line
segment P Q is given by:
f (x + h) − f (x) f (x + h) − f (x)
mP Q = =
(x + h) − x h

Suppose point P is held fixed and point Q is moved along the curve towards P . If the curve is
continuous, the distance between x and x + h will get infinitely small, implying the limit that h tends to
is zero. Instead of calculating the slope of a line segment, the slope of the tangent line at P is calculated,
called the instantaneous rate of change (IRC) at P . That is,

f (x + h) − f (x)
IRC at x = lim
h→0 h

©Copyright reserved 20
2.4 Rules of differentiation 2 DIFFERENTIATION

Example 2.9 (IRC). If f (x) = x2 , then

f (x + h) − f (x)
IRC = f ′ (x) = lim
h→0 h
(x + h) − x2
2
= lim
h→0 h
x + 2xh + h2 − x2
2
= lim
h→0 h
2xh + h2
= lim
h→0 h
= lim (2x + h)
h→0
= 2x + 0
= 2x

The IRC is also called the derivative of a function.

Notation for derivatives:


• f ′ (x)
dy
• dx or d
dx f (x)

• Dx y or Dx f (x)

• Marginal function (e.g., marginal income)

2.4 Rules of differentiation


Rules below are given without proof.

Rule 1

If f (x) = k, where k is a constant, then f ′ (x) = 0.

1. f (x) = 5 then f ′ (x) = 5x0 = 5(0)x−1 = 0

2. g(x) = 2 ln(5) = 3.219 then g ′ (x) = 0

3. f (x) = e5 y = 148.413y then f ′ (x) = 0


Note: Differentiate with respect to x, so y is constant

4. f (x) = x0 = 1 then f ′ (x) = 0

©Copyright reserved 21
2.4 Rules of differentiation 2 DIFFERENTIATION

Rule 2

If f (x) = xn , where n is a real number and n ̸= 0, then f ′ (x) = nxn−1 .

1. f (x) = x6 then f ′ (x) = 6x5

2. g(x) = x then g ′ (x) = 1x1−1 = 1

3. f (x) = x1
You cannot differentiate a function in the denominator; rewrite as a power function first:
f (x) = x1 = x−1
then f ′ (x) = −1 · x−1−1 = −1x−2 = − x12


3
4. y = x2
You √
cannot differentiate a function inside a root; rewrite as a power function first:
3
y = x2 = x2/3
dy
then dx = 23 x2/3−3/3 = 32 x−1/3

5. f ′ (x) = √1
x
= x−1/2
−1 −1/2−2/2
then f ′ (x) = 2 x = − 21 x−3/2

Rule 3

If f (x) = kg(x), where k is a constant, then f ′ (x) = kg ′ (x).

1. f (x) = 2x2 then f ′ (x) = 2 · 2x2−1 = 4x


Note: You do not differentiate a constant, only a variable.

1
2. f (x) = 2x
You cannot differentiate a function in the denominator; keep the constant as given, and only write
the the variable as a power function (moving into the numerator)
−1
f (x) = x 2
−2
then f ′ (x) = −x2 = − 2x12

3. h(x) = −7x2 rt = (−7 rt )x2


then h′ (x) = (−7 rt ) · 2x1 = − 14rx
t

©Copyright reserved 22
2.4 Rules of differentiation 2 DIFFERENTIATION

Rule 4

If f (x) = g(x) + h(x), then f ′ (x) = g ′ (x) + h′ (x).


If f (x) = g(x) − h(x), then f ′ (x) = g ′ (x) − h′ (x).

1. f (x) = 3 + x2 then f ′ (x) = 0 + 2x = 2x

√ 1 dr dr
2. r = 2t − t + 2s. Calculate ds and dt .

First, we calculate: dr
ds = 2 · 1 · s
1−1 = 2

Note: t becomes a constant.


dr
To calculate dt , we first rewrite r as:

r= 2 · t1/2 − t−1 + 2s

then √ √
dr √ 1 −1/2 −2 2 −1/2 −2 2 −1/2 1
= 2· t − (−1)t + 0 = t +t = t + 2
dt 2 2 2 t

Example 2.10 (Rules 1 to 4). The price of a product (in Rand) depends on the quantity of the product
sold, and is given by:
p = 350 − 0.08q − 0.002q 2

1. Calculate the sales price if 40 items are sold.

2. Calculate the marginal income of the 40th item.

Solution 2.10.

1. For q = 40 we find

p = 350 − 0.08(40) − 0.002(40)2 = 343.6

The sales price if 40 items are sold is R343.60

2. The income function is:

I(q) = pq = (350 − 0.08q − 0.002q 2 )q = 350q − 0.08q 2 − 0.002q 3

The marginal income function is given by:

I ′ (q) = 350 − 0.16q − 0.006q 2

The marginal income for the 40th item is:

I ′ (40) = 350 − 0.16(40) − 0.006(40)2 = 334

The sales price will increase with R334 if the number of products increases from 40 to 41.

©Copyright reserved 23
2.4 Rules of differentiation 2 DIFFERENTIATION

Rule 5 (Product Rule)

If f (x) = g(x) · h(x), then: f ′ (x) = g(x)h′ (x) + h(x)g ′ (x)

1. f (x) = x2 (x − 6) then
f ′ (x) = x2 · 1 + (x − 6) · 2x = x2 + 2x2 − 12x = 3x2 − 12x

2. g(x) = (x2 + 3x − 4)(5x3 + 2x)


g ′ (x) = (x2 + 3x − 4)(15x2 + 2) + (5x3 + 2x)(2x + 3)
First function in each term (red) is kept constant and the second function in each term (blue) is the
derivative.

3. h(x) = √5 (x2 + 12 ) = 5x−1/2 (x2 + x−2 ) then


x x
h′ (x) = 5x−1/2 (2x − 2x−3 ) + (x2 + x−2 )(− 25 x−3/2 )

Rule 6 (Quotient Rule)


g(x) h(x)g ′ (x)−g(x)h′ (x)
If f (x) = h(x) , then it follows that: f ′ (x) = [h(x)]2

(x2 +1)·3−3x·(2x) 3x2 +3−6x2 3−3x2


1. f (x) = 3x
x2 +1
then f ′ (x) = (x2 +1)2
= (x2 +1)2
= (x2 +1)2

6x2 −1 (x4 +5x+1)·12x−(6x2 −1)(4x3 +5)


2. k(x) = x4 +5x+1
then k ′ (x) = (x4 +5x+1)2

−3
3. Let r = x13 . We could calculate dx
dr
by rewriting r as r = x−3 and we get dr
dx = (−3)x−4 = x4
. This
same question could also be answered using the quotient rule:
dr x3 · 0 − 1 · 3x2 3x2 3
= 3 2
= − 6
=− 4
dx (x ) x x

Rule 7 (Chain Rule)


dy
If y = f (g(x)), then: dx = f ′ (g(x)) · g ′ (x)

1. f (x) = (4x2 − 5x + 6)3 then


f ′ (x) = 3(4x2 − 5x + 6)2 (8x − 5)

2. y = (2x + 5)5 (3x2 + 7)1/2 then

dy 1
= (2x + 5)5 · (3x2 + 7)−1/2 · 6x + (3x2 + 7)1/2 · 5(2x + 5)4 · 2
dx 2
= (2x + 5) (3x2 + 7)−1/2 · 3x + 10(3x2 + 7)1/2 (2x + 5)4
5

©Copyright reserved 24
2.4 Rules of differentiation 2 DIFFERENTIATION

3. k = x4 +x1 2 +1 . In this form, we can find dx


dk
using the quotient rule. If we rewrite k, we can find dk
dx
using the chain rule. Rewriting k, we find:
1
k= 4 = (x4 + x2 + 1)−1 .
x + x2 + 1
dk
= −(x4 + x2 + 1)−2 (4x3 + 2x).
dx

4. y = x3 + 5 = (x3 + 5)1/2
dy 1 3
= (x3 + 5)−1/2 · 3x2 = x2 (x3 + 5)−1/2
dx 2 2

Example 2.11. This example will be discussed in class, but you must try it first and then bring your
calculations to class.

The profit of tea produced is given by:


500x
P (x) = − 2x
x + 20
where x is the amount of tea produced in 100kg and P (x) the profit in R1000.
Hint: Treat units with care - no units can be substituted into a function.
1. Calculate the profit if 1500 kg of tea is produced.

2. Determine the marginal profit function.


Hint: Do not get a common denominator; use the quotient rule on the fraction and differentiate 2x
on its own.

3. Calculate and interpret the marginal profit if:


(a) 1500 kg of tea is produced.

(b) 15000 kg of tea is produced.

©Copyright reserved 25
2.5 The derivatives of inverse functions 2 DIFFERENTIATION

1
Example 2.12. Calculate the equation of the tangent line of the function f (x) = x−1 at x = 3.

Solution 2.12. The equation of a line can be obtained using the equations

y = y1 + m(x − x1 )

or
y = mx + c
where m is the gradient and c the y-intercept of the line. Thus, we have
1 1
f (3) = = at x=3
3−1 2
The point (x1 ; y1 ) is then (3; 1/2). For the gradient we have
1
m = f ′ (x) = −(x − 1)−2 ∴ f ′ (3) = −(3 − 1)−2 = −
4
Thus, for y = y1 + m(x − x1 ) we have
1 1 1 5
y= − (x − 3) = − x +
2 4 4 4

2.5 The derivatives of inverse functions


Consider the function y = 3x + 2. The inverse function of y = f (x) is obtained as follows (note that we
solve for x instead):

y = 3x + 2
3x = y − 2
1 2
x= y− (Inverse function)
3 3
x = g(y) = f −1 (y) (Inverse function)

If you want to find dx


dy , you can rewrite the equation for x to be the subject of the equation, i.e., x on
the left-hand side and the other variables and constants on the right-hand side. For example:

y = (x − 2)3 x = y 1/3 + 2 (Inverse function)

dx 1
dy = y −2/3
= 3(x − 2)2 dy 3
dx

©Copyright reserved 26
2.6 The derivatives of special functions 2 DIFFERENTIATION

2.6 The derivatives of special functions

Rules 9 and 10 (Exponential functions)

If f (x) = ex , then f ′ (x) = ex

If f (x) = eg(x) , then f ′ (x) = eg(x) g ′ (x)

2
1. g(x) = e3x +7x+2 then
2
g ′ (x) = e3x +7x+2 (6x + 7)

2 5
2. f (x) = e(3x+x ) then
2 5
f ′ (x) = e(3x+x ) 5(3x + x2 )4 (3 + 2x)

x
3. f (x) = e3x(e +1) then
f ′ (x) = e3x (ex + 1)(3xex + (ex + 1)3)

(3x+1)5
4. g(x) = e2x
then
e2x 5(3x+1)4 3−(3x+1)5 e2x 2 15e2x (3x+1)4 −2(3x+1)5 e2x
g ′ (x) = e4x
= e4x

Example 2.13. The demand of a product is given by d = f (p) = 980pe−0.38p , where d is the demand in
thousands and p is the price of the product in Rand.

1. Calculate the demand if the price is R2.

d = f (2) = 980(2)e−0.38(2) = 916.6261969


The demand is 916.6261969 × 1000 = 916626.1969.

2. The marginal demand function is:

f ′ (p) = 980pe−0.38p (−0.38) + 980e−0.38p = −372.4pe−0.38p + 980e−0.38p

3. Calculate and interpret the marginal demand if the price is R3.

f ′ (3) = −372.4(3)e−0.38(3) + 980e−0.38(3) = −43.87916979 × 1000 = −43879.1698


Demand decreases by 43879.1698 for a product if the price increases from R3 to R4.

©Copyright reserved 27
2.6 The derivatives of special functions 2 DIFFERENTIATION

Example 2.14. This example will be discussed in class, but you must try it first and then bring your
calculations to class.
2
The demand (in 100) for a PSP-player in terms of price (in R1000) is given by: D = e−0.2p for p > 0

1. Give the demand for a PSP-player for a price of R2000.

2. Write down the income function.

3. Give the units in which income will be measured.

4. Calculate and interpret the marginal income for a price of R3000.

©Copyright reserved 28
2.7 Higher order derivatives 2 DIFFERENTIATION

Rules 11 and 12 (Logarithmic functions)

dy
If y = ln x, then dx = x1
dy 1 ′ f ′ (x)
If y = ln f (x), then dx = f (x) f (x) = f (x)

dy 15x2 3
1. y = ln(5x3 ), then dx = 5x3
= x

4
2. f (x) = e3x ln(x5 ) then f ′ (x) = e3x 5x
x5
+ ln(x5 )e3x · 3 = e3x x5 + 3 ln(x5 )e3x

3. f (x) = ln( 3x+1


x2
) then
x2 ·3−(3x+1)·2x
′ x4
f (x) = 3x+1
x2

4. f (x) = ln((2x + 1)5 ) then

5(2x + 1)4 · 2 10
f ′ (x) = 5
=
(2x + 1) 2x + 1

2.7 Higher order derivatives


Example 2.15. Calculate the fourth-order derivative of f (x) = x4 − 3x3 + x2 + 7x − 19.

f ′ (x) = 4x3 − 9x2 + 2x + 7

f ′′ (x) = 12x2 − 18x + 2

f ′′′ (x) = 24x − 18

f (iv) (x) = 24

f (v) (x) = 0

2 −7
Example 2.16. Calculate the second-order derivative of f (x) = e3x .
2 −7
f ′ (x) = e3x · 6x

2 −7 2 −7 2 −7 2 −7
f ′′ (x) = e3x · 6 + 6xe3x · 6x = 6e3x + 36xe3x

©Copyright reserved 29
2.8 Optimisation problems 2 DIFFERENTIATION

2.8 Optimisation problems


2.8.1 Maximum and minimum points of a function
The objective of this section is to find the maximum/minimum values of a function, as represented below.

• Absolute max: A Relative max: C and E Absolute min: D Relative min: B

• All max / min values are extreme values.

• Critical values: x–values that might indicate extreme values.

• Consider f ′ (x) = 0. How do we test if k will lead to a relative min or relative max? Calculate f ′′ (x):

– If f ′′ (x) < 0 then k leads to a relative max value.


– If f ′′ (x) > 0 then k leads to a relative min value.
– If f ′′ (x) =0 examine the values of the function at x = k ⇒ inflection point.

Figure (a): Rel max in the point k Figure (b): Rel min in the point k

©Copyright reserved 30
2.8 Optimisation problems 2 DIFFERENTIATION

Example 2.17 (Optimisation with one critical value). Calculate the extreme and critical value(s) for:

f (x) = 16x − x2

f ′ (x) = 16 − 2x
f ′′ (x) = −2

Critical value(s):
Set f ′ (x) = 0 ∴ 16 − 2x = 0 ∴ x = 8
Therefore, x = 8 is a critical value.

Type of extreme value: f ′′ (8) = −2 < 0


∴ x = 8 leads to a relative maximum.

Extreme value: f (8) = 16(8) − 82 = 64

Example 2.18 (Optimisation with two critical value). Calculate the extreme and critical values for:

f (x) = 3x4 − 4x3

f ′ (x) = 12x3 − 12x2


f ′′ (x) = 36x2 − 24x

Critical values:
Set f ′ (x) = 0 ∴ 12x3 − 12x2 ∴ 12x2 (x − 1) = 0 ⇒ x = 0 or x = 1
Therefore, x = 0 and x = 1 are the critical values.

Type of extreme values:


• f ′′ (1) = 36(1)2 − 24(1) = 12 > 0
∴ x = 1 leads to a relative min.
• f ′′ (0) = 36(0)2 − 24(0) = 0
∴ x = 0 leads to an inflection point.
How do we know that this leads to an inflection point? We examine the values of the function at x = 0.

x −0.1 0 0.1
f (x) = 3x4 − 4x3 3(−0.1)4 − 4(−0.1)3 = 0.0043 3(0)4 − 4(0)3 = 0 3(0.1)4 − 4(0.1)3 = −0.0037

Graphical representation of an inflection point:

Extreme value: f (1) = 3(1)4 − 4(1)3 = −1

©Copyright reserved 31
2.8 Optimisation problems 2 DIFFERENTIATION

Example 2.19 (Application 1). The cost (in Rand) to manufacture x products is given by:

C(x) = 0.01x2 + 20x + 1500

The income (in Rand) if x products are sold is given by:

I(x) = 70x − 0.04x2

1. How many products should be sold if we want to maximize the profit?

P (x) = I(x) − C(x)


Note: Profit = Income − Cost
∴ P (x) = 70x − 0.04x2 − (0.01x2 + 20x + 1500) = −0.05x2 + 50x − 1500

P ′ (x) = −0.1x + 50
P ′′ (x) = −0.1

Critical value(s):
Set P ′ (x) = 0 ∴ −0.1x + 50 = 0 ⇒ x = 500
Therefore, x = 500 is a critical value.

Type of extreme value: P ′′ (500) = −0.1 < 0


∴ x = 500 leads to a relative maximum.

Hence, to earn the maximum profit, we need to sell 500 products.

2. Calculate the maximum profit:

P (500) = −0.05(500)2 + 50(500) − 1500 = R11000

Example 2.20 (Application 2: optimisation with one critical value). A manufacturer produces garden
chairs at a cost of R20 a chair, and his overhead cost is R3000 a week. From previous experience he knows
that he will sell 2000 − 40x chairs a week if he charges Rx a chair. What must the price be, and how many
chairs must he sell per week, to maximize his profit?

Given:

• Cost per chair: R20

• Overhead cost: R3000

• Number of chairs: 2000 − 40x

• Sales price: Rx

©Copyright reserved 32
2.8 Optimisation problems 2 DIFFERENTIATION

Solution 2.20.
Profit per chair: x − 20 (price − cost)

Total profit:
P (x) = (2000 − 40x)(x − 20) − 3000 (profit per item × quantity − fixed cost)
P (x) = (2000 − 40x)(x − 20) − 3000 = 2800x − 40x2 − 43000

P ′ (x) = 2800 − 80x


P ′′ (x) = −80

Critical value(s):
Set P ′ (x) = 0 ∴ 2800 − 80x = 0 ∴ x = 35
Therefore, x = 35 is a critical value.

Type of extreme value: P ′′ (35) = −80 < 0 ∴ x = 35 leads to a relative maximum.

Number of chairs to be sold: 2000 − 40x = 2000 − 40(35) = 600

Example 2.21 (Gross profit and net profit). Know what the terms ”gross profit” and ”net profit” mean.

An analysis of the financial statements of a coal mine indicates that when x tons of coal are extracted per
day, the income and cost (in Rands) of the mine are, respectively, given by:

I(x) = 1210x − 2x2


and
C(x) = x2 − 2x + 1000
The mine is taxed at a rate of 40% on its gross profit.

1. Determine the value of x that maximises the income.

I ′ (x) = 1210 − 4x
I ′′ (x) = −4

Critical value(s):
Set I ′ (x) = 0 ∴ 1210 − 4x = 0 ⇒ x = 302.5
Therefore, x = 302.5 is a critical value.

Type of extreme value: I ′′ (302.5) = −4 < 0


∴ x = 302.5 leads to a relative maximum.

2. Calculate the gross profit and the value of x that maximises the gross profit.

GP (x) = I(x) − C(x) = 1210x − 2x2 − (x2 − 2x + 1000) = 1212x − 3x2 − 1000

©Copyright reserved 33
2.8 Optimisation problems 2 DIFFERENTIATION

GP ′ (x) = 1212 − 6x
GP ′′ (x) = −6

Critical value(s):
Set GP ′ (x) = 0 ∴ 1212 − 6x = 0 ⇒ x = 202
Therefore, x = 202 is a critical value.

Type of extreme value: GP ′′ (202) = −6 < 0


∴ x = 202 leads to a relative maximum.

3. Calculate the net profit and the value of x that maximises the net profit.

N P (x)
= GP (x) − 0.4GP (x) or N P (x) = 0.6GP (x)
= 1212x − 3x2 − 1000 − 0.4(1212x − 3x2 − 1000)
= 727.2x − 1.8x2 − 600

N P ′ (x) = 727.2 − 3.6x


N P ′′ (x) = −3.6

Critical value(s):
Set N P ′ (x) = 0 ∴ 727.2 − 3.6x = 0 ⇒ x = 202
Therefore, x = 202 is a critical value.

Type of extreme value: N P ′′ (202) = −3.6 < 0


∴ x = 202 leads to a relative maximum.

2.8.2 The basics of partial differentiation


Example 2.22. Suppose the manufacturer produce x units of product X and y units of product Y. The
cost function in Rand is given by:

z = C(x, y) = 35x − 0.05x2 + 32y − 0.04y 2 + 0.03xy + 400

Marginal cost function:

∂z
∂x = 35 − 0.1x + 0.03y

Rate of change of z with respect to x for y constant

∂z
∂y = 32 − 0.08y + 0.03x

Rate of change of z with respect to y for x constant

©Copyright reserved 34
2.8 Optimisation problems 2 DIFFERENTIATION

Interpretation of the marginal cost function at (100, 150):

∂z
∂x = 35 − 0.1(100) + 0.03(150) = 29.5
The cost increases with R29.50 if an extra unit of product X is produced, when there are 150 units
of product Y produced (i.e., product Y is kept constant at 150).

∂z
∂y = 32 − 0.08(150) + 0.03(100) = 23
The cost increases with R23.00 if an extra unit of product Y is produced, when there are 100 units
of product X produced (i.e., product X is kept constant at 100).

More examples of partial differentiation


3 −2y)
1. z = 3x2 + e(x

∂z 3
= 6x + e(x −2y) (3x2 )
∂x

∂z 3
= e(x −2y) (−2)
∂y

2. z = 5x ln(x2 + 7y)

∂z 2x
= 5x 2 + ln(x2 + 7y)·5
∂x x + 7y

∂z 7 35x
= 5x 2 + ln(x2 + 7y)·0 = 2
∂y x + 7y x + 7y

Interpretation of partial derivatives

The total production cost (in R100) of a factory per year, is a function of the number of spare parts
produced (in 1000) and the number of workers employed, namely:
C(p, w) = p2 + 2p + w2 − 10w − pw + 60
Where p is the number of spare parts produced (in 1000) and w is the number of labourers.

∂C(p, w)
= 2p + 2 − w
∂p
∂C(p, w)
= 2w − 10 − p
∂w

The interpretation of the marginal cost function ∂C(1,5)


∂p = 2(1) + 2 − 5 = −1 is as follows:
Cost decreases with R100 if spare parts increase from 1000 to 2000 and 5 workers are used.

The interpretation of the marginal cost function: ∂C(3,4)


∂w = 2(4) − 10 − 3 = −5 is as follows:
Cost decreases with R500 if workers increase from 4 to 5 and spare parts stay constant at 3000.

©Copyright reserved 35
3 INTEGRATION

3 Integration
Integration concerns the converse of the differentiation process: the original function must be recovered
from a given derived function. See the diagram below:

3.1 Indefinite integrals


R
: integral sign F (x): anti f (x): integrand dx: operation c: integral
derivative constant

Why the constant c in integration? Say the original function is y = f (x) = x3 +5. If you differentiate
the function you get:
d(x3 + 5)
= 3x2 + 0
dx
Now the derivative is integrated, and the original function should be recovered.

3x3
Z
3x2 dx = = x3
3

But this is not exactly the original function. Therefore, a constant c is added to x3 to compensate for the
constant that became zero when differentiated. That is,
Z
3x2 dx = x3 + c .

©Copyright reserved 36
3.1 Indefinite integrals 3 INTEGRATION

Rule 1
Z
1
xn dx = xn+1 + c for n ̸= −1
n+1

x6
Z
1. x5 dx = +c
6

x−1
Z Z
1 −2 1
2. dx = x dx = +c=− +c
x2 −1 x
Note: You do not integrate the function in the denominator. Move the variable to the numerator
as a power function.

Z √ Z 5 5
3 2x 2
x2
3. x3 dx
= x dx = 5 + c = 2 +c
2
5
Note: You do not integrate the function in the root. Rewrite as a power function.

x2
Z Z
4. x dx = x1 dx = +c
2

Rule 2
Z Z
xf (x) dx = k f (x) dx

x−8 −100
Z Z Z
800 1
1. dx = 800 dx = 800 x−9 dx = 800 +c= +c
x9 x9 −8 x8

x1
Z Z
2. 8 dx = 8x0 dx = 8 + c = 8x + c
1

©Copyright reserved 37
3.1 Indefinite integrals 3 INTEGRATION

Rule 3
Z
ex dx = ex + c
Z
f ′ (x)ef (x) dx = ef (x) + c

Z
2 +5x 2 +5x
1. (10x + 5)e5x dx = e5x +c

Z Z
2 1
2x3 +3x2 3 2 1 3 2
2. (x + x)e dx = 6(x2 + x)e2x +3x dx = e2x +3x + c
6 6
Note: The function next to ef (x) should be f ′ (x); a constant can be used for correction. If you
correct with 6 inside, you have to times by 61 outside the integral, 16 · 6 = 1

Z Z
2x
3. 16e dx = 8 2e2x dx = 8e2x + c

Z Z Z  
− x4 − x4 1 −x x
4. 4e dx = 4 e dx = 4(−4) − e 4 dx = −16e− 4 + c
4

Rule 4
Z
1
dx = ln(x) + c, x > 0
x
1
R
The answer could also be given as x dx = ln |x| + c.

f ′ (x)
Z
dx = ln(f (x)) + c, f (x) > 0
f (x)
R ′ (x)
The answer could also be given as ff (x) dx = ln |f (x)| + c.

f ′ (x)[f (x)]−1 dx = ln(f (x)) + c


R
Note:

Z Z
1 1 1 1
1. dx = dx = ln |x| + c
2x 2 x 2
Z
6x + 1
2. dx = ln |3x2 + x| + c
3x2 + x

6x2 + 12 2(3x2 + 6) 3x2 + 6


Z Z Z
3. dx = dx = 2 dx = 2 ln |x3 + 6x| + c
x3 + 6x x3 + 6x x3 + 6x

©Copyright reserved 38
3.2 Definite integrals 3 INTEGRATION

Rule 5
Z
1
f ′ (x)[f (x)]n dx = [f (x)]n+1 + c for n ̸= −1
n+1

(x2 + 2x + 1)6
Z
1. (2x + 2)(x2 + 2x + 1)5 dx = +c
6

1 (t3 + 6t2 )7 (t3 + 6t2 )7


Z Z
2 3 2 6 1
2. (t + 4t)(t + 6t ) dt = 3(t2 + 4t)(t3 + 4t)(t3 + 6t2 )6 dt = +c= +c
3 3 21 21

1 (x3 − x6 )−9 (x3 − x6 )−9


Z Z
6 −10 1
3. 2 5 3
(x − 2x )(x − x ) dx = 3(x2 − 2x5 )(x3 − x6 )−10 dx = +c = +c
3 3 −9 −27

3
(x2 + 3) 2
Z Z Z
1 1 3
p
2 2
4. 2
6x x + 3 dx = 6x(x + 3) 2 dx = 3 2x(x + 3) 2 dx = 3 3 + c = 2(x2 + 3) 2 + c
2

Rule 6

Z Z Z
[f (x) + g(x)] dx = f (x) dx + g(x) dx
Z Z Z
[f (x) − g(x)] dx = f (x) dx − g(x) dx

x3 2x2
Z Z Z Z
1. (x2 + 2x − 1) dx = x2 dx + 2x dx − dx = + −x+c
3 2

3.2 Definite integrals


• Z
Indefinite integral
f (x) dx = F (x) + c

• Definite integral
Z b
f (x) dx = [F (x)]ba = F (b) − F (a)
a
A definite integral has a definite numerical limit. This value may geometrically be interpreted to be
a particular area under a given curve.

Consider the area under the continuous curve, y = f (x), between a and b represented in the figures on the
following page. The shaded area A, enclosed by the curve y = f (x) and the x - axis between the points
x = a and x = b in the domain, is to be determined. In the figure to the left, the area under the curve is
divided into four rectangles. The width of the first rectangle is ∆x1 = x2 − x1 and height f (x1 ). The area
of this rectangle is f (x1 ) ∆x1 . In general, the ith rectangle’s width is ∆xi = xi+1 − xi and height f (xi ).

©Copyright reserved 39
3.2 Definite integrals 3 INTEGRATION

The approximate total area for the figure to the left above is given by:
4
X
A∗ = f (xi )∆xi
i=1

Note that A∗ is an overestimate of the true value of A, because of the unshaded triangular portions not
under the curve. If the unshaded portions can be reduced in size and become close to zero, the approximate
value of A∗ will correspondingly approach the true value of A. This result will be achieved if the number
of rectangles (n) increases and the width of the rectangles is shortened indefinitely, for example, the figure
to the right. Performing this operation at a limit, we obtain the true area A.
Z b n
X n
X
f (x) dx = f (xi )∆xi = A∗ = area A
a i=1 i=1

Remark 5. When n → ∞, then the limit of the sum operation can be substituted by the definite integral
sign from a to b and f (xi )∆xi = f (x) dx because infinitely small changes are made in the width of the
Rb
rectangles. a f (x) dx is referred to as a Riemann integral.

Properties 1 to 6 for definite integrals below are given without proof.

Property 1: The interchanging of the limits of integration changes the sign of the definite integral.
Z a Z b
f (x) dx = − f (x) dx
b a

5 5
x3 53 13
Z
124
x2 dx = = − =
1 3 1 3 3 3

1 1 5 1
x3 13 53
Z Z Z
2 124 2
x dx = = − =− . Therefore x dx = − x2 dx.
5 3 5 3 3 2 1 5

©Copyright reserved 40
3.2 Definite integrals 3 INTEGRATION

Property 2: A definite integral has a value of zero when the two limits are identical.
Z b
f (x) dx = 0
a

3 3
x4 34 34
Z
x3 dx = = − =0
3 4 3 4 4

Property 3
Z b Z b
−f (x) dx = − f (x) dx
a a

3 3
x4 34 14
Z
80
−x3 dx = − =− + = − = −20
1 4 1 4 4 4

3  4 3  4
14
Z   
x 3 80
− x3 dx = − =− − =− = −20
1 4 1 4 4 4

Property 4
Z b Z b
kf (x) dx = k f (x) dx
a a

3 3
4x4
Z
3
4x dx = = 34 − 14 = 81 − 1 = 80
1 4 1
!
3 3
x4 34 14
Z  
3 80
4 x dx = 4 =4 − =4· = 80
1 4 1 4 4 4

Property 5
Z b Z b Z b
[f (x) ± g(x)] dx = f (x) dx ± g(x) dx
a a a

3 3 3 3 3
x4 34 14
Z Z Z  
3 3
(x + 1) dx = x dx + 1 dx = +x = − + (3 − 1) = 20 + 2 = 22
1 1 1 4 1 1 4 4

©Copyright reserved 41
3.2 Definite integrals 3 INTEGRATION

Property 6
Z d Z b Z c Z d
f (x) dx = f (x) dx + f (x) dx + f (x) dx (where q < b < c < d)
a a b c

Z3 3
3 x4 34 14
x dx = = − = 20
4 1 4 4
1

Z5 5
x4 54 34
x3 dx = = − = 136
4 3 4 4
3

Z5 5
x4 54 14
x3 dx = = − = 156
4 1 4 4
1

Z5 Z3 Z5
Therefore, f (x) dx = f (x) dx + f (x) dx
1 1 3

Example 3.1 (Property 6). Calculate the area between the function f (x) = x3 , the x-axis, the line x = −3
and the line x = 5.

5 5
x4 (5)4 (−3)4
Z
Solution 3.1 (Incorrect method). x3 dx = = − = 156.25 − 20.25 = 136
−3 4 −3 4 4

©Copyright reserved 42
3.2 Definite integrals 3 INTEGRATION

Solution 3.1 (Correct method). Hint: Use Property 6 - The integral should be divided into two sub-
integrals, to separate the positive and negative areas.
Z 0 
3
Note: We took the absolute value of the first term x dx , since this area is below the x-axis.
−3
Z 0 Z 5
3
Area = x dx + x3 dx
−3 0
x4 x4 5
= −30 + 0
4 4
04 (−3)4
 4
04

5
= − + −
4 4 4 4
81 625
= − +
4 4
81 625
= +
4 4
706
= = 176.5 units2
4

Example 3.2 (Property 6). Write down the sub-integrals to represent how the shaded area can be calcu-
lated.

Solution 3.2.

Z −2 Z 0.5 Z 4 Z 4.5
f (x) dx + f (x) dx + f (x) dx + f (x) dx
−3 −2 0.5 4

or
Z −2 Z 0.5 Z 4 Z 4.5
− f (x) dx + f (x) dx − f (x) dx + f (x) dx
−3 −2 0.5 4

or
Z −3 Z 0.5 Z 0.5 Z 4.5
f (x) dx + f (x) dx + f (x) dx + f (x) dx
−2 −2 4 4

©Copyright reserved 43
3.3 Some economic applications of integrals 3 INTEGRATION

3.3 Some economic applications of integrals


3.3.1 Indefinite integrals

Example 3.3. Calculate the total cost function C(p) given the following:

• Marginal cost function: C ′ (p) = 20e0.4p

• Fixed cost CF = 200

Solution 3.3.
Z Z Z Z
′ 0.4p 0.4p 20
C(p) = C (p)dp = 20e dp = 20 e dp = 0.4e0.4p dp = 50e0.4p + c
0.4
But C(0) = 200.

Therefore, 50e0.4(0) + c = 200 ∴ 50(1) + c = 200 ∴ c = 150

Total cost function: C(p) = 50e0.4p + 150

3.3.2 Definite integrals


Example 3.4. Consider he demand and supply of light bulbs (in 1000’s):

D(p) = 16 − p2
S(p) = 4p + p2
p = price in Rand

Calculate the consumers’ surplus and producers’ surplus when the market is in equilibrium.

©Copyright reserved 44
3.3 Some economic applications of integrals 3 INTEGRATION

Solution 3.4.

Equilibrium price:

D(p) = S(p)
16 − p2 = 4p + p2
2p2 + 4p − 16 = 0
p2 + 2p − 8 = 0
(p + 4)(p − 2) = 0
∴ p = −4 or p=2

Therefore, the equilibrium price is R2.

Consumers’ surplus:

D(p) = 0
16 − p2 = 0
(4 − p)(4 + p) = 0
∴p=4 or p ̸= −4

(A negative value of p implies a non-economically viable price)

To obtain the consumers’ surplus, we integrate over the demand function:


Z 4
D(p)dp
2

where R2 is the equilibrium price and R4 is found by setting D(p) = 0.

4 4 4
p3 43 23
Z Z    
2
D(p)dp = 16 − p dp = 16p − = 16(4) − − 16(2) − = 42.6667 − 29.3333
2 2 3 2 3 3
= 13.3334 × 1000 = R13333.34

Note that the units of consumer surplus are (demand units) × (price units) = 1000 × 1 = 1000

©Copyright reserved 45
3.3 Some economic applications of integrals 3 INTEGRATION

Producers’ surplus:

S(p) = 0
4p + p2 = 0
p(4 + p) = 0
∴p=0 or p ̸= −4
(A negative value of p implies a non-economically viable price)

To obtain the producers’ surplus, we integrate over the supply function:


Z 2
S(p)dp
0

where R0 is found by setting S(p) = 0 and R2 is the equilibrium price.

2 2 2
4p2 p3 (2)3
Z Z  
2
S(p)dp = 4p + p dp = + = 2(22 ) + = 10.6667 × 1000 = R10666.67
0 0 2 3 0 3

Note that the units of producer surplus are (supply units) × (price units) = 1000 × 1 = 1000

3.3.3 More examples


Example 3.5. Consider the following:
• Marginal cost function (in R100) to produce q units: C ′ (q) = q 2 − 2q + 10
• Fixed cost is R2500.
1. Calculate the total cost function.
Z Z
1
C(q) = C ′ (q)dq = (q 2 − 2q + 10)dq = q 3 − q 2 + 10q + c
3
But C(0) = 25.

Therefore, C(0) = 13 (0)3 − (0)2 + 10(0) + c = 25 ∴ c = 25


Note: The fixed cost is R2500, but the margianl cost function is given in R100 units. Do not
substitute units into the cost function.

Therefore, the total cost function is given by: C(q) = 31 q 3 − q 2 + 10q + 25

©Copyright reserved 46
3.3 Some economic applications of integrals 3 INTEGRATION

2. Calculate the change in cost when production increases from 5 to 10 units.


Z 10 Z 10
C ′ (q)dq = (q 2 − 2q + 10)dq
5 5
10
q3 2q 2
= − + 10q
3 2 5
103 53
 
= − 102 + 10(10) − − 52 + 10(5)
3 3
= 333.3333 − 66.6667
= 266.6667

Example 3.6. The rate at which a secretary’s salary (in Rand/month) changes over the number of years
in service (x), is given by:
2000x
S ′ (x) = 2
x +1
It is also known that she will earn R5084 per month after 3.5 years in service.

1. Calculate the function which expresses her monthly salary in terms of years in service.
Z Z Z
′ 2000 2x
S(x) = S (x) dx = 2
dx = 1000 2
dx = 1000 ln |x2 + 1| + c
x +1 x +1
Now use the information given on salary earned after 3.5 years’ service to determine the value of c.

S(3.5) = 1000 ln |3.52 + 1| + c = 5084


2584.9976 + c = 5084
c = 5084 − 2584.9976
c = 2500.0025
c ≈ 2500

∴ S(x) = 1000 ln |x2 + 1| + 2500

2. Calculate the secretary’s initial salary per month.

To calculate the initial salary, substitute x with zero.

S(0) = 1000 ln |02 + 1| + 2500 = 2500

∴ Initial salary is R2500.

©Copyright reserved 47
3.3 Some economic applications of integrals 3 INTEGRATION

Example 3.7. The marginal income from the sale of the q th book is given by:

I ′ (q) = 45 − 0.21 q − 0.01q with 0 ≤ q ≤ 1000
Calculate the additional income earned when sales increase from 400 to 900 books.
Z 900 Z 900
′ √
I (q)dq = (45 − 0.21 q − 0.01q)dq
400 400
3 900
q2 0.01q 2
= 45q − 0.21 3 −
2
2 400
900
3
= 45q − 0.14q − 0.005q 2
2

400
3 3
= 45(900) − 0.14(900) − 0.005(9002 ) − [45(400) − 0.14(400) 2 − 0.005(4002 )]
2

= 16590
The additional income earned is R16590.

Example 3.8. A sales representative sells motor polish. When q bottles of polish are sold, the mariginal
income of the q th bottle will be equal to
I ′ (q) = 34 − 0.06q − 0.0003q 2 with 0 ≤ q ≤ 400
Motor polish cost R10 per bottle and the sales representative must pay a once-off registration fee of R50.
1. Calculate the total cost and total income functions when q bottles of polish are sold.
IncomeRfunction: R
I(q) = I ′ (q)dq = (34 − 0.06q − 0.0003q 2 )dq = 34q 2 − 0.03q 2 − 0.0001q 3 + c
But I(0) = 0 [When 0 bottles of polish are sold, the income will be equal to R0]
Therefore, the income function is given by: I(q) = 34q − 0.03q 2 − 0.0001q 3
Cost function:
C(q) = 10q + 50

2. Calculate the value of q which will maximise profit.


The profit function is:
P (q) = I(q) − C(p) = 34q − 0.03q 2 − 0.0001q 3 − (10q + 50) = 24q − 0.03q 2 − 0.0001q 3 − 50
To obtain the critical value(s), set P (q) = 0:
P ′ (q) = −0.0003q 2 − 0.06q + 24 = 0
√ √
0.06± (−0.06)2 −4(−0.0003)(24) 0.06± 0.0324
q= 2(−0.0003) = −0.0006 [Use quadratic formula to solve for q]
q = 200 or q = −400 → economical unacceptable.
Therefore, the critical value is q = 200.
P ′′ (q) = −0.0006q − 0.06
P ′′ (200) = −0.0006(200) − 0.06 = −0.18 < 0 ∴ q = 200 leads to a relative max.

3. Calculate the maximum profit.


P (200) = 24(200) − 0.03(200)2 − 0.0001(200)3 − 50 = 2750
Maximum profit is R2750.

©Copyright reserved 48
4 MATRICES

4 Matrices
4.1 Introduction to matrix concepts
A matrix is a rectangular (or square) array of real numbers arranged in rows and columns. Matrices are
denoted by capital letters and the elements of a matrix by lower case letters. Lower case letters with double
subscripts, such as xij , indicate the element in matrix X located in the ith row and j th column. Consider
the example of matrix A below:
   
a11 a12 a13 5 1 5
A= =
a21 a22 a23 4 2 7

The element in the second row and first column is indicated by a21 .

The order (or dimension) of a matrix is given as m × n where m denotes the number of rows and
n denotes the number of columns. A matrix is square if m = n. The order of the matrix in the above
example (i.e., matrix A) is 2 × 3. Consider another example:
 
0 1
B=
2 3

Matrix B is a 2 × 2 square matrix, or a matrix of order 2.

Vectors
A vector is an array (or matrix) of 1 row and n columns (row vector), or 1 column and n rows (column
vector).

Example of a row vector : 1 2 4 is a 1 × 3 row vector.
 
1
Example of a column vector : 2 is a 3 × 1 column vector.
4

Scalar
A scalar is a single value, or a 1 × 1 matrix. For example, the value 4 is a scalar.

4.2 Matrix operations


Remark 6. Matrices can only be added or subtracted if they are of the same order. If matrix addition or
subtraction is not possible, the term undefined is used to describe the result.

Consider the following matrices for the illustrative examples discussed below:
 
      1
1 −2 2 5 1 1 2 
A= , B= , C= , D = 0 and E = −2 4
3 4 −1 1 1 3 1
2

©Copyright reserved 49
4.2 Matrix operations 4 MATRICES

4.2.1 Matrix addition


     
1 −2 2 5 3 3
• A+B = + =
3 4 −1 1 2 5
 
  1
2 5
• B+D = + 0 = undefined (not possible to calculate)

−1 1
2

4.2.2 Matrix subtraction


     
1 1 2 1 1 2 0 0 0
• C −C = − =
1 3 1 1 3 1 0 0 0

Remark 7. A matrix with all elements equal to zero is called a zero matrix.

4.2.3 Transpose of a matrix


The transpose of a matrix, denoted by ′ , is simply a flipped version of the original matrix. We can transpose
a matrix by switching its rows with its columns.

• E = −2 4 with e11 = −2 (element in first row, first column) and e12 = 4 (element in first row,


second column).
 
′ −2
Therefore, the transpose is E = .
4
 
2 5
• B= with b11 = 2, b12 = 5, b21 = −1, b22 = 1.
−1 1
 
′ 2 −1
Therefore, the transpose is B = .
5 1
Remark 8. The transpose of a row vector gives a column vector, and the transpose of a column vector
gives a row vector.

4.2.4 Scalar multiplication


Scalar multiplication refers to the product of a real number (or scalar) and a matrix. In scalar multiplica-
tion, each entry in the matrix is multiplied by the given scalar. For example:
   
1 −2 2 −4
2A = 2 =
3 4 6 8

©Copyright reserved 50
4.2 Matrix operations 4 MATRICES

4.2.5 Matrix multiplication


For the multiplication of any two matrices to be defined, the number of columns in the first matrix must be
equal to the number of rows in the second matrix. The remaining values define the new order. For example,
the multiplication of matrices AB has the order of AB = (2 × 2)(2 × 2). The middle two values represent
the number of columns in matrix A and the number of rows in matrix B, respectively. The remaining
values (on the outside) define the new order, i.e., 2 × 2. Consider the examples below.

      
1 −2 2 5 (1)(2) + (−2)(−1) (1)(5) + (−2)(1) 4 6
AB = = =
3 4 −1 1 (3)(2) + (4)(−1) (3)(5) + (4)(1) 2 19

    
2 5 1 −2 17 16
BA = =
−1 1 3 4 2 6
Note: AB ̸= BA

 
 1

2 5  
BD = 0 = undefined
−1 1
2
Note: Order of BD = (2 × 2)(3 × 1). Since the number of rows in matrix B is different from the number
of columns in matrix D, the matrix multiplication is undefined.

The order of EAE ′ is (1 × 2)(2 × 2)(2 × 1) = (1 × 1).

4.2.6 The identity matrix (I)


The identity matrix is always a square matrix, has 1’s on the diagonal and 0’s elsewhere. Consider the
following matrices:
 
  1 1
1 5
A= and B = 1 −2
−1 3
2 0

Use the identity matrix of order 2 when multiplying with matrix A:


    
1 5 1 0 1 5
AI = = =A
−1 3 0 1 −1 3
    
1 0 1 5 1 5
IA = = =A
0 1 −1 3 −1 3

Use the identity matrix of order 3 when multiplying with matrix B:


    
1 0 0 1 1 1 1
IB = 0 1 0 1 −2 = 1 −2 = B
0 0 1 2 0 2 0

©Copyright reserved 51
4.2 Matrix operations 4 MATRICES

Remark 9. You will not be given the identity matrix to solve problems, as in the example below. You
must be able to determine the order yourself, such that the particular operation is valid.
Determine A − 4I:
         
1 5 1 0 1 5 4 0 −3 5
A − 4I = −4 = − =
−1 3 0 1 −1 3 0 4 −1 −1

Example 4.1. Four different types of air fryers are sold by two retailers:

Type
Single basket Dual basket Oven Dual stack
Retailer 1 400 250 260 80
Retailer 2 300 100 240 180
 
    1
400 250 260 80 1 1
. Then E ′ = 1 1 and E ′ = 1 1 1 1 .
 
Let S = , E2 = and E4 =  2 4
300 100 240 180 1  1
1
 
12
15
Let P ′ = 
 
16 be the profit (in R100) for the four types. Then P = 12 15 16 20 .

20

Use matrix multiplication to calculate the following:


1. The total number of air fryers sold for Retailer 1 and Retailer 2.
Matrix notation: SE4 (2 × 4)(4 × 1) = (2 × 1)
 
  1  
400 250 260 80 1 = 990

300 100 240 180 1 820
1

2. The total number of air fryers sold per air fryer type.
Matrix notation: E2′ S (1 × 2)(2 × 4) = (1 × 4)
 
 400 250 260 80 
1 1 = 700 350 500 260
300 100 240 180

3. Calculate the total profit for Retailer 1 and Retailer 2.


Matrix notation: SP ′ (2 × 4)(4 × 1) = (2 × 1)
 
  12  
400 250 260 80 15 = 14310

300 100 240 180 16 12540
20

©Copyright reserved 52
4.3 The determinant of a matrix 4 MATRICES

4.3 The determinant of a matrix


• The determinant is indicated by |A|.

• The matrix A must be square.

• |A| is a unique scalar value.

4.3.1 The determinant of a 2 × 2 matrix


 
a11 a12
For a 2 × 2 matrix A = the determinant is calculated using
a21 a22

a11 a12
|A| = = a11 a22 − a12 a21 .
a21 a22
 
2 5
For example, if A = , then
−1 1

2 5
|A| = = 2(1) − 5(−1) = 7.
−1 1

The properties of 2 × 2 matrices are given below. Note that all the properties will hold for any square
matrix.

Property 1

The determinant of a matrix A has the same value as that of its transpose matrix, A′ . That is,

|A| = |A′ |.
 
2 5
If A = then |A| = 7.
−1 1
 
′ 2 −1 2 −1
Now, A = so that |A′ | = = 2(1) − 5(−1) = 7.
5 1 5 1

Property 2

Interchanging any two rows (or columns) will alter the sign, but not the numerical value, of the
determinant.
 
2 5
If A = then |A| = 7.
−1 1
−1 1
Interchanging two rows: = −7
2 5
5 2
Interchanging two columns: = −7
1 −1

©Copyright reserved 53
4.3 The determinant of a matrix 4 MATRICES

Property 3

Multiplying any one row (or column) by a scalar k, will change the value of the determinant k-fold.
 
2 5
If A = then |A| = 7.
−1 1
Multiplying the first row by k = 10:

20 50
= 20(1) − 50(−1) = 70
−1 1

Property 4

If each element of a row (or column) is added to (or subtracted from) the corresponding element of
another row (or column), the value of the determinant remains the same.
 
2 5
If A = then |A| = 7.
−1 1
Add the first row and the second row, and place the sum in the first row:

1 6
= 1(1) − 6(−1) = 7.
−1 1

Property 5

If one row (or column) is a multiple of another row (or column), then the determinant is zero.

1 4
|B| = = 1(8) − 4(2) = 0
2 8
Note that the second row is a multiple (×2) of the first row.

Property 6

If one row (or column) of a matrix contains only zeros, then the value of the determinant is zero.

1 2
|B| = = 1(0) − 2(0) = 0
0 0

©Copyright reserved 54
4.3 The determinant of a matrix 4 MATRICES

4.3.2 The determinant of a 3 × 3 matrix


The determinant of a 3×3 matrix can be determined by co-factor expansion. Consider the matrix A = (aij )
with i rows and j columns. For a 3 × 3 matrix i = j = 3, for example:
 
a11 a12 a13
A = a21 a22 a23 
a31 a32 a33
Definition 5 (Defining the co-factor).
Cij = (−1)i+j × (Determinant of the matrix which remains after deleting the ith row and j th column)

a11 a12 a13


a22 a23
C11 = (−1)1+1 × a21 a22 a23 = (−1)2
a32 a33
a31 a32 a33
Deleting row 1 and column 1

The determinant of A for expansion along the ith row is:


|A| = ai1 Ci1 + ai2 Ci2 + ai3 Ci3

More specifically, the determinant of A for expansion along row 1 (i = 1) is:


|A| = a11 C11 + a12 C12 + a13 C13
a22 a23 a a a a
= a11 (−1)1+1 + a12 (−1)1+2 21 23 + a13 (−1)1+3 21 22
a32 a33 a31 a33 a31 a32
a22 a23 a a a a
= a11 − a12 21 23 + a13 21 22
a32 a33 a31 a33 a31 a32
= a11 (a22 a33 − a23 a32 ) − a12 (a21 a33 − a23 a31 ) + a13 (a21 a32 − a22 a31 )
= a11 a22 a33 − a11 a23 a32 − a12 a21 a33 + a12 a23 a31 + a13 a21 a32 − a13 a22 a31
= a11 a22 a33 + a12 a23 a31 + a13 a21 a32 − a13 a22 a31 − a11 a23 a32 − a12 a21 a33

Alternatively, the first two columns of matrix A can be added to the right. Then, the determinant of A
can be calculated by taking the sum of the products of the left diagonals minus the sum of the products
of the right diagonals (as illustrated below). This illustrative method is used in Quantitative Statistical
Techniques, Swanepoel, et al.

The determinant of A can also be expanded along the jth column, such that:
|A| = a1j C1j + a2j C2j + a3j C3j .

The determinant of A for expansion along column 1 (j = 1) is:


|A| = a11 C11 + a21 C21 + a31 C31

©Copyright reserved 55
4.3 The determinant of a matrix 4 MATRICES

Example 4.2. Calculate the following determinant using co-factor expansion:

1 2 3
|A| = 4 3 1
0 1 −2

Solution 4.2.
The determinant of A for expansion along row 1 is:

|A| = a11 C11 + a21 C21 + a31 C31


3 1 4 1 4 3
= 1(−1)2 + 2(−1)3 + 3(−1)4
1 −2 0 −2 0 1
= −7 + 16 + 12
= 21

The determinant of A for expansion along column 1 is:

|A| = a11 C11 + a21 C21 + a31 C31


3 1 2 3 2 3
= 1(−1)2 + 4(−1)3 + 0(−1)4
1 −2 1 −2 3 1
= −7 − 4(−7) + 0
= 21

Remark 10. The determinant of A can be determined with expansion along any row or column in the
matrix.

• If |A| = 0 then the matrix A is singular.

• If |A| =
̸ 0 then the matrix A is non-singular.

Remark 11. Determinants for higher-order matrices (i.e., order 4 and higher) are only expected to be
calculated in Excel.

©Copyright reserved 56
4.4 Cramer’s rule used to solve a system of linear equations 4 MATRICES

4.4 Cramer’s rule used to solve a system of linear equations


4.4.1 Set of two linear equations
Consider the set of two linear equations:

a11 x1 + a12 x2 = b1
a21 x1 + a22 x2 = b2
     
a11 a12 x1 b
In matrix notation we have AX = B with A = ,X= and B = 1 .
a21 a22 x2 b2

The linear equations can be solved using Cramer’s rule defined as follows:
b1 a12 a11 b1
b2 a22 a21 b2
x1 = and x2 =
|A| |A|
Note: The above holds only if A is non-singular (i.e., |A| =
̸ 0).

Example 4.3. Use Cramer’s rule to solve for x1 and x2 in the set of linear equations below:

2x1 − 5x2 = 31
8x1 + 9x2 = −21

     
2 −5 x1 31
Solution 4.3. In matrix notation we have AX = B with A = ,X= and B = .
8 9 x2 −21
Then, we have:
2 −5
|A| = = 2(9) − (−5)(8) = 58
8 9

31 −5
−21 9 31(9) − (−5)(−21) 174
x1 = = = =3
|A| 58 58
2 31
8 −21 2(−21) − (31)(8) −290
x2 = = = = −5
|A| 58 58

4.4.2 Set of three linear equations


Consider the set of three linear equations:

a11 x1 + a12 x2 + a13 xx = b1


a21 x1 + a22 x2 + a23 xx = b2
a31 x1 + a32 x2 + a33 xx = b3
     
a11 a12 a13 x1 b1
In matrix notation we have AX = B with A = a21 a22 a23 , X = x2  and B = b2 .
a31 a32 a33 x3 b3

©Copyright reserved 57
4.4 Cramer’s rule used to solve a system of linear equations 4 MATRICES

The linear equations can be solved using Cramer’s rule defined as follows:

b1 a12 a13
b1 a22 a23
b1 a23 a33
x1 =
|A|

and
a11 b1 a13
a21 b2 a23
a31 b3 a33
x2 =
|A|
and
a11 a12 b1
a21 a22 b2
a31 a32 b3
x3 =
|A|

Example 4.4. Use Cramer’s rule to solve for x1 , x2 and x3 in the set of linear equations below:

x1 − 2x3 = 1
4x1 − 2x2 + x3 = 2
x1 + 2x2 − 10x3 = −1

     
1 0 −2 x1 1
Solution 4.4. In matrix notation: AX = B with A = 4 −2 1 , X = x2  and B =  2 .
1 2 −10 x3 −1

Then, we have:
1 0 −2
|A| = 4 −2 1 = −2
1 2 −10

1 0 −2
2 −2 1
−1 2 −10
x1 =
|A|
−2 1 2 1 2 −2
(−1)2 (1) + (−1)3 (0) + (−1)4 (−2)
2 −10 −1 −10 −1 2
=
−2
18 − 4
=
−2
= −7

©Copyright reserved 58
4.5 The inverse of a matrix used to solve a system of linear equations 4 MATRICES

1 1 −2
4 2 1
1 −1 −10
x2 =
|A|
2 1 4 1 4 2
(−1)2 (1) + (−1)3 (1) + (−1)4 (−2)
−1 −10 1 −10 1 −1
=
−2
−19 + 41 + 12
=
−2
= −17

1 0 1
4 −2 2
1 2 −1
x3 =
|A|
−2 2 4 2 4 −2
(−1)2 (1) + (−1)3 (0) + (−1)4 (1)
2 −1 1 −1 1 2
=
−2
−2 + 10
=
−2
= −4

4.5 The inverse of a matrix used to solve a system of linear equations


If there exists a square, non-singular matrix A, then there exists a square matrix A−1 , such that

A−1 A = I and AA−1 = I

then A−1 is the inverse matrix of A.

   
3 5 7 −5
Example 4.5. Let . Test if is the inverse matrix of A.
4 7 −4 3

Solution 4.5.     
−1 3 5 7 −5 1 0
AA = =
4 7 −4 3 0 1

Remark 12. You do not have to calculate the inverse of a matrix by hand, but you must be able to calculate
the inverse of a matrix using Excel.

©Copyright reserved 59
4.5 The inverse of a matrix used to solve a system of linear equations 4 MATRICES

The matrix A−1 can be used to solve a set of linear equations as follows:

AX = B
−1
A (AX) = A−1 (B)
IX = A−1 B
X = A−1 B

Example 4.6 (Two linear equations). Consider the system of two linear equations:

3x1 + 5x2 = 1
4x1 + 7x2 = 0
 −1  
3 5 7 −5
Solve x1 and x2 using the inverse matrix: A−1 = =
4 7 −4 3
Solution 4.6.

AX = B
    
3 5 x1 1
=
4 7 x2 0

Therefore,

X = A−1 B
      
x1 7 −5 1 7
= =
x2 −4 3 0 −4

Example 4.7 (Three linear equations). Consider the system of three linear equations:

8x1 − x2 = 15
x2 + 5x3 = 1
2x1 + 3x3 = 4
 −1  
8 −1 0 3 3 −5
Solve x1 , x2 and x2 using the inverse matrix: A−1 = 0 1 5 = 1 
14 10 24 −40
2 0 3 −2 −2 8
Solution 4.7.

AX = B
    
8 −1 0 x1 15
0 1 5 x2  =  1 
2 0 3 x3 4

©Copyright reserved 60
4.6 Practical applications 4 MATRICES

Therefore,
X = A−1 B
    
x1 3 3 −5 15
x2  = 1  10 24 −40  1 
14
x3 −2 −2 8 4
 
3(15) + 3(1) − 5(4)
1 
= 10(15) + 24(1) − 40(4)
14
−2(15) − 2(1) + 8(4)
 
28
1  
= 14
14
0
 
2
= 1

0

4.6 Practical applications


Consider the sales of 3 shops at a motor show. Flags, T-shirts and caps are sold.

Flags T-shirts Caps


Shop 1 8 4 10
Shop 2 2 3 14
Shop 3 5 0 6

Suppose the prices of the items are known and are the same for the 3 shops. The prices are R10 for a flag,
R8 for a T-shirt and R5 for a cap. Let:
     
8 4 10 10 1
S = 2 3 14 , P =  8  , and E3 = 1 .
5 0 6 5 1

Use matrix multiplication to calculate the following:


1. The total number of items sold at the 3 shops.
Matrix notation: SE3     
8 4 10 1 22
SE3 = 2 3 14 1 = 19
5 0 6 1 11
The total number of items sold at Shop 1 = 22, at Shop 2 = 19 and at Shop 3 = 11.

2. The total number of flags, T-shirts and caps sold.


Matrix notation: E3′ S  
8 4 10
E3′ S = 1 1 1 2 3 14 = 15 7 30
 

5 0 6
The total number of flags sold = 15, T-shirts = 7 and caps = 30.

©Copyright reserved 61
4.6 Practical applications 4 MATRICES

3. The total income for each shop.


Matrix notation: SP     
8 4 10 10 162
SP = 2 3 14  8  = 114
5 0 6 5 80
The total number of Shop 1 = R162, for Shop 2 = R114 and Shop 3 = R80.

Suppose the income for the 3 shops is known, and the prices of the items are the same at the 3 shops.

Income
Shop 1 162
Shop 2 114
Shop 3 80

To calculate the prices for the items we need to solve for the following linear equations:

8x1 + 4x2 + 10x3 = 162


2x1 + 3x2 + 14x3 = 114
5x1 + 0x2 + 6x3 = 80

    
8 2 10 x1 162
or SX = B such that 2 3 14 x2  = 114.
5 0 6 x3 80
 
9 −12 13
The following is given: |S| = 226 and S −1 1 
= 113 29 −1 −46
−7.5 10 8

Use the information above to calculate the following:

4. Test if S −1 is the inverse of matrix of S.


    
9 −12 13 8 2 10 1 0 0
1 
S −1 S = 29 −1 −46 2 3 14 = 0 1 0 = I
113
−7.5 10 8 5 0 6 0 0 1
Since S −1 S = I, S −1 is the inverse of matrix of S.

5. Calculate the price of a flag by using Cramer’s rule.

162 4 10
114 3 14
80 0 6 2260
x1 = = = 10
|S| 226

©Copyright reserved 62
4.7 Excel functions for matrix algebra 4 MATRICES

6. Calculate the price of a flag by using the inverse matrix.

SX = B
X = S −1 B
      
x1 9 −12 13 162 10
1
x2  =  29 −1 −46 114 =  8 
113
x3 −7.5 10 8 80 5
The price of a flag is R10, same as answer in (5).

4.7 Excel functions for matrix algebra


4.7.1 Calculating the transpose of a matrix
Formula worksheet:

Press Ctrl+Shift+Enter to obtain result below.

Value worksheet:

©Copyright reserved 63
4.7 Excel functions for matrix algebra 4 MATRICES

4.7.2 Calculating the determinant of a matrix


Formula worksheet:

Press Enter to obtain result below.

Value worksheet:

4.7.3 Calculating the inverse of a matrix


Formula worksheet:

Press Ctrl+Shift+Enter to obtain result below.

©Copyright reserved 64
4.7 Excel functions for matrix algebra 4 MATRICES

Value worksheet:

4.7.4 Multiplying two matrices


Formula worksheet:

Press Ctrl+Shift+Enter to obtain result below.

Value worksheet:

©Copyright reserved 65
5 LINEAR PROGRAMMING

5 Linear Programming
In view of the current economic situation worldwide, much attention has been given recent years to the
execution and completion of tasks in the most efficient and economical way possible. In this chapter, we
shall be interested in maximising and minimising linear expressions of the form

b1 x1 + b2 x2 + · · · + bn xn
where the b’s are the coefficients (constants) of the x ’s and the x ’s represent the variables. Two methods
for the optimisation (maximisation or minimisation) of a linear function subject to certain constraints will
be studied, namely the graphical solution and extreme point methods. The function to be optimised
will from now on be known as the objective function. Linear programming, or linear optimization, is
a mathematical technique used to identify the optimal solution to a problem by either maximising or
minimising a linear objective function. This approach is widely applied across various fields, such as
manufacturing, finance, business, and industry, among others.

5.1 Terminology
• Inequalities

◦ Strict inequalities use the ”less than” (<) or ”greater than” (>) symbols, and do not include
equality. These inequalities are represented by dashed lines on a graph.
◦ Weak inequalities use the ”less than or equal to” (≤) or ”greater than or equal to” (≥)
symbols and allow for equality. These inequalities are represented by solid lines on a graph.

• Constraints

◦ Boundaries that limit the numerical value of a variable.

• Feasible region

◦ Also known as the region of feasible solutions.


◦ This is the solution area of the graph, and any point within it is a solution to the system.
◦ The feasible region is determined by observing the inequality signs of the system of constraints:
■ >: shade above the dashed line.
■ ≥ : shade above and including the solid line.
■ <: shade below the dashed line.
■ ≤ : shade below and including the solid line.

• Objective function

◦ This is the function (either profit or cost) to be optimised.

• Optimal solution

◦ The solution that maximises or minimises the objective function, while satisfying all the con-
straints. Take note that there can be more than one optimal solution.

©Copyright reserved 66
5.1 Terminology 5 LINEAR PROGRAMMING

Solving a linear programming problem


For the practical/Excel component of this module (see Practical Guide), the Solver tool in Excel will be
used to answer linear programming related problems.

There are several methods available to solve a linear programming problem, but we will only focus on the
(1) graphical solution method and (2) extreme points method.

1. Graphical solution

This method (also known as the geometrical solution method) is a quick and easy technique with which
to optimise a function with at most three (but preferably two) independent variables, subject to certain
constraints. Because it is difficult to visualise a three-dimensional graphical representation, this method
will only be used in cases with two independent variables.

Before the optimum value of the objective function can be determined, it is necessary to first determine
the region containing all possible solutions (feasible region) and to indicate it on a graph.

Steps to follow:

1. Take the objective function (either profit or cost) and set it equal to any constant (e.g., c).

2. Simplify this equation and write it in terms of a linear equation (y = mx + c).


∆y
3. The slope of the objective function is given by the coefficient of x. Therefore, m = ∆x

4. Draw this slope line on the graph.

5. To maximise the profit function, shift the slope line parallel to the profit function, as far away
from the origin as possible but at least one point on the shifted line should still be within the region
of feasible solutions. The last point this slope line is going to touch will be the optimal solution where
profit will be maximised.

6. To minimise the cost function, shift the slope line parallel to the cost function, as close to the
origin as possible but at least one point on the shifted line should still be within the region of feasible
solutions. The last point this slope line is going to touch will be the optimal solution where cost will
be minimised.

2. Extreme points

The corners of the feasible solution region are known as extreme points. In general, it can be proved
that the solution of a system of linear equations can always be found at at least one of the extreme points.
This method involves evaluating the objective function at the extreme points of the feasible region to help
identify the maximum or minimum value of the objective function.

Before the optimum value of the objective function can be determined, it is necessary to first determine
the region containing all possible solutions (feasible region) and to indicate it on the graph.

©Copyright reserved 67
5.1 Terminology 5 LINEAR PROGRAMMING

Steps to follow:

1. Determine the corners of the feasible region. You can determine an unknown coordinate by:

■ finding the point of intersection where the two linear equations intersect, or
■ using Cramer’s rule to solve the system of linear equations.

2. Calculate the values of the objective function (by substituting the co-ordinates of the corner points
of the feasible region).

3. Identify the co-ordinates that give the optimal solution.

4. For a profit function, the maximum value will be the optimal solution.

5. For a cost function, the minimum value will be the optimal solution.

6. The solution of the linear equations can always be found in at least one of the extreme points.

7. If two points, let’s say C and D give both an optimal solution then all the points on CD will give
the optimal solutions.

Example 5.1. A car manufacturer produces, among others, two model types, namely L and GL. It is
known that for model L the assembly and finishing-off times for one car are, respectively, 25 and 35 hours,
while for model GL, 50 hours are required for assembling and 30 hours for finishing-off. Suppose that for
a given day 1100 hours are available for assembling and 1050 hours for finishing-off. How many cars of
each of the two models must be produced to maximise profit?

Solution 5.1. The problem can be represented as follows in the form of a table:

Model Type
L GL Available Hours
Assembling Time 25 50 1100
Finishing-Off Time 35 30 1050
Number of Units x y

■ Let x be the number of units for model L and y be the number of units for model GL produced per
day.

■ The profit (in R1000) for model L is 10 and model GL is 15.

■ Select x and y such that the profit is maximised. The profit function is given by 10x + 15y.

Constraints. The following constraints exist for the given day’s production:

25x + 50y ≤ 1100


35x + 30y ≤ 1050
x, y ≥ 0 Note: x, y ≥ 0 means that both x and y are at least 0, i.e., x ≥ 0 and y ≥ 0.

©Copyright reserved 68
5.1 Terminology 5 LINEAR PROGRAMMING

Feasible solution area:


• For 25x + 50y = 1100 at x = 0 we get y = 1100
50 = 22 and at y = 0 we get x =
1100
25 = 44.
Therefore, we have coordinates (0, 22) and (44, 0).
• For 35x + 30y = 1050 at x = 0 we get y = 1050
30 = 35 and at y = 0 we get x =
1050
35 = 30.
Therefore, we have coordinates (0, 35) and (30, 0).
Next, you will need to plot and connect the latter co-ordinates to start determining the feasible region:

Graphical representation:
In the graph below, we have shaded the feasible region where all constraints are satisfied.

25x + 50y ≤ 1100 For both these constraints, you will need to shade
35x + 30y ≤ 1050 the region below and including these lines.

You need to shade the region where x and y will be positive,


x, y ≥ 0
meaning greater and equal to zero.

©Copyright reserved 69
5.2 The graphical solution method 5 LINEAR PROGRAMMING

After shading and determining the corner points of the feasible region, we can now use either method find
the optimal solution.

5.2 The graphical solution method


This section discusses the graphical solution method as a continuation of Example 5.1.

Objective function: Maximise 10x + 15y

1. Take the profit function and set it equal to any constant (10x + 15y = c).
c 10
2. Simplify and write it in terms of a linear equation (y = mx + c) : y = 15 − 15 x
∆y
3. The slope for the objective function is: − 10
15 = ∆x

4. Draw this slope line on the graph (see the dotted line on the graph below).

5. To maximise the profit function, shift the slope line parallel to the profit function, as far away from
the origin as possible but at least one point on the shifted line should still be within the region of
feasible solutions. The last point this slope line is going to touch will be the optimal solution where
profit will be maximised – in this case, point C.

Calculate the co-ordinates of the optimal point.


You can determine an unknown co-ordinate (in this case, point C) by:

1. finding the point of intersection where the two linear equations intersect, or

2. using Cramer’s rule (matrix algebra) to solve the system of linear equations.

©Copyright reserved 70
5.2 The graphical solution method 5 LINEAR PROGRAMMING

1. Finding the point of intersection where the two linear equations intersect

The co-ordinates of the point C can be calculated as being (19.5;12.25), seeing that this is the point where
the functions 25x + 50y = 1100 and 35x + 30y = 1050 intersect. The maximum profit is therefore given by
10(19.5) + 15(12.25) = 378.75 (in R1000).

2. Using Cramer’s rule to solve the system of linear equations

The two lines intersecting at point C are:

25x + 50y = 1100


35x + 30y = 1050

In matrix notation we have:


AX = B
where      
25 50 x 1100
A= , X= , B= .
35 30 y 1050

Determinant of A:
25 50
|A| = = (25)(30) − (35)(50) = −1000.
35 30

Thus, solving for x and y, we have:

1100 50 25 1100
1050 30 35 1050
x= = 19.5 and y = = 12.25
−1000 −1000

Hence, the profit is maximised at x = 19.5 and y = 12.25. Given these values for x and y, we have:

• Profit: 10x + 15y = 10(19.5) + 15(12.25) = 378.75

• Assembly time: 25x + 50y = 25(19.5) + 50(12.25) = 1100

• Finishing-off time: 35x + 30y = 35(19.5) + 30(12.25) = 1050

Note that the assembly and finishing-off times are optimally used (that is, within the given constraints).

©Copyright reserved 71
5.3 The extreme point method 5 LINEAR PROGRAMMING

5.3 The extreme point method


This section discusses the extreme point method as a continuation of Example 5.1.

The corners of the feasible region are known as the extreme points. In the case of Example 5.1, we have
four extreme points namely A, B, C and D, calculated in the table below.

Co-ordinates Value of profit function Remark


Extreme points
(x, y) 10x + 15y (max/min)
A (0; 0) 10(0) + 15(0) = 0
B (0; 22) 10(0) + 15(22) = 330
C (19.5; 12.25) 10(19.5) + 15(12.25) = 378.75 Maximum profit
D (30; 0) 10(30) + 15(0) = 300

Since the objective function is a profit function (which we want to maximise), the co-ordinate that will
give the optimal solution will be the co-ordinate with the highest value (point C). Therefore, the maximum
profit is given by 10(19.5) + 15(12.25) = 378.75 (in R1000).

5.4 More examples


Example 5.2. Minimise the cost function: 3x1 + 5x2

Subject to the following constraints:


x1 + 2x2 ≥ 16
x1 + x2 ≥ 10
x1 , x2 ≥ 0

Use both the graphical solution method and extreme point to find the optimal solution for this problem.

©Copyright reserved 72
5.4 More examples 5 LINEAR PROGRAMMING

Solution 5.2.
Firstly, we obtain the region of feasible solutions:

• For x1 + 2x2 = 16 at x1 = 0 we get x2 = 8 and at x2 = 0 we get x1 = 16.


Therefore, we have coordinates: (0, 8) and (16, 0).

• For x1 + x2 = 10 at x1 = 0 we get x2 = 10 and at x2 = 0 we get x1 = 10.


Therefore, we have coordinates: (0, 10) and (10, 0).

Next, you will need to plot and connect these co-ordinates to start determining the feasible region.

In the graph below, we have shaded the feasible region, where all constraints are satisfied:

x1 + 2x2 ≥ 16 For both these constraints, you will need to shade
x1 + x2 ≥ 10 the regionabove and includingthese lines.
You need to shade the region where x1 and x2 will be positive,
x1 , x2 ≥ 0
meaning greater and equal to zero.
Note: x1 , x2 ≥ 0 means that both x1 and x2 are greater than or equal to 0 , i.e., x1 ≥ 0 and x2 ≥ 0.

a) The graphical solution method

1. Take the cost function and set it equal to any constant ( 3x1 + 5x2 = c ).
c
2. Simplify and write it in terms of a linear equation: x2 = 5 − 35 x1
∆x2
3. The slope for the objective function is: − 35 = ∆x1

4. Draw this slope line on the graph (see the dotted line on the graph below).

5. To minimise the cost function, shift the slope line parallel to the cost function, as close to the origin
as possible but at least one point on the shifted line should still be within the region of feasible
solutions. The last point this slope line is going to touch will be the optimal solution where cost will
be minimised.

6. The objective function will be a minimum at point B.

©Copyright reserved 73
5.4 More examples 5 LINEAR PROGRAMMING

The coordinates of point B can be found as (4, 6) using the two lines of intersection:

x1 + 2x2 = 16
x1 + x2 = 10
Using Cramer’s rule to solve this system of linear equations, we have:
 
1 2
• Matrix notation: AX = B with A = , X = xx12 and B = 16
 
10 .
1 1

• You will find the answer to be x1 = 4 and x2 = 6 (try this on your own using Cramer’s rule).

Therefore, the minimum cost is 3(4) + 5(6) = 42.

b) The extreme point method


There are three extreme points namely A, B and C.
The values of the objective function have been calculated in the table below.
The optimal solution will be the co-ordinate with the lowest value (since we want to minimise cost).

Co-ordinates Value of profit function Remark


Extreme points
(x1 , x2 ) 3x1 + 5x2 (max/min)
A (0; 10) 3(0) + 5(10) = 50
B (4; 6) 3(4) + 5(6) = 42 Minimum cost
C (16; 0) 3(16) + 5(0) = 48

The minimum cost is obtained at x = 4 and y = 6, with the minimum cost given by 3(4) + 5(6) = 42.
Thus, the cost function has a minimum of R42 at x1 = 4 and x2 = 6.

©Copyright reserved 74
5.4 More examples 5 LINEAR PROGRAMMING

Example 5.3. Maximise 5x + 3y.

Subject to the following constraints:


x≤5
y ≤ 10
x, y ≥ 0

Use the graphical solution method to find the optimal solution for this linear programming problem.

Solution 5.3. Follow all the relevant steps (see Examples 5.1 & 5.2) to obtain the graphical display:

Know how to draw the linear equations, shade and find the corner/extreme points of the feasible region.

• Take the profit function and set it equal to any constant (5x + 3y = c) so that y = c
3 − 53 x.

• Draw this slope line on the graph (see the dotted line on the graph below).

Therefore, the optimal solution will be at point C where x = 5 and y = 10.


Thus, the maximum is 5(5) + 3(10) = 55.

©Copyright reserved 75
5.4 More examples 5 LINEAR PROGRAMMING

Example 5.4. A construction company has two teams, namely team A and team B. Each team consists
of at least 1 builder. Each builder in team A works 9 hours per day and gets paid R84. Each builder in
team B works 12 hours per day and gets paid R60. The budget for daily wages for the company is R840.
Suppose that on a given day there are 108 man-hours available. The profit for the construction company
on work done by a builder in team A and B is respectively R40 and R70. Let x denote the number of
builders in team A and let y denote the number of builders in team B.

Hint: A question of this format is easier to answer if you construct a table:

Team A (x) Team B (y) Total


Hours 9 12 108
Pay 84 60 840

Answer the following questions:

1. Give the objective function. Maximise 40x + 70y

2. Give the constraints that lead to the region of feasible solutions.

84x + 60y ≤ 840


9x + 12y ≤ 108
x, y ≥ 1

3. Give the time constraint. 9x + 12y ≤ 108

4. Give the payment constraint. 84x + 60y ≤ 840

Example 5.5. Find the constraints to the following LP problem:

©Copyright reserved 76
5.4 More examples 5 LINEAR PROGRAMMING

Solution 5.5.
The first constraint can easily be obtained from the horizontal line intersecting the y-axis at y = 1. The
constraint is: 0 ≤ y ≤ 1.

For the second constraint we need to find the equation of the straight line intersecting the y-axis at y = 2
and the x-axis at x = 4. Here, we have two coordinates, namely, (x1 , y1 ) = (4, 0) and (x2 , y2 ) = (0, 2). We
substitute these coordinates into the equation of a straight line:
y2 − y1
y = y2 + (x − x2 )
x2 − x1
(2) − (0)
y = (2) + (x − (0))
(0) − (4)
1
y =2− x
2

Therefore, the constraints are:


0≤y≤1
1
y+ x≤2
2
x≥0

©Copyright reserved 77

You might also like