Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

Make a function defined as: def Secant(fcn, x0, x1, maxnew=14, xtol=1e-4):Purpose: use the Secant Method to find the root of fcn(x), in the neighborhood of x0 and x1

Computer Science Sep 08, 2020

Make a function defined as: def Secant(fcn, x0, x1, maxnew=14, xtol=1e-4):Purpose: use the Secant Method to find the root of fcn(x), in the neighborhood of x0 and x1.fcn: the function for which we want to find the rootx0 and x1: two x values in the neighborhood of the root xtol: exit if the |xnewest - xprevious| < xtol maxnew: exit if the number of iterations (new x values) equals this number return value: the final estimate of the root (most recent new x value) Write and call a main() function that uses your Secant function to estimate and print the solution of:

 

x - 3 * cos(x) = 0 , with x0=1, x1= 2, maxnew = 4 and xtol = 1e-4

 

cos(2x)*x3 = 0 , with x0=1, x1= 2, maxnew = 15 and xtol = 1e-8

 

cos(2x)*x3 = 0, with x0=1, x1= 2, maxnew =23 and xtol = 1e-8

Expert Solution

For detailed step-by-step solution, place custom order now.
Need this Answer?

This solution is not in the archive yet. Hire an expert to solve it for you.

Get a Quote
Secure Payment