Question: PLEASE SOLVE USING MATLAB!!! 3. Consider the function f(x) = cos(x) x a. Plot x versus f(x) using the function fplot. b. What is the
PLEASE SOLVE USING MATLAB!!!
3. Consider the function f(x) = cos(x) x a. Plot x versus f(x) using the function fplot. b. What is the solution of this equation using the fzero function? Display this solution using format long. c. Using the initial guess of x1 = 1, return the number of iterations necessary to achieve an estimated error of titl*10 1 X; using Newton-Raphson Method. Report the solution and the function evaluation (n, xns, f(xns)). d. Create a convergence plot of true error versus iterations. You may assume that fzero provides a true solution. e. Calculate and display the true error of function evaluation Tolerance in f(x) = f(xts) -f(xns) assuming that the output from fzero is the true solution. For all plots, add proper labels for x-axis and y-axis, legends, and titles
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
