1

If $x_{n+1}=x_{n} + \dfrac{(2-e^{x_{n}})(x_{n} - x_{n-1})}{e^{x_{n}} - e^{x_{n-1}}}$ with $x_o=0$ and $x_1 = 1$. What is the $\lim_{n\to \infty}x_n$?

By doing a little manipulating from the equation above I found that $f(x)=e^{x}-2$ so can I say that

$\lim_{n \to \infty}x_n$ is the same as $\lim_{x \to p} e^{x}-2 = 0$?

$\Rightarrow e^{p}-2=0$

$\Rightarrow p=\ln(2)$

Thus the $\lim_{n \to \infty} x_n = \ln(2)$

Lutz Lehmann
  • 126,666
Gamecocks99
  • 1,023

1 Answers1

0

Given that you seem to know the answer and you're in a numerical methods course, how can you possibly resist the urge to write a few lines of code to check? I sure can't so here are a couple computations.

A direct recursive implementation in Mathematica

Clear[x]
x[0] = 0.0; x[1] = 1.0;
x[n_] := x[n] = x[n-1] + 
  (2 - Exp[x[n-1]]) (x[n-1] - x[n-2])/(Exp[x[n-1]] - Exp[x[n-2]]);
x[8] - Log[2]

(Out: 1.11022*10^-16 *)

Iterative implementation in python

from math import exp,log
x1,x2=0,1
for n in range(8):
  x1,x2 = x2,x2+((2-exp(x2))*(x2-x1))/(exp(x2)-exp(x1))
print x2-log(2)

# Out: 1.1102230246251565e-16

Looks promising!

Mark McClure
  • 30,510