Assignment 1
Assignment 1
Total Marks: 04
Obtained Marks:
NUMERICAL COMPUTING
Assignment # 01
Last date of Submission: 09 October 2024
Student Name:
Reg. Number:
NC BS(CS)-3A/B/C/D SZABIST-ISB
Shaheed Zulfikar Ali Bhutto Institute of Science & Technology
Q1:
Show that f (x) = x3 + 4x2 − 10 = 0 has a root in [1, 2], and use the Bisection method and Fixed
Point Iteration Method to determine an approximation to the root that is accurate to at least within
10−4.
(Marks=5)
Use the Bisection and Newton Raphson Method to find an approximation to within 10 −3 to a
value in [0.5, 1.5] with
ex−2 = cos(ex − 2).
(Marks=5)
Q2:
𝟎.𝟖𝟐𝟏𝟑𝟓
If the numbers 𝟔. 𝟐𝟑𝟒𝟑 𝐱 are rounded, estimate the maximum absolute and
𝟐.𝟕𝟐𝟔𝟖
relative errors. Also, find the range in which the true answer lies.
(Marks=5)
Q3:
Write the Matlab/C++/ Python code for the Bisection Method in Question 1.
(Marks=5)