Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 titlesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started