Tutorial Letter 101/3/2020: Numerical Methods I
Tutorial Letter 101/3/2020: Numerical Methods I
NUMERICAL METHODS I
COS2633
Semesters 1 and 2
BARCODE
university
Define tomorrow. of south africa
CONTENTS
Page
1 INTRODUCTION .................................................................................................................4
1.1 my Unisa ...............................................................................................................................4
1.2 Tutorial Matter.......................................................................................................................4
2 PURPOSE AND OUTCOMES ............................................................................................4
2.1 Purpose ...............................................................................................................................4
2.2 Outcomes ............................................................................................................................5
3 LECTURER(S) AND CONTACT DETAILS .........................................................................5
3.1 Lecturer(s) ...........................................................................................................................5
3.2 Department .........................................................................................................................6
3.3 University .............................................................................................................................6
4 RESOURCES ......................................................................................................................6
4.1 Prescribed book(s) ..............................................................................................................6
4.2 Recommended book(s) .......................................................................................................6
4.3 Electronic reserves (e-reserves) .........................................................................................6
4.4 Library services and resources information ........................................................................7
5 STUDENT SUPPORT SERVICES ......................................................................................7
6 STUDY PLAN ......................................................................................................................7
7 PRACTICAL WORK ...........................................................................................................9
8 ASSESSMENT ..................................................................................................................10
8.1 Assessment criteria......................................................................................................10
8.2 Assessment plan ...............................................................................................................11
8.3 Assignment numbers .........................................................................................................12
8.3.1 General assignment numbers ...........................................................................................12
8.3.2 Unique assignment numbers .............................................................................................12
8.4 Submission of assignments ...............................................................................................13
8.5 The assignments ...............................................................................................................13
8.6 Other assessment methods ..............................................................................................13
8.7 The examinations ..............................................................................................................13
8.7.1 Examination admission ......................................................................................................14
8.7.2 Examination period.............................................................................................................14
2
COS2633/101/3/2020
3
1 INTRODUCTION
Dear Student
Welcome to the COS2633 module in the Department of Mathematical Sciences at Unisa. We trust
that you will find this module both interesting and rewarding.
Some of this tutorial matter may not be available when you register. Tutorial matter that is not
available when you register will be posted to you as soon as possible, but is also available on the
myUnisa module site.
1.1 myUnisa
The platform for teaching and learning at Unisa is my Unisa. You must be registered on my Unisa
(http://my.unisa.ac.za) to be able to submit assignments online, gain access to the library func-
tions, services and various learning resources, download study material, ”chat” to your lecturers
and fellow students about your studies and the challenges you encounter, and participate in on-
line discussion forums. my Unisa provides additional opportunities to take part in activities and
discussions of relevance to your module, assignments, marks and examinations.
In this module you will learn how to develop and use numerical methods to solve mathematical
problems by means of a computer. While the emphasis is on the more practical aspects, a good
mathematical background is essential. We therefore advise you to include second year mathemat-
ics, in particular MAT2611 and MAT2613, in your curriculum.
4
COS2633/101/3/2020
The module that follows Numerical Methods 1 is, of course, Numerical Methods 2 (APM3711)
which is also available as a subject in Computer Science and Applied Mathematics. Although nu-
merical methods are not dependent on any specific programming language, many software pack-
ages are available as an aid to the study of numerical methods. You are therefore expected to
learn one or two programming languages (like Matlab/Octave, Python, C++ or Maple) on your own
and to be able to write relatively simple programs/code in the language. Some of these software
packages are open source or have open source versions that you can download.
2.2 Outcomes
The broad outcomes for this module are as follows:
2. Solve various types of nonlinear equations using different kinds of numerical methods and
interpret the results.
All queries that are not of a purely administrative nature but are about the content of this module
should be directed to your lecturer(s). Tutorial Letter 301 will provide additional contact details for
your lecturer. Please have your study material with you when you contact your lecturer by tele-
phone. If you are unable to reach us, leave a message with the departmental secretary (contact
details below). Provide your name, the time of telephone call and contact details. If you have
problems with questions that you are unable to solve, please send your own attempts so that the
lecturers can determine where the fault lies.
Please note: Letters to lecturers may not be enclosed with or inserted into assignments.
5
3.2 Department
You can contact the Department of Mathematical Sciences as follows:
Departmental Secretary: 011 670 9147 (SA) +27 11 670 9147 (International)
Emails: [email protected] [email protected]
Whenever you contact a lecturer, please include your student number to enable the lecturer to help
you more effectively.
3.3 University
If you need to contact the University about matters not related to the content of this module, please
consult the publication, Study @ Unisa that you received with your study material. This booklet
contains information on how to contact the University (e.g. to whom you can write for different
queries, important telephone and fax numbers, addresses and details of the times certain facilities
are open).
Remember to always have your student number at hand whenever you contact the University.
4 RESOURCES
4.1 Prescribed book(s)
Prescribed books can be obtained from the University official booksellers. If you have difficulty
locating your book(s) at these booksellers, please contact the Prescribed Books Section at (012)
429 4152 or e-mail [email protected]
6
COS2633/101/3/2020
• for research support and services (e.g. personal librarians and literature search
services) go to
http://www.unisa.ac.za/sites/corporate/default/Library/Library-
services/Research-support
Recommended guides:
• find recommended reading in the print collection and e-services:
http://libguides.unisa.ac.za/request/undergrad
• finding, obtaining and using library resources and tools to assist in doing research:
http://libguides.unisa.ac.za/Research_skills
This brochure has all the tips and information you need to succeed at distance learning and, specif-
ically, at Unisa.
6 STUDY PLAN
The sections of the tenth edition that are prescribed for examination purposes are:
7
• Chapter 4: sections 4.1 - 4.9 (Numerical Differentiation and Integration);
• Chapter 6: sections 6.1 - 6.5 (Direct Methods for Solving Linear Systems);
• Chapter 7: sections 7.1, 7.3 - 7.5 (Iterative Techniques in Matrix Algebra);
• Chapter 8: section 8.1 (Discrete Least Squares Approximation);
• Chapter 10: section 10.2 (Newton’s Method for Nonlinear Systems of Equations)
Although listed in this sequence, the textbook suggests a plan of going through the syllabus for a
coherent flow of concepts. (see Preface of the textbook)
The tutorial letters are dispatched to you in the course of the year as they become available
and will also be downloadable from the internet.
• Inventory for the current academic year that you received on registration and which lists the
items available from the Department of Dispatch in Pretoria or the regional offices at the time
of registration. Please check the tutorial matter you have received against this inventory and,
if necessary, take appropriate action to contact the Department of Dispatch.
You should read the entire Tutorial Letter 102, before working through the textbook. You should
work through the sections of the prescribed textbook in the order indicated in Table 1 or 2 and
submit assignments 1, 2 and 3 before the respective due dates as indicated in this Tutorial Letter.
See the brochure Study @ Unisa for general time management and planning skills.
8
COS2633/101/3/2020
Semester 1
Period Assignment Textbook
(due date) (10th ed.)
20/01 - 26/02 1 (26/02) Study Chapters 1 and 2
26/02 - 23/04 2 (23/04) Study Chapters 3,4,6,7,
8.1,10.2
20/01 - 26/04 3 (26/04) Study all chapters
26/04 - examination date: Revision
Semester 2
Period Assignment Textbook
(due date) (10th ed.)
15/07 - 04/08 1 (04/08) Study chapters 1 and 2
04/08 - 25/09 2 (30/09) Study chapters 3,4,6,7,
8.1,10.2
15/07 - 05/10 3 (04/10) Study all chapters
05/10 - examination date: Revision
• Tutorial Letters, which include detailed discussions and model solutions of the assignments.
the assignments and the corresponding tutorial letters are important since they give you an
idea of what we expect of you with respect to the types of problems to be solved, and their
solutions. The examination covers the whole syllabus, theory as well as practice, and you
should prepare accordingly. We also give additional explanations in these letters.
The tutorial letters are dispatched to you in the course of the year as they become available
and will also be downloadable from the internet. It is important to check my Unisa regularly.
• Inventory for the current academic year that you receive on registration and which lists the
items available from the Department of Dispatch in Pretoria or the regional centres at the time
of registration. Please check the tutorial matter you have received against this inventory and,
if necessary, take appropriate action contacting the Department of Dispatch.
You should read the entire tutorial letter 102, before working through the textbook. You should work
through the sections of the prescribed textbook in the suggested order and submit assignments 1,
2, and 3 before the respective due dates.
See the brochure Study @ Unisa for general time management and planning skills.
7 PRACTICAL WORK
There is no practical work in this module.
9
8 ASSESSMENT
8.1 Assessment criteria
Specific Outcome 1: Be able to draw a rough graph of any given function.
Assessment criteria
• Ability to extract relevant information for a function, including existence, discontinuities, sin-
gularities, symmetries, boundedness, behaviour at very small and very large values of x,
behaviour at 0, roots and zeros, turning points, etc.
Specific Outcome 2: Be able to solve different nonlinear equations using different numerical
methods and interpret the results.
Numerical techniques include (but are not limited to) bisection, fixed-point iteration, Newton’s
method and its extensions:secant and regula falsi methods, analysis of convergence and error,
zeros of polynomials and Muller’s method.
Assessment criteria
• give a mathematical formulation of a method;
• identify and understand the meaning of terms in a formulated method;
• perform a few iterations of a numerical method;
• study convergence of a numerical method;
• estimate error of approximation ...
Specific Outcome 3: Be able to solve sets of equations using different numerical methods.
Methods include (but are not limited to) Gaussian elimination, pivoting strategies and matrix fac-
torisation, Jacobi, Gauss-Seidel and SOR iterative techniques, Newton’s method for functions of
several variables.
Assessment criteria
Specific Outcome 4: Be able to construct interpolating polynomials and fit curves to given data.
Methods include (but are not limited to) interpolation and Lagrange polynomials, difference meth-
ods, Hermite interpolation, cubic splines, parametric curves, data approximation, discrete least
squares approximation.
Assessment criteria
10
COS2633/101/3/2020
• Differentiation: forward difference, backward difference, centered difference and their vari-
ous refinements;
• Integration: trapezoidal rule, Simpson’s rules, mid-point rule, Gaussian quadrature, . . . (standard,
composite, mixed, . . . formats)
Assessment criteria
A final mark of at least 50% is required to pass the module. If a student does not pass the module
then a final mark of at least 40% is required to permit the student to access the supplementary
examination.
The final mark for the module comprises the formative/semester mark and the examination mark.
The final mark composition is as follows:
Formative
Assignment Number Type of assignment Contribution to the final semester mark (%)
01 MCQ 20
02 Written 60
03 Written 20
Total 100
Summative
There will be a written examination. The details of the dates and duration are published by the
Examinations Department.
11
Final Mark
The final mark will be a composition of the semester mark and the examination mark, composed
as follows:
Type of assessment Contribution to the final mark (%)
Formative 20
Summative 80
Final mark total 100
Semester 1
Assignment Number Unique Number Due date
01 770453 26 February 2020
02 635915 23 April 2020
03 579341 28 April 2020
Semester 2
Assignment Number Unique Number Due date
01 814970 7 August 2020....
02 658219 30 September 2020....
03 642183 4 October 2020....
12
COS2633/101/3/2020
• Go to my Unisa.
Note that Assignment 01 is the compulsory assignment for admission to the examination
and must reach us by the due date.
13
Study @ Unisa.
• You will not be admitted to the examination without submitting an assignment, I therefore
strongly advise you to ensure that the first assignment is in on time for you to gain exam
admission.
• If you score less than 40% in the final examination, the year/semester mark will not be used
to give you a pass.
• The minimum final mark which is required to qualify for a supplementary examination will be
40%. The supplementary examination for 2020 will be written as indicated in the above table.
Please confirm the date and venues on the Unisa website.
• There is no other exam opportunity other than the supplementary examination but a new
enrollment for repeat learning in the module.
Specific dates are provided by the Examination Department on the appropriate Unisa websites.
14
COS2633/101/3/2020
10 IN CLOSING
Remember, you are important to us and we are very willing and available to assist you with your
course content related problems. We hope that you will enjoy COS2633 and we wish you all the
best in your studies at Unisa!
15
11 ADDENDUM
ASSIGNMENT 01
Due date: 26 February 2020
UNIQUE ASSIGNMENT NUMBER: 770453
Total Marks: 100
IMPORTANT
• This is a multiple choice assignment. ALL the questions must be answered on a mark
reading sheet which you then post to the University. Before answering this assignment,
consult the publication Study @ Unisa on how to use and complete a mark reading sheet.
You may, however, choose to complete and submit the assignment online, using myUnisa.
• Keep your rough work so that you can compare your solutions with those that will be sent to
you after the closing date.
(1) The function y2 is continuous and symmetric with respect to the y-axis.
(2) The function y1 is not symmetric with respect to the y-axis and is not bounded.
(3) y1 and y2 both have continuous first derivatives.
(4) y2 has a turning point.
(5) None of the above is true.
(1) Using the Bisection method, one needs 10 iterations to find the intersection points of y1
and y2 up to five significant figures, starting with the interval [−1, −5].
16
COS2633/101/3/2020
Now we consider using the method x = g(x) to find the intersection points of the above
curves.
(1.3) Select the correct condition that guarantees the convergence of this method to a root r. (10)
(1.4) Let f (x) = 8 sin x − ex − 4. Which of the following is correct in applying Newton’s method to
solve the equation f (x) = 0? (10)
xn − 8 sin x + ex + 4
(1) The algorithm is xn+1 = , which converges to 1.3235 in 5 iterations
8 cos x − ex
with x0 = 1.5
8 sin x − ex − 4
(2) The algorithm is xn+1 = xn − , and it converges to 1.3235 in 5 at most 6
8 cos x − ex
iterations with x0 = −7.
8 sin x + ex + 4
(3) The algorithm is xn+1 = xn − , and it converges to 0.9918 after at least 6
8 cos x − ex
iterations with x0 = 0.
8 cos x − ex
(4) The algorithm is xn+1 = xn + , and it converges to 1.3235 after 5 iterations
8 sin x + ex
with x0 = −1.5.
8 sin x − ex − 4
(5) The algorithm is xn+1 = xn − , and it converges to 1.3235 in 5 at most 6
8 cos x − ex
iterations with x0 = 0.
(2.1) To have an idea on whether we should apply the regula falsi method to determine the root of
f (x) = 0 in a given interval, we may: (10)
(1) study carefully the continuity of f (x) and f 0 (x) then conclude;
17
(2) check if f (x) and f 0 (x) are differentiable then conclude;
(3) draw the graph of f (x) and observe the graphs then conclude;
(4) apply the functions, f (x) to a finite set of sample values then conclude;
(5) none of the above is true.
(2.2) Applying the regula falsi method, with starting points x0 = 0.5 and x1 = 1 yields the following
result: (10)
(2.3) Applying the secant method, with starting values x0 = 0.5 and x1 = 1 yields the following
result: (10)
(1) f (x) has no singularities and no obvious symmetries and f (0) = −5.
(2) f 0 (x) = 4x3 − 6x2 − 10x + 12, f 00 (x) = 12x2 − 12x − 10, and f 000 (x) = 24x − 12
(3) f 00 (x) has a local extremum at x = 0.5.
(4) The two zeros for f 00 (x) are −0.5417 and 1.5417.
(5) f 00 (x) has a local maximum at x = 0.5
(3.2) Applying Muller’s method to compute the zeros of f (x) yields the following result: (10)
(1) −2.4321 with the starting points x2 = −3.5, x0 = −2.5 and x1 = −1.5;
(2) 0.5798 with the starting points x0 = −0.25, x1 = 1 and x2 = −1.5;
(3) 1, 5206 with the starting points x2 = 1, x0 = 1.5 and x1 = 2;
(4) 2.3316 with the starting points x1 = 4, x0 = 3 and x2 = 2
(5) All of the above.
18
COS2633/101/3/2020
(1) Muller’s method determines the next approximation by considering the intersection of a
parabola and the x-axis through three given points.
(2) The secant method yields a complex root even when initial approximation is a real num-
ber.
(3) The secant method and Muller’s method are similar in the sense that they both start with
two initial points.
(4) All of the above.
(5) None of the above.
19
ASSIGNMENT 02
Due date: 23 April, 2020
UNIQUE ASSIGNMENT NUMBER: 635915
Total Marks: 120
Question 1: 40 marks
Consider the linear system
1.19x1 + 2.11x2 − 100x3 + x4 = 1.12
14.2x1 − 0.122x2 + 12.2x3 − x4 = 3.44
100x2 − 99.9x3 + x4 = 2.15
15.3x1 + 0.110x2 − 13.1x3 − x4 = 4.16
20
COS2633/101/3/2020
x ≈ [1 + r + r2 + r3 + · · · + rk ]ωb
= ωb + [r + r2 + r3 + · · · + rk ]ωb
= ωb + r[1 + r + r2 + r3 + · · · + rk−1 ]ωb
This suggests an iterative approach to solving the system Ax = b. Let x(0) = ωb be the initial
estimate of the solution, then for the kth iterate we have
x(k) = ωb + rx(k−1)
= ωb + (I − ωA)x(k−1)
If |r| < 1 then the iterate is guaranteed to converge to the true solution.
For some matrix , M and some scaling factor ω, we obtain the following algorithm
M x(k) = ωb + (M − ωA)x(k−1) .
In the following computations use four-digit arithmetic with truncation not rounding and do
three iterations, starting with x(0) = (1, 3, 2, 4)t
(a) (10)
(i) Let A be the matrix from (1.1) and ω = 1, then solve the sytem by choosing M to be
the matrix consisting of the diagonal of A. [4]
(ii) Solve the system using the Jacobi method. [4]
(iii) Compare and comment on the two solutions. [2]
(b) (10)
(i) Let A be the matrix from (1.1) and ω = 1, then solve the system by choosing M to
be the lower triangular part of A including the diagonal entries. [4]
(ii) Solve the system using the Gauss-Seidel method. [4]
(iii) Compare and comment on the two results. [2]
(c) Solve the system in (1.1) using the Successive Over-Relaxation technique with ω = 0.5.
[4]
(d) Which of the iterative methods do you prefer and why? (1)
Question 2: 6 marks
Use Gaussian-type elimination method and work exactly to compute the inverse of
3 5
−4 4
1
P = 45 7
4
1
1 −1 −1
21
Question 3: 9 marks
The nonlinear system
x1 + 2x2 = 3
3x1 + x22 = 5
3.2 Use the approximations from part (3.1) as initial approximations for Newton’s method to cal-
culate solutions with an accuraacy of 10−3 in the maximum-magnitude l∞ norm. (7)
Question 4: 20 marks
Consider the following data:
x f (x) f 0 (x)
0.1 −0.62049958 3.58502082
0.2 −0.28398668 3.14033271
0.3 0.00660095 2.66668043
0.4 0.24842440 2.16529366
(4.1) Find an approximation to f (0.37) using the following forms of interpolating polynomial
Question 5: 12 marks
Consider the data below:
Flow rate Pressure
94 10
118 16
147 25
180 40
230 60
(5.1) From a theoretical consideration, it is suspected that the rate of flow from a fire hose is
proportional to some power of pressure at the nozzle. Do these data confirm that? (2)
(5.2) Get the least-squares values for the exponent and the proportionality factor. (8)
(5.3) Use the least-squares function to approximate the pressure when the rate of flow is 200. (2)
22
COS2633/101/3/2020
Question 6: 15 marks
Let (x0 , y0 ) = (0, 0) and (x1 , y1 ) = (5, 2) be the end points of a curve. Use the following guide points
to construct parametric cubic approximations (x(t), y(t)). Graph the cubic Bezier polynomials.
Question 7: 18 marks
Consider the integral Z 1
4
I= dx
0 1 + x2
(7.1) Compute an approximation to I by means of:
1
(a) Simpson’s 3
rule. (3)
1
(b) The trapezoidal rule, with h = 4
. (4)
(c) A three-term Gaussian quadrature formula. (6)
(7.2) Estimate the respective truncation errors in (7.1(a)) and (7.1(b)). (2)
(7.3) Determine the integral analytically and then compute the actual error in (7.1(c)). (3)
23
ASSIGNMENT 03
Due date: 28 April, 2020
UNIQUE ASSIGNMENT NUMBER: 579341
24
COS2633/101/3/2020
ASSIGNMENT 01
Due date: 07 August, 2020
UNIQUE ASSIGNMENT NUMBER: 814970
Total Marks: xxx
IMPORTANT
• This is a multiple choice assignment. ALL the questions must be answered on a mark
reading sheet which you then post to the University. Before answering this assignment,
consult the publication Study @ Unisa on how to use and complete a mark reading sheet.
You may, however, choose to complete and submit the assignment online, using myUnisa.
• Keep your rough work so that you can compare your solutions with those that will be sent to
you after the closing date.
Question 1: 30 marks
(1.1) Which of the following statements about the function given by f (x) = x4 − 2x3 is true? (10)
25
(1.2) The position of a particle moving along a line is given by s(t) = 2t3 − 24t2 + 90t + 7 for t ≥ 0.
For what values of t is the speed of the particle increasing? (10)
(1.3) The function f (x) = x4 − 2x3 − 5x2 + 12x − 5 has four distinct roots. Applying Muller’s method
to compute the roots of f (x) yields the following results: (10)
Question 2: 30 marks
In this question we consider two curves y1 = 8 sin x and y2 = ex + 4. We want to investigate the
behaviour of y1 and y2 .
Note: The arguments of y1 are given in radians.
Hint: Do exactly 3 iterations for the iterative scheme x = g(x) wherever needed.
(2.1) Which of the following is correct. (10)
26
COS2633/101/3/2020
(1) Applying Aiken’s acceleration technique to improve the x = g(x) method either in the
case of x = g1 (x) or x = g1 (x) does not make sense because wherever we expect
convergence for g1 (x) and g2 (x), we get it quickly.
(2) The Aiken’s acceleration technique is in general not applicable to the iterative scheme,
x = g(x).
(3) The Aiken’s acceleration technique is just not applicable here because the problem of
finding the intersection of y1 and y2 is not directly related to the x = g(x) scheme.
(4) Applying Aitken’s acceleration technique to improve the fixed-point iterative scheme, x =
g(x) may help to improve the method in some cases but not all.
(5) None of the above is correct.
Question 3: 40 marks
The sum of two numbers is 20. If each number is added to its square root, the product of the two
sums equals 155.55. We want to determine the two numbers to within 10−4 .
(3.1) The two numbers, say x and y can be determined by: (10)
(3.2) Applying Newton’s method to the appropriate equation yields the following result: (10)
(3.3) Applying the regula falsi method to the same equation used for Newton’s method above,
starting with x0 = 2 and x1 = 7, yields the following result: (10)
27
(4) pi = 6.5279551155 after at least seven iterations
(5) None of the above
(3.4) From the result obtained by applying the two methods: Newton’s and Regula-falsi, we infer
that: (10)
(1) Newton’s method performed fewer iterations than the other method
(2) the regula falsi method performed fewer iterations than Newton’s method
(3) none of the two methods performed better than the others
(4) the two methods cannot be compared because of different starting points
(5) None of the above
28
COS2633/101/3/2020
ASSIGNMENT 02
Due date: 30 September, 2020
UNIQUE ASSIGNMENT NUMBER: 658219
Total Marks: 100
ONLY FOR SEMESTER 2
Question 1: 15 marks
Consider the linear system
0.05x1 + 0.07x2 + 0.06x3 + 0.05x4 = 0.23
0.07x1 + 0.10x2 + 0.08x3 + 0.07x4 = 0.32
0.06x1 + 0.08x2 + 0.10x3 + 0.09x4 = 0.33
0.05x1 + 0.07x2 + 0.09x3 + 0.10x4 = 0.31
(1.1) Write the system in matrix equation form. (2)
(1.2) Solve the the system using four decimal arithmetic with truncation (not rounding) by: (11)
(a) Gaussian elimination without pivoting. [4]
(b) Gaussian elimination with scaled partial pivoting. [4]
(c) LU decomposition. [3]
(1.3) Compute the total number of arithmetic operations in (1.1)(a). (2)
Question 2: 25 marks
Suppose we are to solve the equation
Ax = b.
We solve this by
1 1 1
x= b= ωb = ωb
A ωA 1−r
where ω 6= 0 is some real number chosen to weight the problem appropriately, and r = 1−ωA. Now
suppose that ω is chosen such that |r| < 1 and A 6= 0. Then the following geometric expansion
holds:
1
= 1 + r + r2 + r3 + . . .
1−r
29
This gives approximate solution to our problem as,
x ≈ [1 + r + r2 + r3 + · · · + rk ]ωb
= ωb + [r + r2 + r3 + · · · + rk ]ωb
= ωb + r[1 + r + r2 + r3 + · · · + rk−1 ]ωb
This suggests an iterative approach to solving the system Ax = b. Let x(0) = ωb be the initial
estimate of the solution, then for the kth iterate we have
x(k) = ωb + rx(k−1)
= ωb + (I − ωA)x(k−1)
If |r| < 1 then the iterate is guaranteed to converge to the true solution.
For some matrix , M and some scaling factor ω, we obtain the following algorithm
M x(k) = ωb + (M − ωA)x(k−1) .
In the following computations use four-digit arithmetic with truncation not rounding and do three
iterations, starting with x(0) = (1, 3, 2, 4)t .
(a) Solve the system by choosing M to be the matrix consisting of the diagonal of A and
ω = 1. [4]
(b) Solve the system using the Jacobi method. [4]
(c) Compare and comment on the two solutions. [2]
(a) Solve the system by choosing M to be the lower triangular part of A including the diag-
onal entries, and ω = 1. [4]
(b) Solve the system using the Gauss-Seidel method. [4]
(c) Compare and comment on the two results. [2]
(2.3) Solve the system in (1.1) using the Successive Over-Relaxation technique with ω = 0.5. (4)
(2.4) Which of the iterative methods do you prefer and why? (1)
Question 3: 10 marks
(3.1) Consider the matrix (4)
3 5 1
A = −1 3 2
a b −1
30
COS2633/101/3/2020
Question 4: 15 marks
Consider the following data table:
x f (x)
0.5 −1.1518
−0.2 0.7028
0.7 −1.4845
0.1 −0.14943
0.0 0.13534
(4.1) Use a third degree Lagrange interpolating polynomial to approximate f (0.55). (6)
(4.2) Construct a divided-difference table from the data (without ordering the data) and use a sec-
ond degree Newton’s forward-divided difference formula to approximate the value of f (0.55).
(7)
(4.3) Compare and comment about the result of the approximations in (4.1)-(4.2). (2)
Question 5: 15 marks
Consider the following table:
x y
1.0 1.84
1.1 1.96
1.3 2.21
1.5 2.45
1.9 2.94
2.1 3.18
(5.1) Find the least squares polynomial of degree one and two for the above data. (10)
(5.2) From the normal equations to be solved to find a least-squares polynomial of degree three
for the above data, set up the equations for the Gauss-Seidel algorithm to approximate the
third degree least-squares polynomial. (5)
Question 6: 15 marks
Consider the following data table
d
x cos x dx
= − sin x
(cos x)
0.30 0.95534 −0.29552
0.32 0.94924 −0.31457
0.35 0.93937 −0.34290
31
(6.1) Use the above values and five-digit arithmetic with rounding to construct a cubic spline Q with
boundary conditions (6)
which forces the slope of the spline to assume certain values (in our case the values f 0 (x0 )
and f 0 (xn ), respectively) at the two boundaries. Use this spline to approximate cos 0.34.
(6.3) Use the spline constructed in (6.1) to approximate sin 0.34. (3)
Question 7: 15 marks
(7.1) Consider the function f (x) = x sin x. Apply Richardson extrapolation to obtain f 00 (0.32) accu-
rate to five significant figures. Start with h = 0.1 and use central differences. (5)
(7.2) Use a four-term Gaussian quadrature and six-decimal precision to approximate the integral
(10) Z 3
ex dx
0
32
COS2633/101/3/2020
ASSIGNMENT 03
Due date: 04 October, 2020
UNIQUE ASSIGNMENT NUMBER: 642183
33