0% found this document useful (0 votes)
12 views

Assesmment APM

This tutorial letter outlines Assignment 2 for the APM2613 module, focusing on direct and indirect methods for solving linear systems, including Gaussian elimination and Newton's method for nonlinear systems. It contains specific questions and tasks related to matrix equations, arithmetic operations, and iterative methods, along with guidelines for using Matlab/Octave. The module is fully online and accessible through myUnisa.

Uploaded by

ICafe Internet
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)
12 views

Assesmment APM

This tutorial letter outlines Assignment 2 for the APM2613 module, focusing on direct and indirect methods for solving linear systems, including Gaussian elimination and Newton's method for nonlinear systems. It contains specific questions and tasks related to matrix equations, arithmetic operations, and iterative methods, along with guidelines for using Matlab/Octave. The module is fully online and accessible through myUnisa.

Uploaded by

ICafe Internet
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/ 3

APM2613/A02/0/2023

Tutorial letter A02/0/2023

APM2613

Year module

Department of Mathematical Sciences

IMPORTANT INFORMATION:
This Assignment 2 of APM2613 covers direct and indirect
methods of solutions of linear systems. There is a question
related to solving nonlinear systems by Newton’s method. The
relevant sections are as outlined in Tutorial Letter 101. Lessons
3 and 4 will give highlights of the relevant concepts.

Note: This is a fully online module and therefore it is only available on myUnisa.

BARCODE

university
Define tomorrow. of south africa
PLEASE NOTE:
In working out the following exercises, you can use Matlab/Octave to compute but the essential
steps in the computations must be written out. Unless otherwise stated, no computer code is
required to be submitted.

Question 1 [30 marks]


Consider the linear system
4x1 + x2 − x3 = 5
−x1 + 3x2 + x3 = −4
2x1 + 2x2 + 5x3 = 1
In answering the following questions use 4 decimal place accuracy with rounding:

(1.1) Write the system as a matrix equation. (1)

(1.2) Use the appropriate Matlab/Octave command to check what the actual solution is. (2)

(1.3) Solve the system using:

(a) Gaussian elimination without pivoting. (7)


(b) Gaussian elimination with scaled partial pivoting. (7)
(c) Basic LU decomposition. (6)

(1.3) Determine the number of arithmetic operations (multiplication/ division, addition/subtraction)


in (1.3)(a) above. (3)

(1.4) By comparing the residual vectors based on the approximate solutions obtained in (1.3)(a),
(b) and (c), which method gave the best approximation. (4)

Question 2 [25 marks]


Consider the linear system Ax = b in which
   
1 2 −1 1
C =  1 −1 2 ; b =  0 ;
1 −1 4 5

(2.1) Use Gauss-Jordan method to solve the system Ax = b. (7)

(2.2) Use Gauss-Jordan method to compute the inverse C −1 exactly. (7)

(2.3) Use Cramer’s rule to compute the inverse C −1 . (7)

(2.4) Solve the linear system Ax = b using the inverse obtained above. (4)

2
APM2613/A02/0/2023

Question 3 [25 marks]


Consider again the linear system Ax = b used in Question 1. For each of the methods mentioned
below use 4 decimal place arithmetic with rounding and the initial approximation x(0) = (0, 0, 0)T .

1.

(3.1) By examining the diagonal dominance of the coefficient matrix, A, determine whether con-
vergence to a solution when using iterative methods to solve the system can be guaranteed.
(3)

(3.2) Obtain approximate solutions to the system using three iterations of each of the following
methods:

(a) the Jacobi method. (5)


(b) the Gauss-Seidel method (6)
(c) the Successive Over-Relaxation technique with ω = 0.4. (6)

(3.3) An iterative algorithm to solve Ax = b, with A and b as defined for Question 1, is derived from
a basic principle and given by

M xk = ωb + (M − ωA)xk−1

for some matrix M and some scaling factor ω.


Let ω = 1 and M be chosen to be the lower triangular part of A including the diagonal entries.

(a) Perform three iterations of this algorithm with x(0) = (0, , 0, 0)T (4)
(b) Compare your results with those obtained from the used in (3.2) above. (1)

Question 4 [20 marks]


Consider the following nonlinear system:

x2 + y = x
xy + 2y = 1

(4.1) Draw a sketch of the two functions on the same axes and use it to approximate and initial
solution. (7)

(4.2) Write down a computer code for Newton’s method for more than one variable to solve the
above system. (8)

(4.3) Use the algorithm in (4.2) to solve the given system of nonlinear equations with x(0) as ob-
tained in (4.1) above. (5)

You might also like