Answered You can hire a professional tutor to get the answer.
write Matlab program. here is the question: Problem 4: Create a MATLAB function named mynewton.m to estimate the root for any arbitrary function f...
write Matlab program. here is the question:
Problem 4:
Create a MATLAB function named mynewton.m to estimate the root for any arbitrary
function f for a given initial guess x0 and absolute error ε. The function also takes in the maximum number of iterations, max iter, to limit the iteration cycle. Use mynewton.m template posted in homework 3 folder on TritonED as a guide to implement the method. You can construct the function in your own way. The function should return the approxi- mated root xn and the number of iterations n taken to reach the solution. Use the function mynewton.m and set max iter to be 100 in the following exercises.
(a, b) Find the root of f(x) = x^4 − 4x^3 + 4x^2 + 4x − 5 with x0 = 0 and ε = 10^−12. Put the root in p4a and the corresponding number of iteration in p4b.
(c, d) Find the root of f(x) = −x+sin(x)+4 with x0 = 10^−8 and ε = 10^^−12. Put the root in p4c and the corresponding number of iterations in p4d.
(e, f) Repeat parts (c, d) with x0 = 10^−7 and ε = 10^−12. Put the root in p4e and the corresponding number of iterations in p4f.