Question
Given the equation x^2 8x 10 cos(2x) + 15 = 0, find all the zeroes using fixed point iteration in Matlab, x n+1 will be
Given the equation x^2 8x 10 cos(2x) + 15 = 0, find all the zeroes using fixed point iteration in Matlab, xn+1 will be calculated using:
xn+1 = 1/15 * xn^2 + 7/15 * xn - 2/3*cos(2xn) + 1
The error shall be less than 10^-10
Plotting the function show four roots, around 2, 4, 5, and 6, which I used as start-guesses. I created a function where the current x was used to calculate the next according to the above formula. The error was calculated using:
error = abs(x-xn)
Which might be wrong, as I could not find out how to calculate it. The results I got are:
x1 = 2.4297...
x2 = 5.715...
x3 = 5.715...
x4 = 5.715...
So x2 to x4 converged to the same value using the method, and I cannot see why. Any ideas?
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