# 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 $\displaystyle a$ can we use the fixed-point iteration $\displaystyle x_{n+1}=g(x_n)$ to solve the following equation,

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

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

$\displaystyle x = e^{-x}-a = g(x)$, and so $\displaystyle |g'(x)|=|e^{-x}|<1$. From this I conclude that $\displaystyle x>0$.
I now define two function,$\displaystyle f(x)=x+a$ and $\displaystyle g(x)=e^{-x}$. When $\displaystyle x>0$, a solution exists when $\displaystyle f(x)=g(x)$, that is when $\displaystyle 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 $\displaystyle a$ can we use the fixed-point iteration $\displaystyle x_{n+1}=g(x_n)$ to solve the following equation,

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

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

$\displaystyle x = e^{-x}-a = g(x)$, and so $\displaystyle |g'(x)|=|e^{-x}|<1$. From this I conclude that $\displaystyle x>0$.
I now define two function,$\displaystyle f(x)=x+a$ and $\displaystyle g(x)=e^{-x}$. When $\displaystyle x>0$, a solution exists when $\displaystyle f(x)=g(x)$, that is when $\displaystyle 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 $\displaystyle 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 $\displaystyle a$ can we use the fixed-point iteration $\displaystyle x_{n+1}=g(x_n)$ to solve the following equation,

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

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

$\displaystyle x = e^{-x}-a = g(x)$, and so $\displaystyle |g'(x)|=|e^{-x}|<1$. From this I conclude that $\displaystyle x>0$.
I now define two function,$\displaystyle f(x)=x+a$ and $\displaystyle g(x)=e^{-x}$. When $\displaystyle x>0$, a solution exists when $\displaystyle f(x)=g(x)$, that is when $\displaystyle 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 \displaystyle g,$ but it was previously defined differently.
I now define two function,$\displaystyle f(x)=x+a$ and $\displaystyle g(x)=e^{-x}$. When $\displaystyle x>0$, a solution exists when $\displaystyle f(x)=g(x)$, that is when $\displaystyle a<1$.
I checked $\displaystyle 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...