0% found this document useful (0 votes)
27 views2 pages

2023 Assignment MAT3641

The document provides instructions for a mathematics assignment involving root-finding algorithms. Students are asked to: 1) Use bisection, Newton's, and secant methods to find the roots of f(x) = x^3 - 3x + 2, producing tables of results for two roots. 2) Produce a table showing iterations of Newton's method finding one of the roots, including additional metrics. 3) Produce a similar table for Newton's method finding the other root. 4) Plot the surface z = sin(xy) over a domain and add labels and a title. The assignment is due on May 8th 2023 and students should upload their code and outputs
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)
27 views2 pages

2023 Assignment MAT3641

The document provides instructions for a mathematics assignment involving root-finding algorithms. Students are asked to: 1) Use bisection, Newton's, and secant methods to find the roots of f(x) = x^3 - 3x + 2, producing tables of results for two roots. 2) Produce a table showing iterations of Newton's method finding one of the roots, including additional metrics. 3) Produce a similar table for Newton's method finding the other root. 4) Plot the surface z = sin(xy) over a domain and add labels and a title. The assignment is due on May 8th 2023 and students should upload their code and outputs
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/ 2

University of Namibia Computing Mathematical & Statistical Sciences

MAT3641 Assignment 50 marks Due date: 8th May 2023 18:30


INSTRUCTIONS
UPLOAD your Matlab Codes, m.files functions scripts, figures, word or Pdf document, any
Output files on Moodle MAT3641under MAT3641 ASSIGNMENT
Before 18:30 on Monday 8th May 2023.

1 Use the Bisection , Newton and Secant methods respectively, to produce the following table
to give at each step 𝑖, the method’s approximation 𝑥𝑖 , the absolute residual value 𝑟𝑖 the
absolute error 𝑒𝑎𝑖 = |𝑒𝑥𝑎𝑐𝑡 − 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 | , and the relative absolute error 𝑒𝑟𝑖 =
𝑒𝑥𝑎𝑐𝑡−𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒
| |, for the function 𝑓(𝑥) = 𝑥 3 − 3𝑥 + 2 with 5 iterations.
𝑒𝑥𝑎𝑐𝑡
Do this for each of the roots 𝑥 = −2 and 𝑥 = 1, take 𝑥0 = −2.5 and 𝑥0 = 1.5 for initial
∗ ∗

guesses respectively, and where two initial values are needed take 𝑥−1 = −2.5, 𝑥0 = −1.5
and 𝑥−1 = 0.5, 𝑥0 = 1.5 respectively.

Iterations 𝑥𝑛 𝑟𝑖 𝑒𝑎𝑖 𝑒𝑟𝑖


1 𝑥1 = ⋯ … … …
2 𝑥2 = ⋯ … … …
3 𝑥3 = ⋯ … … …
4 … … … …
5 … … … …

1.1. Bisection method with 𝑥 ∗ = −2 [5]


1.2. Bisection method with 𝑥 ∗ = 1 [5]
1.3. Newton’s method with 𝑥 ∗ = −2 [5]
1.4. Newton’s method with 𝑥 ∗ = 1 [5]
1.5. Secant method with 𝑥 ∗ = −2 [5]
1.6. Secant method with 𝑥 ∗ = 1 [5]

2 For the function 𝑓(𝑥) = 𝑥 3 − 3𝑥 + 2 produce the following table for Newton’ s method with
𝑥 ∗ = −2, 𝑥0 = −2.5. [5]

|𝐸𝑛+1 |
Iterations 𝑥𝑛 𝑥𝑛+1 − 𝑥𝑛 𝐸𝑛 = 𝑥 ∗ − 𝑥𝑛
|𝐸𝑛 |2
1 𝑥1 = ⋯ … … …
2 𝑥2 = ⋯ … … …
3 𝑥3 = ⋯ … … …
4 … … … …
5 … … … …

10

1
University of Namibia Computing Mathematical & Statistical Sciences
MAT3641 Assignment 50 marks Due date: 8th May 2023 18:30

3 For the function 𝑓(𝑥) = 𝑥 3 − 3𝑥 + 2 produce the following table for Newton’ s method with
𝑥 ∗ = 1, 𝑥0 = 0.5. [5]

|𝐸𝑛+1 |
Iterations 𝑥𝑛 𝑥𝑛+1 − 𝑥𝑛 𝐸𝑛 = 𝑥 ∗ − 𝑥𝑛
|𝐸𝑛 |
1 𝑥1 = ⋯ … … …
2 𝑥2 = ⋯ … … …
3 𝑥3 = ⋯ … … …
4 … … … …
5 … … … …

10

4 Plot the surface 𝑧 = sin(𝑥𝑦) over a suitable domain provide axis labels, a legend and a title.
[10]

You might also like