Professional Documents
Culture Documents
UNIT/SUBJECT:
COMPUTATIONAL MATHEMATICS
Number system
- Is a set of symbols used to represent values derived from a common base or radix.
- Base refers to the maximum possible number of different digit used in a given system.
- Number systems can be classified into four possible major categories.
1. Decimal number system ( e.g X10)
2. Binary number system ( e.g X2)
3. Octal number system ( e.g X8)
4. Hexadecimal number system ( e.g X16)
ii) 321.62
Solution
- Identify the positions of every digit starting with zero.
=3×102+2×101×1×100+6×10-1×2×10-2
=300+20+1+0.6+0.02
=321.62
Example
- Change the following binary number to decimal number system
(i) 10112
Solution
10112 = N10
- Identify the position of every bit, then
= 1×23+0×22+1×21+1×20
=8+0+2+1
=1110
(ii) 11012
Solution
11012 = k10
- Identify the position of every bit, then
= 1×23+1×22+0×21+1×20
=8+4+0+1
=1310
(iii) 11001.10012
Solution
11001.10012 = k10
- Identify the position of every bit, then
= 1×24+1×23+0×22+0×21+0×20+ . 1×2-1+0×2-2+0×2-3+1×2-4
=16+8+0+0+1+0.5+0.25+0.0625
=25.812510
Base10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Base 16 0 1 2 3 4 5 6 7 8 9 A B C D E F
Example
Convert the following number system to decimal number system
(i) 94B16
Solution
94B16 = N10
- Identify the position of every bit, then
= 9×162+4×161+11×160
=2304+64+11
=237910
(ii) 52D16
Solution
52D16 = N10
- Identify the position of every bit, then
Assignment
Converting binary numbers to decimal number
i) 1011012
ii) 11.110112
iii) 01012
iv) 11112
v) 10110012
Exercise
Convert the following numbers to its binary equivalent.
(i) 3218
(ii) 5268
(iii) 5708
(iv) 8428
Solutions
(i) 3218
Octal 3 2 1
Binary
011 010 001
equivalent
Solutions
(ii) 5268
Octal 5 2 6
Binary 101 010 110
equivalent
Hexa
deci 0 1 2 3 4 5 6 7 8 9 A B C D E F
mal
Deci
mal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
No.
Bina 00 00 00 00 01 01 01 01 10 10 10 10 11 11 11 11
ry 00 01 10 11 00 01 10 11 00 01 10 11 00 01 10 11
Solution
Binary = 1101 0001
Hexadecimal = D 1
Answer 110100012 = D116
Exercise
(ii) 110101112
(iii) 110110012
(iv) 100100012
Solutions
1. 32116
Hexadecimal 3 2 1
Binary 0011 0010 0001
؞32116 = 0011001000012
Rules/steps
To get twos‘ complement of a decimal number e.g 4510
Convert it to its binary equivalent, then;
Ensure that the binary is grouped into 4 bit i.e 4,8,12,…
Find ones‘ complement
Add one (1) from the right to the ones‘ complement
Example
Find twos’ complement of the following numbers
4510 =001011012
Change the binary into ones’ complement
Binary = 001011012
Ones’ complement = 110100102
Twos’ complement = 11010010
+ 1
Twos’ complement = 110100112
Questions
(i) Using 8 bit, find the ones’ complement of 1310
(ii) Using 8 bit notation, find the twos’ complement of 2010
Answers i
Decimal number 152 = Binary 000011112
Decimal number 82 = Binary 000010002
Change 82 = Binary 000010002
= Ones‘ complement 111101112
= Twos‘ complement (111101112+1) = 111110002
Then add the two numbers i.e
000011112 + 111110002 = (1) 0000 01112
= 01112
GRAY CODE
Find the gray code of 010012
Answer
01001 add them in pairs
ꓦꓦ ꓦ ꓦ
01101 gray code
Excess -3
From the previous numbering system in 4 bit, 3 = (0011).
There excess – 3 is (0011).
example
Convert the following hexadecimal numbers to excess -3
a) 6AD16
b) 62510
c) 34B10
(i) Answers
Hexadecimal binary
6 0110
A 1010
D 1101
Then add excess-3 i.e (0011)
6 A D
0110 1010 1101
0011 0011 0011 +
1001 1101 10000
Answer 6ADH = 10011101100002
(ii) Answer
Questions
DISCRETE COUNTING
Content:
Fundamental principal
Permutation and combinations
Binomial expansion
Pascal’s triangle
Expression Expansion Coefficient
(a + b)2 a2+2ba+b2 1 2 1
(a + b)3 a3+3a2b+3ab2+b3 1 3 3 1
(a + b)4 a4+4a3b+6a2b2+4ab3+b4 1 4 6 4 1
The table below shows the coefficients of the expansion of (a + b)n for n = 0,1,2,…7
Expression coefficient
(a + b)0 1
(a + b)1 11
(a + b)2 121
(a + b)3 1331
(a + b)4 14641
(a + b)5 1 5 10 10 5 1
(a + b)6 1 6 15 20 15 6 1
(a + b)7 1 7 21 35 35 21 7 1
(a + b)8 1 8 28 56 70 56 28 8 1
(a + b)9 1 9 36 84 126 126 84 36 9 1
Assignment
Use pascal’s triangle to expand
(i) (m+n)6
(ii) (x + y)9
(iii) (m+n)10
Example 2
Expand (c+4)5
Answer
= c5, c441, c342, c243, c144, 45
= c5, c44, c316, c264, c1256, 1024
= coefficient 1, 5,10,10,5,1
= 1xc5+5x4c4+10x16 c3+10x64 c2+5x256 c1+1x 1024
= c5+20c4+160 c3+640 c2+1280 c1+1024
Example 3
Expand (2x+3y) 4
Answer
= (2x) 4, (2x) 3(3y) 1, (2x) 2(3y) 2, (2x) 1(3y) 3, (3y) 4
= 16x4 +24x3y1+36x2y2+54x1y3+81y4
= coefficient 1, 4,6,4,1
= 1x16x4 +4x24x3y1+6x36x2y2+4x54x1y3+1x81y4
= 16x4 +96x3y1+216x2y2+216x1y3+81y4
Example: 2
2. Expand (1+x)9 up to the term in x3 .use the expansion to estimate (0.98)9 correct to 3
decimal place.
Solution
(1+x) = 19,18 x1, 17 x2, 16 x3, 15 x3, 14 x4, 13 x5, 12 x6, 11 x7, x8
= 1, 9, 36, 84, 126, 84, 36, 9, 1
= 1+9x+36x2 +84x3 +…
(1+x)9 = 1+9x+36x2 +84x3 +…
Again ;
(0.98)9 = (1+x)9
0.98 = 1+x
Example: 3
Expand (1 + ½ x) 10 up to the the term in x3 in ascending power of x. Hence, find the value of
(0.05)10 correct to four decimal places.
Solution
(1 + ½ x) 10 = 1+10(½ x)1 +45(½ x)2 +120(½ x)3 +…
= 1+5x + 45/4 x2+ 15x3
(1 + ½ x) 10= (0.05)10
1+ ½ x = 0.05
½ x = 0.05-1
½x = - 0.95
X = - 0.95x2
X = - 1.95
Therefore
=1+5x + 45/4 x2+ 15x3
=1+5(- 1.95) + 45/4 (- 1.95)2+ 15(- 1.95)3
= 1- 9.75 + 42.778125
Assignment
1. Use binomial expansion to evaluate each of the following, correct to to 4 decimal places.
i) (1.02)5
ii) (1.003)3
iii) (0.96)4
iv) (0.97)4
2. use binomial expansion to evaluate to the 4th term to estimate each of the following to 4
decimal place
a. (1.005)10
b. (1.01)9
c. (0.99)8
SET THEORY
Subtopic:
Terminology
Properties of set
Set operation
Venn diagram
Application
What is a set?
- A set is a clearly defined collection of object/number/element(s)
- The member of a set may be defined by:-
a) Listing them down
b) Describing them carefully in words
- It is usual to enclose the list of numbers in curly bracket i.e { }
Example
i)
ii)
ALGEBRAIC OF SET
1. INTERSECTION
- Given two sets A and B, the sets consisting of those numbers which belong to both A and
B is called intersection of A and B , written as hence
Example 1
if A and B has :
Solution
Then
Example 2
If and what is the intersection of A and B
2. UNION
This is a set with numbers belonging in both sides.
Example 1
and
Solution
Example 2
and
Solution
VENN DIAGRAM
- Venn diagram is set to represent sets. Here, the set is shown using a circle. In a
venn diagrams, sets are usually represented using circles.
- The universal set is the rectangle. The set A is a subset of the universal set and so it is
within the rectangle.
- The complement of is written as A1, contains all events in the sample space which
are not members of A. A and A1 together cover possible eventuality.
A1
- it means the of set A and B. this contains all of the elements which
are both A and B. is shown on the Venn diagram
SUB-SET (⊂ or ⊂)
- Set whose number are all included in another set.
- Set can be sub-set of its self e.g
A⊂A
Example
Given that and then H is a subset of K i.e ⊂
Determine answers
i)
ii)
iii)
iv)
v)
vi)
Hence verify
Solution
SUBTRACTION OF SETS
Example A-B or A\B
{a,b,c} – {a,c,e}
Solution
Note :We are subtracting the 2nd set from 1st set
Ans= {b}
If you have two sets A and B, the difference A-B is set
A-B={x∈A:x B}
Also note that
{1,2,3,4,5}-{2,6}
Solution
Ans ={1,3,4,5}
ADDITION SET
- Usually A+B is called minkowski sum donated the sums of an element of A and an
element of B
{1,2} + {1,2,4}
Solution
{1,2,3}-{1,3,6,5} = {2}
2. Distinguish between a finite set and an infinite set as used in set theory (2 mks)
Solution
Finite set-
a set is said to be finite if its elements are countable e.g p={5,10,15,20,25,30}and
n(p)=6
Infinite set-
is a set whose elements cannot be listed i.e uncountable e.g N={1,2,3,…} i.e set of
all natural numbers is an infinite set
Assignment
1. Given that ={m,o,p,w,k,a,t}; if A={m.o.p.w.k} and B={k,a,t). Determine each of the
following
Solutions answers
c c
i) A A
c
ii) B Bc
iii)
2. A researcher carried out a survey a bout car and motorbike ownership on 500 university
students. It was found out that 123 students own motorbikes 91 own cars while 29 own
both.
i. Draw avenn diagram to represent this information (3 mks)
ii. Determine the percentage of students who own motorbike or a car (2 mks)
Solution
motorbike
car
123
91
123 motorbike
91 cars
29 motorbike
Answers
A= sam, john, willy,Ben = diploma
C= sam, ben = degree
B= sam, Melvin, willy, tom ,morries, ken
A= tom, morries =diploma
Therefore
i) A={ sam, john, willy,Ben, tom ,morries}
B={ sam, Melvin, willy, tom ,morries, ken}
C={ sam, ben}
Venn diagram
I) n(tea) = 4
II) n(coffee or water)=6
- A matrix consists of rows and column. i.e Rows are horizontal arrangement while column
are the vertical arrangement.
- E.g number of column rows
- Nb order of matrix B =* +, then the order is . Note we starts with the column
then followed by row.
TYPES OF MATRICES
There are several types of matrices, but the most commonly used are:
a) Rows Matrix
b) Columns Matrix
c) Rectangular Matrix
d) Square Matrix
e) Diagonal Matrix
f) Scalar Matrix
g) Identity Matrix
h) Triangular Matrix
i) Null or Zero Matrix
j) Transpose of a Matrix
k) Singular matrix
1. Row matrix
- A matrix is said to be a row matrix if it has only one row.
e.g A = [1 2 3 ]
2. Column matrix
- A matrix is said to be a column matrix if it has only one column.
e.g.
3. Rectangular matrix
A matrix is said to be rectangular if the number of rows is not equal to the number of
columns
e.g. B= * +
4. Square Matrix
A matrix is said to be square if the number of rows is equal to the number of columns.
B= [ ]
5. Diagonal Matrix
A square matrix is said to be diagonal if at least one element of principal diagonal is non-
zero and all the other elements are zero.
e.g.
B =[ ]
6. Scalar Matrix
A diagonal matrix is said to be scalar if all of its diagonal elements are the same.
B =[ ]
I =[ ] , I=* +
8. Triangular Matrix
A square matrix is said to be triangular if all of its elements above the principal diagonal
are zero (lower triangular matrix) or all of its elements below the principal diagonal are
zero (upper triangular matrix).
A =[ ] , A=* +
A =[ ] AT =[ ]
If P= * + and Q = * + find
i) P+Q
ii) P-Q
Solution
i) P+Q = * ++* +
= * +
= * +
Example
if A= ( ) B= ( )and C= ( ) find
a) A-B+C
b) A-(B+C)
Solution
a) A-B+C = ( )-( )+ ( )
=( )
b) A-(B+C) = ( )-( )+ ( )
=( )-( )
=( )
Questions
1. State the order of each of the following matrices
a) ( )
b)
c) ( )
Find;
i) P – Q
ii) Q – P
iii) R – S
4. Find the unknown in each of the following
a) ( ) ( )
b) ( ) ( ) ( )
5. The number of vehicle passing through a road on a day one were; 10 buses, 6 Lorries
and 15 cars. On day two there were 4 Lorries, 20 cars and 7 buses and on day three
9cars, 3 buses, and 1 lorry. Tabulate this information in a matrix form and find the total
in each category for three days.
TRANSPOSE (AT)
- Row and column of a matrix A are integrated such that row becomes the first column,
second row becomes second column and so on, the resulting matrix is called the
transpose of A written as AT
Example
A=( ) then AT = ( )
b) ( )
c) ( )
MULTIPLICATION MATRICES
2. If ( ) find
i) 5B
ii) -3B
=( )
=( )
AB =( )
i) ( )
ii) ( )( )
ii) ( )( ) ( )
DETERMINANT OF A MATRIX
Example
ii) ( )
iii) ( )
INVERSE OF A MATRIX
Questions
=( )
=( )
Or
BA=( )( )
= ( )
A-1 =- ( )
A-1 = ( )
Note: in general, if X= ( )
X-1 = ( )
= ( )
N/B If the determinant is zero, such a matrix has no inverse and is called Singular Matrix
Question
1. Find the determinant of each of the following matrices
a) ( )
b) ( )
c) ( )
2. Find where possible the inverse of each of the following matrices
a) ( )
b) ( )
c) ( )
b) ( )( )= ( )
4. Find the value of unknown if each of the following matrices is singular
a) ( )
b) ( )
( )( ) ( )
Example 1
use the matrix method to solve the following pair of simultaneous equations
Solution
( )( ) ( )
Det = (3x-1)-(4x2)
= -3-8
= -11
Inverse
= ( )
Pre-multiplying both sides of the matrix equation by the inverse
( )( )( ) ( )( )
( ) ( )= ( )
( )=( )
Therefore a=2, b=3
Let A=[ ]
| |=a| | | | | |
=
Example
Find the determinant of the following matrix
B=[ ]
Solution
| |= 6| | | | | |
=
= 6(3-10)-2(2-20)+3(4-12)
=6(-7) -2(-18)+3(-8)
= -42 +36 -24
=-30
CO-FACTOR
Co-factor will be = (-1)r+c where r = row, c=column
Example 1
1. write down the minor and co-factor of each element and also evaluate the determinant of
solution
Let the minor be donated as Brc where r= row, C=column, Then
B11= | | = -10-30 = -40
B13= | | = 20--15 = 35
B21= | | = 6--10 = 16
B22= | | = 2--6 = 8
B23= | | = 5-9 = -4
B31= | | = 18-10 = 8
B32= | | = 6-8 = 14
| |= [ ]
Solution
A11=1 , A12=0 A21=1, A22=2
M11=1 , M12=0, M21=1, M22=2
Therefore matrix of co-factor is
=* +
The adj = * +T
=* +
Determinant | |
=
A-1 = 1/2 ( )
= ( ) is inverse
Similarly
Co-factor
M11 = 6 , M12 = -1 , M13 = -1
M21 =-2 , M22 = 1 , M23 = 0
M31 = -3 , M32 = 0 , M33 = 1
The matric of co-factor
=[ ]
=[ ]
Then, | |
=1(B11) -2(B12) + 3(B13)
=1(6) -2(1) + 3(-1)
=6 -2 +3 =7
Hence
B-1 = 1/7 [ ]
Assignment
1. find the value of x, y & z
=3
=12
=6
Solution
This is Cramer’s rule
X=x/-
Y=y/-
Z=z/-
Change = 1(1-3)-2(2-3)+1(2-1)
= -2-2+1=-3
Change x =[ ]
=3(1-3)—2(12-18)+1(12-6)
=-6-12+6
=-12
Then x=change x/change
= -12/3
=4
Change y=[ ]
=1(12-18)-3(2-3)+1(12-12)
=-6+3+0
= -3
Then y =change y/change
=-9/-3
=3
Change z=[ ]
=1(6-12)-2(12-12)+3(2-1)
=-6-0+3
= -3
* +* +| |* +=[ ]
( )( )( )( )( ) ( )
i)
Frequency
- This is the number of times an item or values occurs e.g 8 appears six times.
Therefore, the frequency of 8 is six
Question
The data below shows marks obtained by 20 students for an essay;
9,5,5,4,5,3,5,11,6,3,6,8,9,6,13,8,8,13,5,10
i) Prepare a frequency distribution table
Key
= mean
Mode
This is the most frequency occurring item or value in a data.
Range: The difference between the maximum and minimum data entries in the set. Range =
(Max. data entry) – (Min. data entry)
Median
When data is arranged in ascending or descending order, the middle item is the median
Example
5,4,8,10,13
Solution
Rearrange: 4,5,8,10,13
Median = 8
Example 2
13,6,4,9
Solution
Rearrange: 4,6,9,13
= 6+9 = 15
2 2
= 7.5
Example 3
The following frequency distribution table represent masses in kilograms of children in a
class. Find mean, mode and median
Mass of
35.5 36.8 38.2 40.0 40.2 41.0 41.4
children:
No. of
4 3 2 2 2 14 8
children:
Solution
Mean =
= 1394.4/35
= 39.84
Mode = 41.0
Median = 40.0
GROUPED DATA
Masses of fish in kilogram caught by fishermen in one day
Mass : 0-4 5-9 10-14 15-19 20-24 25-29 30-34 35-39
No. of
2 6 20 12 10 5 6 2
fish:
Solution
Mass Mid-point (f) Frequency (f) fx
0-4 2 2 4
5-9 7 6 42
10-14 12 20 240
15-19 17 12 204
20-24 22 10 220
25-29 27 5 135
30-34 32 6 192
35-39 37 2 74
Mean ( x ) =
= 1111/163
= 17.635
Mode = 10 – 14
MEAN USING WORKING (ASSUMED) MEAN
Mean of t =
Example
The table below shows the distribution of height to the nearest cm of 40 students.
Height cm 145-149 150-154 155-159 160-164 165-169 170-174 175-179
Frequency 2 5 16 9 5 2 1
Calculate
a) Median height
b) i) lower quartile
ii) upper quartile
c) 80th percentile
Solution
Heights Frequency Cumulative frequency
145 – 149 2 2
150 – 154 5 7
155 – 159 16 23
160 – 164 9 32
165 – 169 5 37
170 – 174 2 39
175 – 179 1 40
Both 20th and 21st students fall in class/height of 155 – 159, the class is called median class
( )
Using the formula
Therefore
a)
( )
Median height
b)
i) Lower quartile (Q1)
( )
Q1
( )
c) 80th percentile
( )
Assignment
1. The masses of 100 patients in a hospital were distributed as shown in the table
Mass kg 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-70 80-89 90-99
Frequency 3 7 8 9 12 18 25 10 6 2
Calculate
a) Median
b)
i) lower quartile
ii) upper quartile
th
c) 70 percentile
c) Standard deviation
√
√
i) Standard deviation is only used to measure spread or dispersion around the mean of a
data set
ii) Standard deviation is never negative
iii) Standard deviation is sensitive to outliers
iv) For data with approximately the same mean, the greater the spread, the greater the
standard deviation.
- Diagram
What is skewness?
- Skewness is a measure of symmetry or more precisely the lack of symmetry. A
distribution or data set is symmetric if it looks the same to the left and right of the
centre point.
- Negative skew: The left tail is longer and the mass of distribution is concentrated on
the right of the figure. The distribution is said to be left skewed/left tailed or skewed
to the left
- Positive skew: The right tail is longer and the mass of distribution is concentrated on
the left of the figure. The distribution is said to be right skewed/right tailed or
skewed to the right
diagram
-
Assignment
1) The table below shows the length in centimetres of 80 plants of a particular species of
tomatoes
Length 152-156 157-161 162-166 167-171 172-176 177-181
Frequency 12 14 24 15 8 7
Calculate
a) Mean
b) Standard deviation
v) The table below shows the distribution of age in months of 80 form four students in a
school
Age in 210-212 213-215 216-218 219-221 222-224 225-227 228-230
months
Frequency 2 8 25 18 12 1`0 5
Calculate
a) Mean
b) Variance
c) Standard deviation
vi) The table below shows frequency distribution for final marks in a mathematics
examination
Marks 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-70 80-89 90-99
No. of stu 3 6 5 11 4 3 2 3 2 1
Calculate
a) The median and the quartiles
b) The 4th and 6th decile
c) The 30th and 70th percentile
d) The standard deviation
vii) The table below shows distribution of wages of 40 employees
Wages 20-29 30-39 40-49 50-59 60-69 70-70 80-89 90-99
No. of 5 7 9 4 5 4 2 1
Calculate
a) Mean
b) Standard deviation
viii) The following marks were obtained in a mathematics test by 25 students.
Marks 30-39 40-49 50-59 60-69
Frequency 10 7 5 3
Calculate
a) Mean
b) Standard deviation
ALGEBRAIC EXPRESSION
b)
Solution
c)
Solution
FACTORISATION
a)
Solution
b)
Solution
)
c) X2
Solution
SIMPLIFICATION BY FACTORISATION
Simplify
a)
Solution
b)
Solution
LINEAR EQUATIONS
- Linear equations are straight lines involving one or two unknowns
Example
Solve the unknown in each of the following equations
a)
Solution
b)
Solution
Solution
d)
Solution
Work out
a)
b)
c)
Solution
Add (i)+(ii)
Solution
c)
5x
Solution
5x
Assignment
1. Solve the following simultaneous equations by elimination method
a)
b)
c)
d)
By substitution method
1. Solve the following simultaneous equations by substitution method
a)
Solution
b)
( )
Assignment
1. Solve the following simultaneous equation by substitution method
a)
b)
c)
d)
TYPES OF FUNCTIONS
1. Constant functions
- let A and B be any two non-empty set, there a function F from A toB is called a
constant function if and only if the range of F is a singleton
2. Algebraic function
Example 1
Make X2 +10x to be perfect squire
Solution
Add a constant c to the expression
X2 +10x+c
( 2=
52 =c
25=c
Therefore 25 must be added to X2 +10x to make it a perfect squire
Alternative solution
Add a constant c to an expression
X2 +10x+c = (X+k)2 where k is another constant
X2 +10x+c = X2+2xk+k2
Comparing coefficient of x
10x = 2xk
K=5
C= k2
C= 52 = 25
Example 2
What must be added to X2 + _+36 to make it a perfect squire?
Solution
2
Therefore ( = third term
X2 + _+36
2
( =362
Exercise
In each of the following expression, insert the term which will make it a perfect squire
i) X2 -16x+_
ii) X2 +2x+_
iii) X2 +_+16
iv) X2 -_+100
v) A2 -_+b2
vi) A2 +_+b2
Example 3
What must be added to 25x2 +_+9 to make it a perfect squire?
Solution
2
- Therefore ( =1st term x third term
- Make the above example to look like quadratic equation
2
( =(
or -30
Example 4
What must be added to _ -40x+25 to make it a perfect square?
Solution
Let the missing term be ax2
ax2_40x+25 is perfect squire
(-40/2)2=25a
400=25a
a=16
Thus the missing term is 16x2
Assignment
1. In each of the following expression, insert the term which will make it a perfect squire
i) 25x2+40x+_
ii) 9x2-6x+_
iii) 36x2-_+25
iv) 49x2-_+4
v) _+14x+1
Solution
X2+4x=12
The expression on the left hand side can be made a perfect square by adding 4 to both sides.
We get
X2+4x+4=12+4
(x+2)2=16
X+2=√ =_+4
X=-+4-2
X=2 or -6
Nb this method of solving a equation is known as completing the square
2. Solve X2+5x+1=0 using the completing the square method
Solution
X2+5x+1=0
X2+5x=-1
X2+5x+(5/2)2=(5/2)2-1
X2+5x+(25/4)=(25/4)-1
X2+5x+(25/4)=5.25
Factorising the L.H.S gives
(X+5/2)2= 5.25
X+5/2= √
X+2.5= +-2.29
X=+2.29-2.5=-0.21
Or x=-2.29-2.5=4.79
Exercise
Use the method of completing the square to solve the following quadratic equation.
a. X2+2x-1=0
b. X2-8x+13=0
c. X2+5x+3=0
d. X2-5x+2=0
e. X2-3x-5=0
f. X2-8x-30=0
Example 1
Solve the equation 2X2+4x+1=0 using the method of completing the square
Solution
2X2+4x+1=0
2X2+4x=-1
Divide by 2 both sides
X2+2x=-1/2
Add 1 to complete the square on L.H.S
X2+2x+1=1-1/2
(X+1)2=1/2
- This is solution to the general quadratic equation and known as the quadratic formula
- The expression is known as the discrimint. It allows us to determine the
nature of the roots of the quadratic equation.
Solution
From the general equation aX2+bx+c=0 we get a=2, b=-5,c=-3
Substituting in the quadratic formula
√
=
√
=
√
=
or
or
Assignment
The quadratic equation 2x2+(p+1)x+q-2=0 has two roots as -3 and . Determine the value of
p and q in the equation.
Solution
a=2, b=p+1, c=q-2
Exercise
Use the quadratic formula to solve the following equation
1. X2+7x+3=0
2. 2X+7-7X2=0
3. 4d2+7d+3=0
4. X2-4x+3=0
5. 3X2-3x-2=0
6. 9p2+24p+16=0
7. 2X2+11x+7=0
8. 5r2-5r+1=0
9. 6k2+9k+1=0
GRAPHS
Solution
X -4 -3 -2 -1 0 1 2 3 4
Y 16 9 4 1 0 1 4 9 16
Solution
X -5 -4 -3 -2 -1 0 1 2 3 4 5
8 8 8 8 8 8 8 8 8 8 8 8
+2x -10 -8 -6 -4 -2 0 2 4 6 8 16
2
-x -25 -16 -9 -4 -1 0 1 4 9 16 25
-27 -16 -7 0 5 8 11 16 23 32 49
Exercise
1. Draw the graph of the following quadratic function for given range of the value of x. in
each case state the equation of line of symmetry and the minimum /maximum value of the
function
a.
b.
c.
d.
e.
2. Use the graphical method to solve the following pairs of simultaneous equation
i)
ii)
iii)
iv)
5. using the graphical method, solve the following set of simultaneous equation
LINEAR INEQUALITIES
Example 1
Solve the following linear inequalities
1.
Solution
2.
Solution
3.
Solution
13
ii)
Experimental probability
- a fair coin was tossed 100 times and the number of heads and tails showing up were
recorded as 54 and 46 respectively.
54 were heads and 46 were tails
The probability of a head occurring may be donated by
P(Head) or P(H)
This is what we referred to as experimental probability
Notes
i) What is done or observed together with the recorded observation is the experiment
ii) Each toss is called a trial and in this case there are 100 trials
iii) The possible result of a trial is called an outcome.
iv) OR means addition (+) , And means multiplication (*)
v) Generally experimental probability of a result is given by
Example 1
A boy had a fair die with faces marked 1 to 6. He threw this die up 50 times and each time he
recorded the number on the top face. The result of this experiment is shown in table below
Face 1 2 3 4 5 6
Number of times a 11 6 7 9 9 8
face has shown up
With is the experimental probability of getting
a) P(Event)
b) P(1)
c) P(4)
d) P(6)
Example 2
From the past record, out of the ten matches a school football has played. It has won seven.
How many possible games might the school win in thirty matches.
Solution
Solution
P(B)
3. Throw two dice , whose faces are numbered 1 to 6, fifty times. Record the sum of the
numbers that appear on their ops each time. find the experimental probability that the sum
is
a) 7
b) 1
c) 2
d) 4
e) 13
Solution
1 2 3 4 5 6
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
Solution
P(H) and tail
P(T)
5. Out of 20 days, Rono did not use his pen for 4 days because he did not fill it with ink and
he did not use it for 3 days because he forgot it at home. Find the probability that in a
given day during that period
a) He forgot his pen at home
b) He used his pen in school
6. The number of days with rainfall at a station was recorded for the whole year in a table as
shown below.
Month J F M A M J J A S O N D
No. of 3 4 8 18 9 5 4 6 9 12 6 4
days
with
rainfall
a) The probability that a day in November had same rain
b) The number of months for which the probability of a day with rain is less than 0.3
c) The probability that a day in the last three months of the year has the same rain
d) The probability that a day in a year will have rain
7. The statistics club of a school recorded the number of persons in each passing vehicle a
long a road for 1 hour as follows
No. of person in a 1 2 3 4 5
vehicle
No. of vehicle 60 50 20 30 10
Find the probability that a vehicle passing a long the road had
a) An odd number of persons
b) An even number of person
Example 1
1. A basket contains 5 red balls, 4 green balls and 3 blue balls. If a ball is picked at random
from the basket, find
a) The probability of picking a blue ball
b) The probability of not picking a red ball
Solution
a) Total number of balls is (5+4+3) =12
The number of blue ball = 3
Example 2
Two dies are tossed together, what was the probability that the sum of the two upper faces
will be.
a) 7
b) 9
Solution
x
x
Therefore the brown ball =24 – 6 = 18
Or
6=1.5+0.25B
0.25B=6-1.5
B=
B=18
Exercise
a) Faces of a regular tetrahedrum are marked with number 1,2,3 and 4. If the tetrahedrum is
tossed once, calculate the probability that the face marked 3 lands at the bottom.
b) What is the probability of getting a number that is not prime with a single toss of a die?
c) Two dice are tossed together. What is the probability the sum of the numbers showing on
their upper face is
a) 3
b) 5
c) 8
d) A bag contains 4 green balls and 5 yellow balls. If a ball is picked at random from the
bag, find the probability that is
a) A green ball
b) A yellow ball
COMBINED EVENTS
1. Consider the probability of two or more events occurring mutually exclusive events. Is
an occurrence of one exclude the occurrence of the other e.g
i) if a coin is tossed?
P(head or tail)= P(head)+P(tail)
c) P( 3or less)
=P(3)+P(2)+P(1)
=P(2 or4 or6) +P(3)
= +
d) P(at most 3)
=P(3)+P(2)+P(1)
=P(2 or4 or6) +P(3)
= +
e) ??
f) P(4 or more) = P(at least 4)
=P(4 or5 or 6)
INDEPENDENT EVENTS
Two events A and B are said to be independent if the occurrence of A does not influence of B
and vice versa.
Example 1
A coin is tossed twice. What is the probability of getting a tail in both tosses?
Solution
A coin is tossed twice. What is the probability of getting a tail in both tosses?
P(T and T) = P(T) x P(T)
=
Example 2
A boy throws a fair coin and a regular tetrahedron with its four faces marked 1,2,3 and 4.
Find the probability that he get a3 on the tetrahedron and a head on the coin.
Solution
P(H)= , P(3)xP(3)=
P(H and 3)=
= =¼
Example 3
Three different machines in a factory have different probability of breaking down during a
shift as shown in a table.
Machine Probability of breaking
A 4/15
B 3/10
C 2/11
a) Find the probability that all machines will break down during one shift
b) The probability that none of the machines will break down in a particular shift
Solution
a)
=P(A and B and C breaking)
=
=
b)
Example 4
A bag contains 8 black balls and 5 white ones. If two balls are down from the bag, one at a
time, find the probability of drawing a black ball and a white ball
a) Without replacement
b) With replacement
Solution
a) =P(W followed by B)=P(W and B)
=
=
=P(B followed by W)=P(B and W)
=
=
Therefore
P(W and B)+ P(B and W)
=
=
b) P(W and B)
=
=
P(B and W)
=
=
Therefore
P(W and B)+ P(B and W)
=
=
Example 5
Two marbles are drawn in turns from a pack containing 3 red marbles, 6 white marbles, 7
black marbles and 9 green marbles.
a) If this done with replacement, determine the probability of drawing
i) Two white marbles
P(W and W)
= =
=
B)
If the drawing of the marbles is done with replacement
i)
ii)
iii)
Example 6
Kamau, Njoroge and Karioki are practicing archery. The probability of kamau hitting the
target is 2/5, that of Njoroge hitting the target is ¼ and that of Kariuki hitting the target is 3/7.
Find the probability that in one attempt
a) Only one hits the target
b) All three hits the target
c) Non of them hits the target
d) Two hits the target
e) At least one hits the target
Alternative
P(at least one hits the target) = 1-P(non heats the target)
= 1-
=
Exercise
1. The probability of kilonzo hitting a target with an arrow is 2/3. What is the probability of
him missing the target in four consecutive attempts
2. The probability of Juma, Ali and Musa passing an examination are 1/3, 3/5 and ¼
respectively. Find the probability that
TREE DIAGRAM
Suppose that a coin is tossed twice
Note: The probability of mutually exclusive events and those of independent events are best
done by the use of a tree diagram.
Example 1
A coin is tossed three times
a) Draw a tree diagram to show all the possible out come
b) Find the probability of getting
i) One head
ii) Two heads and a tail, in that order
iii) Two heads and a tail in any order
iv) Three heads
v) At least one head
vi) No head
i) P(one head)=p(HTT+P(THT)+P(TTH)
=( ( )
=(
ii) P(two head and a tail in that order)
=p(HHT)
=(
iii) P(two heads and a tail in that order)
=p(HHT)+P(HTH)+P(THH)
=(
iv) P(Three heads)=p(HHH)
=(
v) P(at least one head)=p(1 or2 or3 head)
=p(1)+p(2)+p(3)
=(
vi) P(no head)=1-P(at least one head occurs)
=1 -
Example 2
The probability that omweri goes to Nakuru is , if he goes to Nakuru, the probability that he
will see flamingo is . if he doesn‘t go to Nakuru to Nakuru, the probability that he will see a
flamingo is . Find the probability that;
Exercise
1. Ten per cent of transistors manufactured by a company are detective. If five transistors
are chosen at random, find the probability that
a) 1 will be detective
b) 2 will be detective
c) 3 or more will be detective
2. The probability that a day is raining is . The probability 1 carry an umbrella on a raining
day is and that 1 carry an umbrella on a non-rainy day is . Find the probability that ;
a) It will not be raining and 1 carry an umbrella
b) 1 shall carry an umbrella
3. A, B and C are 3 bags. A contains 2 blue beads and 3 red ones, B contains 5 blue beads
and 4 red ones and C contains 3 white beads, A bag is chosen at random and a bead
drawn from it. Find the probability that;
a) Its red
b) Its blue
c) Its white
Logic gate
- Logic gate perform basic logical functions and are the fundamental building blocks of
digital integrated circuits
- Most logic gates make an input take an input of two binary values and output as a single
value of 1 or 0
- Each logic gate accepts the NOT gate has two input A and B which can either be 1(True)
or 0 (False). The resulting output is a single value of 1 if the result is true or 0 if the result
is false
Binary (Boolean) Logic
- It deals with binary variables and binary logic functions.
- It has two discrete values
i) 0 – false or open
ii) 1 – true or close
- The basic logical operations are;
a) AND ( . ) , Other notation used are ^
b) OR ( + ), Other notation used are ꓦ
c) NOT ( ‗ ) , Other notation used are x
Logic gate and truth table
1. AND GATE
- The output is ―true‖ when both input are, otherwise the output is false
- The output is 1 only when both input and two are 1
Truth Table
2. OR GATE
Truth Table
- The basic rule for simplifying and combining logic gate are called Boolean algebra
in honour of George Boole (1815 – 1864)
4. NAND GATE
- The output is ‗false‘ if both input are True, Otherwise the output is True
- NAND Gate is Not associative
- The NAND Gate operates as AND Gate followed by NOT Gate. It acts in a manner of
the logical operation ―and‖ followed by Notation
Truth table
5. NOR GATE
Truth table
- The output is 1 if any input is one (1) and the other input is zero (0) respectively
Truth table
Truth Table
The NAND and NOR gates are called universal functions since with either one the AND and
OR functions and NOT can be generated.