Question: code language is python 2. (3 points) Use modified fixed point code to apply Newton's method to finding the root of f(x) = 1 -

code language is python
code language is python 2. (3 points) Use modified fixed point code
to apply Newton's method to finding the root of f(x) = 1

2. (3 points) Use modified fixed point code to apply Newton's method to finding the root of f(x) = 1 - cos(x) to 5 correct decimal places (10^(-5), starting from x0 = 0.1. Attach the full output. 3. (3 points) is the method converging linearly or quadratically? (Show your work.) Pratice.py plot1.py plot2.py fixedpoint.py 1 import math 2 3 # define g(x) 4 def g(x): 5 return X**3-X 6 7 def fp(g, startpoint, tolerance): 8 x = startpoint # initialize x to the starting point 9 # while x and g(x) are too far apart 10 while abs(x-g(x)) > tolerance: 11 x = g(x) # compute new value of x by setting it to g(x) print(x) # print x 13 return x # return the result 14 15 print('Fixed point estimate: ', fp(9,-1,1)) 16 Nmco OEM

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 Databases Questions!