Please Post MATLAB Code
Required information
Consider the following function:
f(x) = -12 - 21x + 18x^2 - 2.75x^3
Write one program that does all of this:
(a) Graph the function
(b) Use the ginput command to select the XI and Xu values
(c) Find the lowest root using the bisection method - save the results for each iteration
(d) Find the root using the false position method - save the results for each iteration
(e) For (c) and (d), stop at 10 iterations or when the % relative approximate error is less than 1%, whichever comes first. Set the initial error for each method to be 10%.
Output: In one graph, plot the error v iteration for both methods. The root at the end of the program for both methods.
Determine the roots of the given function graphically. Change the problem as follows: write one program that does all of this:
(a) Graph the function, use the ginput command to select the XI and Xu values
(b) Determine the smallest root using the bisection method
(c) Determine the root using the false position method
(d) Stop each method at 10 iterations or when the % relative approximate error is 1%
Set the initial error for each method to be 10%.
Output: In one graph, plot the error v iteration for both methods and the root at the end of the program for both methods.
(Please upload your response/solution using the controls below.)