Hi there,
I've been asked to calculate the roots of this equation by iteration (showing roots to 2d.p)
x^2 + 5x + 2 = 0
I try to look up the method on youtube and do it myself however I think I'm getting confused. I'll show what I have done below but if someone could offer some help with this subject I would greatly appreciate it. I'm struggling to understand where to even start really.
x^2 + 5x + 2 = 0
(x^2 + 5x + 2) / x = 0 / x
x + 5 + (2/x) = 0
x + (2/x) = -5
x = -5 - (2/x)
Can anybody tell me if this is right and where to go from here? If it's not right, where have I gone wrong?
Thanks,
Chris
There are lots of ways to use iteration. All you need is a version of the equation with x on the LHS, and at least one x showing up somewhere on the RHS thus:
x = f(x).
Then, you set up an iteration scheme. I'll use indices to show what I'm doing. You create a sequence You start somewhere, say, Then, if certain conditions on f are true (the derivative of f(x) is less than 1 everywhere), the sequence will converge to your root. Does that make sense? So you'd get
and then
and so on.
You're all set up to start with. Your derivative is which will have problems in certain regions. It may not be the best choice. What's another way you could set up your iteration?
With your iteration scheme of x = -5 - (2/x), we compare this equation with x = f(x), and conclude that f(x) = -5 - (2/x). It is |f'(x)| that needs to be less than or equal to 1 in order to guarantee convergence (convergence might still happen if the derivative is not less than 1 in magnitude, but there are no guarantees). Also, note that