2023 Assignment MAT3641
2023 Assignment MAT3641
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.
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]