MY FINAL TOUCH SUMMARY FOR TEST 1
ON 6TH MAY 2018
TOPICS AND MATERIALS COVERED
1. Class lecture notes (Basic concepts, errors and roots of function).
2. Lecture’s examples.
3. Past Years Examples.
4. Past Years examination papers.
5. Tutorial Questions.
6. Reference Books + web.
2. 2
TOPICS AND MATERIALS COVERED
1. Class lecture notes (Basic concepts, errors and roots of function).
2. Lecture’s examples.
3. Past Years Examples.
4. Past Years examination papers.
5. Tutorial Questions.
6. Reference Books + web.
3. 1
BASIC CONCEPTS
What is NUMERICAL METHOD?
Is a Method that is used to solve mathematical problems NUMERICALLY on a
computer or calculator. Example Xn+1 = √
APPLICATION OF NUMERICAL METHODs
1. All fields of an Engineer eg. Approximation of some mathematical
calculations.
2. In the fields of Biology eg. The population growth or spread of disease.
3. In Computer Graphics eg. Image processing.
4. In the field of Economics.
5. Scientific computation.
6. Social simulation (Behavioural).
7. Additional application to know pdf
TYPES OF METHODS
1. Analytical Methods
Any method based on rigorous mathematical analysis and whose application
leads to an exact solution .Example X2
-5X+3=0
2. Iterative methods
A method which involve a repeated use of a certain Numerical formula in
finding succession approximation to some of quantities.
example Xn+1 =√ , n = 0, 1, 2, 3…n Xo = 4, 5
Xn+1 = Xn –
3. Direct methods
A method which uses a certain formula in approximation of some quantities.
Example
4. 2
ERROR
Error is the difference between the exact value and the approximate value
(computed answer).
Assume
= True value
= Approximate value
The True Error =
The True Absolute Error = | |
The True Relative Error = | | x 100%
Example 1
A student measured a height of 10 building as * = 2950m and working height of
each beam as * = 35m while the True values are 1 =2945m and 2 =30m
respectively. Compare the True Absolute error and the percentage relative error.
SOLUTION
Case 1 1 =2945m , 1* = 2950m
The True Absolute Error = | |
= 5
The True Relative Error = | | x 100%
= 0.169779286%
Case 2 2 =30m , 2* = 35m
The True Absolute Error = | |
= 5
The True Relative Error = | | x 100%
= 16.66666667%
The true absolute errors in both cases are similar, There is difference in True
relative error and case 2 have large number of error compared to case 1.
5. 3
In most cases the True value is not known ie. | |
Approximate percentage relative error = | | x 100%
= | | x 100%
E r n+1 = | | x 100%
E a n+1 = | |
1. Precision
Refers to how closely individual computed or measured values agree with
each other. We measure the precision value by absolute error.
E a n+1 = | |
2. Accuracy
Refers to how closely under approximated value agrees with a True
value. We measure the accuracy by relative error.
E r n+1 = | | x 100%
3. Imprecision (uncertainty)
Refers to magnitude of the scatter of individual computed or measured
value.
4. In-accuracy (Bias)
The systematic diversion from the Truth.
| | = √
6. 4
SIGNIFICANT FEGURES
0 ,1,2, 3,5,6,7,8 and 9 are digits or figure , consider the following number
N = 008306003.000450800 as an example
RULES OF SIGNIFICANT FIGURES/DIGITS
1 Non-zero integers are always significant figures.
2 Any Zero on the left most part of a number are not significant.
3 Any Zero digits positioned between non-Zero digits are significant.
4 Zero at right most part end of a number are counted as significant.
Example
0.312 = 3 s.f
45.1 = 3 s.f
400. = 3 s.f
40.0 = 3 s.f
100 x103
= 3 s.f
400 = 3 s.f
TYPES AND SOURCES OF ERROR
1 Initial errors
These are errors in the initial data supplied with mathematical problems.
2 Discretization errors
These are errors caused by the process of converting a mathematical
problem having a continuous solution to a Numerical model whose
solution is a discrete function in the form of a sequence of numbers.
3 Truncation errors
These are errors introduced through un-avoidable termination
(truncation) of an otherwise infinity process such as an infinity
series or a convergence iteration.
4 Rounding errors
These are errors introduced because of limitations on the part of the
instrument we use in performing operations.
5 Human (Blunder) errors
Example 3.41 in steady of 3.14
7. 5
METHODS OF REDUCING ERRORS
1. Initial error can be avoided by ensuring that all data are given with all
computed for use in solving problems is as accurate as in humanly possible.
Example
x-y =1
x-1.00001y =0 x =100001 , y =100,000
2. Discretization error can be avoided by selecting a Numerical method whose
discretization erro is relatively small
Example ∫ 0.7853981634 from analytical
solution, * newton Raphson method 0.782794 and * Simpson rule
0.785392
3. Truncation errors this is done by choosing Numerical method with small
truncation error and by carrying out the infinite process sufficiently for.
Example x2
-3x +1 = 0 the exact solution is =0.381966
BM = 0 =1 = 0.5 = 0.25 = 0.375
NM(N-R-M) 1 0.3333333 0.380952 0.381966
Note BM→ Bisection method
NM(N-R-M) →Numerical Method(Newton-Raphson-Method)
Comment: We choose Numerical Method(Newton-Raphson-Method) since
have small Truncation errors.
4. Rounding errors
Example The sum of 2.35 , 1.48 and 4.24
2.35 2.3
1.48 1.4 rounding chopping arithmetic
+ 4.24 + 4.2
8.07 7.9
8. 6
RULES OF ROUNDING
1. If the digit in position n+1is greater than 5,then the digit in position n is
increased by 1.
2. If the digit in position n+1 is 5 and at least One other digit to its right is non
zero, then the digit in position n is increased by 1.
3. If the digit in the position n+1 is less than 5 , then the digit in position n is
left unchanged.
4. If the digit in position n+1 is 5 and all other digits to the right of position
n+1 are non-zero then:
a. The digit in position n is added by 1 if it is an ODD NUMBER.
b. The digit in position n is remaining unchanged if it is EVEN
NUMBER.
EXAMPLE
Rounding a given number correct to two significant figures
9. 7
HOME WORK ASSIGNMENT
(TUTORIAL 1)
SOLUTIONS
9. (a) Finding the exact solution of the following linear system of equations.
5x + 7y = 12.075………..equation 1
7x + 10y = 16.905………..equation 2
Taking equation 1
5x + 7y = 12.075
5x = 12.075-7y
x = (12.075-7y)/5………………….equation 3
Substituting equation 3 into equation 2 to obtain
7((12.075-7y)/5) + 10y =16.905
16.095-9.8y+10y =16.095
0.2y =16.095-16.095
y = 0
Recalling equation 3 and substitute the value of y obtained above.
X = (12.075-7y)/5
x = (12.075-7(o))/5
x = (12.075)/5
x = 2.415
Therefore , the exact solution is (x , y) =(2.415 , 0)
10. 8
(b) Rounding the values on the right hand side of each equation to two
significant digits and then find the exact solution of the resulting system of
linear equations.
5x + 7y = 12………..equation 1
7x + 10y = 17………..equation 2
Taking equation 1
5x + 7y = 12
5x = 12-7y
x = (12-7y)/5………………….equation 3
Substituting equation 3 into equation 2 to obtain
7((12-7y)/5) + 10y =17
16.8-9.8y+10y =17
0.2y =17-16.8
y = 1
Recalling equation 3 and substitute the value of y obtained above.
x = (12-7y)/5
x = (12-7(1))/5
x = (12-7)/5
x = 1
Therefore , the exact solution is (x , y) =(1 , 1)
(c) Using the solutions obtained in parts (a) and (b) above to explain why initial
errors should need to be avoided as much as possible.
Initial errors must be avoided because the solutions of some problems
maybe very sensitive to relatively small initial errors.
11. 9
10. (a) Find the exact value of £ correct to five significant digits.
Given that
£ = 0.333333333 + 0.272727273 – 0.15
£ = 0.606060606 – 0.15
£ = 0.456060606
£ ≈ 0.45606
(b) Approximating the value of £ using three significant digits chopping
arithmetic (rounding without making adjustments).
Given that
£ = 0.333333333 + 0.272727273 – 0.15
£ = 0.456060606
£ ≈ 0.456
(c) Approximating the value of £ using three significant digits rounding
arithmetic.
Given that
£ = 0.333333333 + 0.272727273 – 0.15
£ = 0.456060606
£ ≈ 0.456
(d)Calculate the absolute errors and percentage relative errors in the
approximations obtained in parts (b) and (c).
Given that
£ (b) ≈ 0.456 and £(c) ≈ 0.456
For approximations obtained in parts (b)
| |=| |=| |
Absolute error =
| |x100% =| | x100%`
0.013289023%
Relative error =0.013289023%
12. 10
Approximations obtained in parts (c)
| |=| |=| |
Absolute error =
| |x100% =| | x100%`
0.013289023%
Relative error =0.013289023%
11. Given The number =5.436563657 can be defined by
0
!
1
2
k
k
, where
12)^2(1! kkkk for 0k and .1!0
Finding the approximated value by
* = .
!
1
2
5
0
k
k
For k = 0,1,2,3,4 and 5 obtain the following series
∑ = 2[ + + + + + ]
* = 2[ + + + + ]
* =2[1+1+0.5+0.166666666+0.041666666+0.008333333333]
* =2[2.716666665]
* 5.433333330
(i) True absolute error
| |=| |=| |
True absolute error
13. 11
(ii) True percentage relative error
| |x100% =| | x100%
= 0.05941854458%
True relative error 0.05942%
ROOTS OF EQUATIONS
f(x) =0 , f(x , y) =0 , g(x) =0 , g(x , y) =0
TYPES OF EQUATIONS
1. Algebraic equations eg. 2x+4y=6 , 3xy + 4y +3x = 0
2. Polynomial equations
eg. 3x2
+2x+1=0 , 4x3
+3x2
+2x+1=0 , 5x4
+4x3
+3x2
+2 x+1=0
3. Transcendental equations eg. exsinx - = 0
METHODS OF SOLVING EQUATIONS
1. Direct method (Analytical).
2. Graphical method.
3. Trial and Error method.
4. Iteration method.
ITERATION METHOD
Consider function f(x) = + +…+ + .
The largest possible root is given by = - assuming that all roots should
lie in the interval of ( - | | , | | ). Where
= √
14. 12
Example: 2x3
– 8x2
+2x +12 = 0 , find the largest possible root.
= - = - ( ) = 4 from
= √ roots are (- √ , √ ).
We take xo = 4 for N-R-M but for Bisection method we take (- √ , √ ).
STOPPING CRITERION
1. | |
Where is absolute error and are approximate values. At each
step you check fore xample below.
=4.5 , = 3 = 3.2 , =3.21 let = 0.01
(sometime given or you may decide)
| | ,
| | ,
| | , we stop here and take the final values.
2. | |
3. | |
4. | |
5. | |
6. | |
Example
solution
let
15. 13
Now let xo =1
= 0.367879441
=0.6922006276
= 0.5004735
= 0.606243535
= 0.545395786
=0.579612335
= 0.560115461
All the away to n = and obtain x
Therefore such that
16. 14
METHOD OF THE ROOT-FIXED POINT METHOD
Given f(x) = = 0 , f(x) = x + g(x) = 0 then = g(x) is called fixed
point equation and g(x) is Fixed point iteration formula.
Example
f(x) = x3
–sinx has three roots and can be expressed in more than one form as
shown below.
xn+1 =g(x)
x =√ -------------------------(1)
x = --------------------------- (2)
x =√ ---------------------------(3)
x= ----------------------(4)
solution
starting with equation (2) i.e x = let xo = 1, , =0.8414709848
≈1.0530 , ≈0.7836 , ≈1.149 , ≈0.6907 the result is diverging ,try another
form of equation.
Taking equation (1) x =√
=1
≈0.94408
0.93215
0.92944
0.9288
0.92866
0.92896 .This is sometimes called the method of successful approximation or
direct substitution method .
1rad = 57.29577951°
17. 15
Example
Find the roots of x2
+ x – 2 = 0
Solution
Take x= 2 - x2
, for =0 then
= 2
-2
-2 exact solutions
For = -1
= 1
1
exact solution
Example
Evaluate the roots by the use of the fixed point algorithms.
Solution
The equation can be expressed in more than one form as following
x --------------------------------(1)
x -------------------- (2)
x -------------------------------(3)
lets begin with equation (1)
x →
For = -1
= 1
5
divergence ( oscillating divergence).
= 5
Let’s try for equation (2)
x → = -5, 15 ,
This is called MONOTORY DIVERGENCY (large variation).
18. 16
Now let’s solve using equation (3).
x → for = 1.
= 3.
= 2.333333333
= 2.238095238
(Monotony convergence)
= 2.236068896
= 2.236067978
COBWEB PLOT
Its illustrates varies patterns of behavior of the iterative process of the fixed point
method
19. 17
A cobweb plot, or Verhulst diagram is a visual tool used in the dynamical
systems field of mathematics to investigate the qualitative behaviour of one-
dimensional iterated functions, such as the logistic map. Using a cobweb plot, it is
possible to infer the long term status of an initial condition under repeated
application of a map.
For a given iterated function f: R → R, the plot consists of a diagonal (x = y) line
and a curve representing y = f(x). To plot the behaviour of a value , apply the
following steps.
1. Find the point on the function curve with an x-coordinate of xo. This has the
coordinates (xo ,f(x0)).
2. Plot horizontally across from this point to the diagonal line. This has the
coordinates (f(xo),f(x0)).
3. Plot vertically from the point on the diagonal to the function curve. This has
the coordinates (f(xo),f(f(x0))).
4. Repeat from step 2 as required.
20. 18
TUTORIAL QUESTIONS
1. What is a numerical solution?
Is a Method that is used to solve mathematical problems
NUMERICALLY on a computer or calculator. Example
Xn+1 = √
2. What is the difference between numerical solution and analytical (or exact or
true) solution?
An analytic method for solving a given mathematical problem
is any method based on rigorous mathematical analysis and whose
application leads to the true (exact) solution, also known as analytic
solution. WHILE
A numerical method for solving a given mathematical problem is
any method based on rigorous mathematical analysis whose
application, in most cases, can only lead to an approximate (non-
exact) solution, also known as numerical solution. In some very
rare cases, a numerical method may result in an exact solution.
3. Why should one learn Numerical methods?
Because of the above distinction between analytic and numerical solutions one
can easily be tempted to conclude that one should only use analytic methods in
solving mathematical problems. In other words, there is no need to learn
numerical methods because they can only give approximate solutions. Such a
conclusion is misguided. We need to learn numerical methods for the following
three main reasons.
For some problems the analytical solution may not be known. A typical
examples is given by the following cases.
An integral, such as ∫ is perfectly defined but the anti-derivative of
the integrand cannot be expressed using known mathematical
functions.
In some cases, it may be possible to find a mathematical expression for
the analytical solution of a given problem. However, the expression may
21. 19
be computationally too complicated to handle numerically. A typical
problem is that of finding an anti-derivative of the function f(x)
After some tedious manipulations involving factorization of the
denominator followed by application of the method of partial fractions,
one finds the general anti derivative
Where C is an arbitrary constant of integration. This complicated
result makes the evaluation of a typical associated definite integral
f(x) ∫ almost impossible to carry out with any meaningful
degree of accuracy.
4. What are mathematical errors?
These are differences between the exact values of a problem and the
approximated values. ie error =
5. What are the main sources of computational errors?
1. Rounding off
2. Truncation
3. Human
6. Round the following numbers to (a) three significant figures and (b) two
decimal places:
(i) 3.2363, (ii) 3.5378, (iii) 3.4350 (iv) 3.1450, (v) 3.6050, (vi) 3.8138, (vii)
0.3455, (viii) 0.3465, (ix) 0.01558, (x) 0.002553
S/N Number 3 s.f 2 d.p
i. 3.2363 3.24 3.24
ii. 3.5378 3.53 3.54
iii. 3.4350 3.44 3.44
iv. 3.1450 3.14 3.14
v. 3.6050 3.60 3.60
vi. 3.8138 3.81 3.81
vii. 0.3455 0.346 0.34
viii. 0.3465 0.346 0.35
ix. 0.01558 0.0156 0.02
x. 0.002553 0.00255 0.00
22. 20
7. How many significant digits are in each of the following numbers:
(i) 3.2363, (ii) 3.5378, (iii) 3.450 (iv) 3.1450, (v) 03.6050, (vi) 03.8138,
(vii) 0.3456755, (viii) 0.3465, (ix) 0.01558, (x) 0.002553, (xi)
00000020000100, (xii) 60000000008 (xiii) 123456789, (xiv) 00000001
S/N NUMBER S.D
i. 3.2363 5
ii. 3.5378 5
iii. 3.450 5
iv. 3.1450 5
v. 03.6050 5
vi. 03.8138 5
vii. 0.3456755 7
viii. 0.3465 4
ix. 0.01558 4
x. 0.002553 4
xi. 00000020000100 8
xii. 60000000008 11
xiii. 123456789 9
xiv. 00000001 1
8. Discuss the situation where the fixed point iteration process may not
converge to a solution f(x) =0.
The iteration process may not converge at f(x) where the
iterations diverge from the real approximate solutions.
9. Is it true that the continuous equation x2
-5x+1=0 has a root which lies in
the interval of 0<x<1? Justify your answer.
23. 21
10. An iterative process must be terminated at some stage .Write down the
formula of the two tests which can be used to terminate the process.
| | | |
Where is absolute error and are approximate values.
11.How many significant digits are contained in the number
0.0200850x103
?Round this number to four significant figures.
6 s.f and ≈ 20.08
12.Use cobweb plots to illustrate the spiral convergence behaviour of the
iteration process in fixed point method.
It quite clearly has at least one solution between 0 and 2π; the graphs
of y=x and y=cosx intersect. However, no algebraic methods exist for
solving this equation
Y = x
Y = cosx
24. 22
But observe the following. Let's suppose we start with an initial estimate of 0.75 as
a solution of our equation. Now
and it's clear that our solution is approximately 0.739.
13.If f(x) = + +…+ + . , the the largest possible root is
FALSE
14.Fixed point ,Newton Raphson and secant Methods are open end iterative
methods for approximating a root of an equation of the form f(x)=0 TRUE
25. 23
15. Cobweb plots are commonly used to illustrate various patterns of behaviour
of the iteration process of the method of successive approximation.TRUE
16. Initial errors,rounding errors,Truncation errors,Discretization and blunder
erros are sources of errors? FALSE
17. The value of x that satisfies f(x)=0 is called the root of a f(x)=0. TRUE
18. Method of direct substitution is known as Bisection Method. FALSE
19. Accuracy, stability and convergence are some of important properties in
Numerical methods TRUE
20. Convergence is guaranteed with fixed point method while it is not the case
of Newton Raphson method FALSE
21. Uncertainty is also called Bias. FALSE
22. (a).How many significant figures are in each of the following numbers:
(i) 00001000020000 10 s.f
(ii) 10000200003004 9 s.f
(iii) 000123.0004500 10 s.f
23.(b) Round each of the following numbers correct to five significant figures.
(i) 0123.395 0123.40
(ii) 0123.205 0123.20
(iii) 0123.206 0123.21