Question
Write a program in c++ to implement the fixed-point iteration method. Then use your code to find all the roots of f (x) = ?2
Write a program in c++ to implement the fixed-point iteration method. Then use your code to find all the roots of f (x) = ?2 + 6x ? 4x^2 + 0.5x^3 ; the roots should be calculated such that the relative approximate error is less than 10^-6 . Notice that the method will not converge always, and thus a maximum number of iterations must be specified. Use the following initial guesses 0, 1.37, 6.2 . What do you observe? Your code should, for all iterations, output the iteration number, the current estimate of the root, and the relative approximate error.
Step 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