# Thread: Fixed-point iteration, question from my Numerical Analysis 1 exam

1. ## Fixed-point iteration, question from my Numerical Analysis 1 exam

Hi,

I had my exam about a week ago, and here's one problem from it.

For which values of $a$ can we use the fixed-point iteration $x_{n+1}=g(x_n)$ to solve the following equation,

$x + a = e^{-x}$ ?

I know the fixed-point iteration will converge if $|g'(x)|<1$ for all $x$. I get,

$x = e^{-x}-a = g(x)$, and so $|g'(x)|=|e^{-x}|<1$. From this I conclude that $x>0$.
I now define two function, $f(x)=x+a$ and $g(x)=e^{-x}$. When $x>0$, a solution exists when $f(x)=g(x)$, that is when $a<1$.

Something smells here, but I don't know what. Hints are very welcome!

2. Originally Posted by Mollier
Hi,

I had my exam about a week ago, and here's one problem from it.

For which values of $a$ can we use the fixed-point iteration $x_{n+1}=g(x_n)$ to solve the following equation,

$x + a = e^{-x}$ ?

I know the fixed-point iteration will converge if $|g'(x)|<1$ for all $x$. I get,

$x = e^{-x}-a = g(x)$, and so $|g'(x)|=|e^{-x}|<1$. From this I conclude that $x>0$.
I now define two function, $f(x)=x+a$ and $g(x)=e^{-x}$. When $x>0$, a solution exists when $f(x)=g(x)$, that is when $a<1$.

Something smells here, but I don't know what. Hints are very welcome!
You have concluded that x>0, but this implies that a<1 for there to be a root.

CB

3. Thats means that my answer is correct?

4. Originally Posted by CaptainBlack
You have concluded that x>0, but this implies that a<1 for there to be a root.

CB
Hi CB, could you please tell me what the point of your post is? It is certainly keeping other people from replying to this thread.

5. Originally Posted by Mollier
Hi CB, could you please tell me what the point of your post is? It is certainly keeping other people from replying to this thread.
It means that if you are correct in concluding that fixed point iteration requires x<0 for it to converge, then this implies that a<1 since otherwise there is no root.

Experiment suggests that for the fixed point iteration that you are using this is indeed the case.

(However this is only for the fixed point iteration that you have proposed, I have not checked what happens with other formulations of fixed point iteration for this problem such as $x=-\ln(x+a)$.)

CB

6. Originally Posted by Mollier
Hi,

I had my exam about a week ago, and here's one problem from it.

For which values of $a$ can we use the fixed-point iteration $x_{n+1}=g(x_n)$ to solve the following equation,

$x + a = e^{-x}$ ?

I know the fixed-point iteration will converge if $|g'(x)|<1$ for all $x$. I get,

$x = e^{-x}-a = g(x)$, and so $|g'(x)|=|e^{-x}|<1$. From this I conclude that $x>0$.
I now define two function, $f(x)=x+a$ and $g(x)=e^{-x}$. When $x>0$, a solution exists when $f(x)=g(x)$, that is when $a<1$.

Something smells here, but I don't know what. Hints are very welcome!

This looks good, except for the last two lines. You define function $\displaystyle g,$ but it was previously defined differently.
I now define two function, $f(x)=x+a$ and $g(x)=e^{-x}$. When $x>0$, a solution exists when $f(x)=g(x)$, that is when $a<1$.
I checked $x_{n+1}=g(x_n), \text{ where } g(x)=e^{-x}-a\,,$ with a graphing calculator.

It does converge, although very slowly, for a = 0.9 .

Similarly, it does diverge (also very slowly) for a = 1.1 .

7. Thanks, I should not have used g two times...