Question: HW 1 Due: 8 / 3 0 / 2 0 2 4 Friday 1 1 : 5 9 pm . Submit scanned / electronic answer

HW1
Due: 8/30/2024 Friday 11:59pm.
Submit scanned/electronic answer sheets to Canvas in ONE PDF, Label your problems.
Problem 1
In a 4-digit decimal number system, tilde(a)=1.234 and tilde(b)=4.567 are two machine numbers.
What is relative rounding error?
(don't just write an answer, show necessary steps such as formula for relative rounding error)
Problem 2
What is the rounding errors when computing the derivative of f(x)=sinx at x0=2.(exact value =cos(2)) using the definition f'(x0)~~f(x0+h)-f(x0)h, when h=1e-8,1e-5?
Use MATLAB to solve it, print out the results and paste/write your MATLAB coding script on the answer sheet.
(hint: may revise from the code posted on canvas-code_demo: L1_rounding_deri.m)
Problem 3.
u=[1,2,3]T,v=[4,5,6]T, what is the flops of 2u*v+1?
(don't just write an answer, give necessary explanation/show necessary steps).
Problem 4
solve f(x)=x3-3x+1=0, with iteration:
xk+1=xk-xk3-3xk+13xk2-3
x0=2.
a. use MATLAB to find smallest k such that |xk+1-xk|10-8.
b. for the smallest k required in Part a, what is the value of f(xk)?
Use MATLAB solve the problem, write out the required results, and paste/write your MATLAB script on answer sheets. (hint: may refer StopCriteria_successive_approx.m and StopCriteria_check_residual.m on Canvas-files_code demo)
HW 1 Due: 8 / 3 0 / 2 0 2 4 Friday 1 1 : 5 9 pm .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!