Question: Given the function: f ( x ) = x 3 - 2 x - 5 ( a ) Using Python as your coding language, write

Given the function:
f(x)=x3-2x-5
(a) Using Python as your coding language, write a program that uses the bisection
method to find the root of the function, for the interval 0,3. Stop the iteration
when the error as estimated by |xn+1-xn| is less than 10-6. Plot the output to
show the results.
(b) Repeat (a) but use the Newton-Raphson method to find the root of the function,
taking x0=2 and using the interval as given in part (a). Plot the output to show
the results.
(30 marks)
(c) Repeat (a) but use the secant method taking x0=0 and x1=3 using the interval
as given. Plot the output to show the results.
(20 marks)
(d) Discuss each of the methods used for root finding and evaluate your result using
all three methods of the given function.
 Given the function: f(x)=x3-2x-5 (a) Using Python as your coding language,

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!