-1

I have the sequence $\mathbf{x_n = x_{n-1}(1.1) + 100}$ with $\mathbf{x_0 = 100}$. How can I calculate $\mathbf{x_n}$ as an explicit function of $\mathbf{n}$?

RobPratt
  • 50,938
Notwen
  • 119
  • 1
  • 9

2 Answers2

0

The solution proffered in the comments is a very nice ad hoc solution, but you might be better off learning a method to handle any problem of the sort

$$ x_n=ax_{n-1}+b $$

The trick is to eliminate $b$ as follows: subtract $x_{n-1}=ax_{n-2}+b$ to obtain

$$ x_n=(a+1)x_{n-1}-ax_{n-2} $$

which you probably already know how to solve. Using the method previously described here, I find that the characteristic roots are

$$ \alpha,\beta=\frac{a+1\pm\sqrt{(a+1)^2-4a}}{2}=a,1 $$

and the complete solution is given by

$$ x_n=\frac{(x_1-x_0\beta)\alpha^n-(x_1-x_0\alpha)\beta^n}{\alpha-\beta} $$

where $x1=ax_0+b$. This solution is valid for arbitrary real and complex $a,b$.

Cye Waldman
  • 8,196
0

Here's how I like to solve this kind of recurrence. This converts the recurrence to a telescoping sum which is easily evaluated. This generalizes quite nicely, which I will leave to you.

If $x_n=ax_{n-1}+b $ then, dividing by $a^n$, $\dfrac{x_n}{a^n} =\dfrac{ax_{n-1}}{a^n}+\dfrac{b}{a^n} =\dfrac{x_{n-1}}{a^{n-1}}+\dfrac{b}{a^n} $.

Letting $y_n =\dfrac{x_n}{a^n} $, this is $y_n =y_{n-1}+\dfrac{b}{a^n} $ or $y_n-y_{n-1} =\dfrac{b}{a^n} $.

Summing from $1$ to $m$, this is $\sum_{n=1}^m(y_n-y_{n-1}) =\sum_{n=1}^m\dfrac{b}{a^n} $.

The left side is, since it telescopes, $y_m-y_0$. (If you want to start at $y_1$, make the sum start at $2$.)

The right side is a geometric series (unless $a=1$) so it is

$\begin{array}\\ \sum_{n=1}^m\dfrac{b}{a^n} &=\dfrac{b}{a}\sum_{n=1}^m(1/a)^{n-1}\\ &=\dfrac{b}{a}\sum_{n=0}^{m-1}(1/a)^{n}\\ &=\dfrac{b}{a}\dfrac{1-1/a^{m}}{1-1/a}\\ &=b\dfrac{1-1/a^{m}}{a-1}\\ &=\dfrac{b}{a-1}-\dfrac{b}{a^m(a-1)} \end{array} $

Since $y_m-y_0 =\dfrac{x_m}{a^m}-x_0 $,

$\dfrac{x_m}{a^m}-x_0 =\dfrac{b}{a-1}-\dfrac{b}{a^m(a-1)} $ or $x_m =a^m(x_0+\dfrac{b}{a-1})-\dfrac{b}{a-1} $.

If $a=1$ then $y_n=x_n$ so $x_m-x_0 =\sum_{n=1}^m\dfrac{b}{a^n} =mb $ so $x_m =x_0+mb $.

marty cohen
  • 110,450