Functional iteration to find the root of a linear equation

168 Views Asked by At

I'll try to explain what I've understood about the subject and I want you to please tell me whether or not my arguments are correct.

Given the equation $$(a-1)x+b=0$$ The obvious solution is $$\bar{x}=-\frac{b}{a-1}$$ But the challenge is to approximate the value using an iterative method. Since $\bar{x}$ is a root $$(a-1)\bar{x}+b=0\implies a\bar{x}-\bar{x}+b=0\implies \bar{x}=a\bar{x}+b$$ I can define a new function $g$ $$g(x):=ax+b$$ So I can write $$\bar{x}=a\bar{x}+b=g(\bar{x})$$ This means that $\bar{x}$ is a fixed point for $g$.

I can rewrite the initial equation $$x=ax+b$$ Except for when $x=\bar{x}$, the right side of the equation will be either greater or lower than the left side, according to the values of $a$ and $b$. This allows us to build a sequence of numbers starting from a chosen number. Let $x_0$ be the first element of the sequence: $$x_0$$ $$x_1=ax_0+b$$ $$x_2=ax_1+b$$ In general, for $n\ge0$: $$x_{n+1}=ax_n+b$$

My guess is that I can compute this iterative method until: $$...$$ $$\bar{x}=ax_n+b$$ $$\bar{x}=a\bar{x}+b$$ As soon as the procedure gets the same value (at least twice), it realizes it can stop as the root was found.

My question at this point is: whether I find the root or not depends on how I choose $x_0$ because I might pick a number that causes the procedure to never step on $\bar{x}$ and continue endlessly. Am I right?

Also, there was this graph in the teacher's notes

enter image description here

Even if it makes sense on the graph, I can't really understand why $g(x)$ is a curve and not a line (since $g(x)=ax+b$).

1

There are 1 best solutions below

0
On

The initial point doesn't matter. The only thing that matters is whether you have $|a|\ge1$ or $|a|<1$. Note that:

$$|x_{n+1}-\bar x|=|(ax_n+b)-(a\bar x+b)|=|a|\cdot|x_n-\bar x|$$

So if $|a|<1$ then the difference between $x_n$ and $\bar x$ will decrease, while if $|a|\ge1$, it will not. Furthermore, it decreases linearly, that is to say, it will converge when $|a|<1$.

Your teacher was most likely using this as a simple example where testing the above is very easy. In general, you will want to derive a linear approximation of an arbitrary function $g$, namely by finding it's tangent line at $x_n$ and going from there. In such a more general case, the error can be large depending on the where you start. However, you can check to see if it can converge by observing the gradient near the point of interest. If it is less than 1 in magnitude, then you have guaranteed convergence for sufficiently close $x_0$.