Question: Given the tasks please complete the deliverables 1. You will experiment with three functions. Create these functions in Python using def. Use the initial brackets

![brackets and initial guesses as appropriate. a. f1(x)=exp(x)3; initial bracket [0.5,2] and](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2e84d8bb5b_21366f2e84d1fc53.jpg)
1. You will experiment with three functions. Create these functions in Python using def. Use the initial brackets and initial guesses as appropriate. a. f1(x)=exp(x)3; initial bracket [0.5,2] and initial guess =0; b. f2(x)=exp(x)x; initial bracket [0.5,2] and initial guess x=0; c. f3(x)=x3+4x210; root is between x=1 and x=1.5 2. Given the functions f(x) above, apply the Bissection, False Position, Newton Raphson and Secant Methods to determine their roots. The functions are specified above. a. Plot the function f(x) and confirm that over the bracket range (for the bracketing/false position methods) a single root exists. b. Using the built-in functions in Scipy, determine the roots of the provide equations using all the methods (except for false position). Check the call for the methods: from scipy import optimize root = optimize. bisect (f,) root = optimize.newton (f,) root = optimize.fixed_point(func, ...) \# where .. are the input arguments of the method check scipy c. Create a table (output) as: Table I - Numerical Results - Roots of Equation d. Plot abs (f(x)) as a function of iteration for each method. Use a semi-log plot with the y-axis logarithmic. Discuss the results. 3. Based on your results, answer and discuss the following questions: a. Base your finding using the information from the Table 1 b. How does the choice of initial guess (either the initial interval for bisection or a the single guess for NR affect the solution? c. Discuss the convergence rates for all of the methods d. How the speed of convergence and the error tolerance (s) are related? You may want 1. Download PETE301_La3_SP23.zip and unzip all the files into a folder 2. Modify the bisect_naive.py function to develop a more "elegant" and efficient solver. a. Modify the algorithm to take the approximate error and the maximum number of iterations in consideration call My_bisection.py b. Save the code from (a) into a new file called My_FP.py and code the false-position algorithm 3. Study the pseudo-code for the Newton-Raphson and Secant methods and code a suitable algorithm to determine the roots of a provided equation a. Call the new program as My_NewtonRaphson.py b. Create a Python function that takes the provided f(x) c. Code the secant method using the standard and perturbation forms of the derivatives call it My_Secant.py 4. Given the functions f(x) below, apply the Bissection, False Position Method, Newton Raphson and Secant Methods to determine their roots. The functions are specified below. 5. - Plot the function f(x) over the bracket range (for the bracketing methods) and confirm that a single root exists. 6. - Plot Abs (f(x)) as a function of iteration for each method. Use a semi-log plot with the y-axis logarithmic. Discuss the results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
