1. ## Iteration of a quadratic equation

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

2. 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 $x_{n+1}=f(x_{n}).$ You start somewhere, say, $x_{0}=1.$ 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

$x_{1}=f(x_{0})=f(1),$ and then

$x_{2}=f(x_{1})=f(f(x_{0}))=f(f(1)),$ and so on.

You're all set up to start with. Your derivative is $2/x^{2},$ which will have problems in certain regions. It may not be the best choice. What's another way you could set up your iteration?

3. Thanks for the quick response. I'm a bit confused where you say the derivative 2/x^2, is it not just 2/x? I think I have found one root, is there a way to find the other?

4. 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

$f'(x) =-\dfrac{d}{dx}\left[\dfrac{2}{x}\right]=-2\dfrac{d}{dx}(x^{-1})=-2(-1)x^{-2}=\dfrac{2}{x^{2}}.$

5. Iteration, as far as I know, does not necessarily offer some slick way of finding a root once another is given - it just plain lets you find a root, usually one that is close to your original guess.