Solving x = a x + b

Problem: Solving x = ax +b for x.

Solution:

Choose x_0 arbitrarily, we generate the sequence \{x_i\} recursively from x_i = a x_{i-1} + b, i=1, 2, ...:

x_1= a x_0 + b,

x_2 = a x_1 +b =a(a x_0+b)+b =a^2 x_0 +ab + b,

x_3 = a x_2 + b = a (a^2 x_0 + ab +b) +b = a^3 x_0 +a^2b +ab +b,

\ddots

x_n = a x_{n-1} +b = a^n x_0 + b \sum\limits_{i=0}^{n-1} a^i=a^n x_0 + b\cdot\frac{1-a^{n}}{1-a}.

It follows that for |a| <1,

x = \lim\limits_{n \rightarrow \infty} x_n = \lim\limits_{n\rightarrow \infty}a^n x_0+\frac{b(1-a^n)}{1-a}= \lim\limits_{n\rightarrow \infty}a^n x_0+ \lim\limits_{n \rightarrow \infty}\frac{b(1-a^n)}{1-a}\overset{(\star)}{=}0\cdot x_0 + \frac{b(1-0)}{1-a}.

i.e.,

x = \frac{b}{1-a}.

Fig. 1 shows a CAS -aided solution using Omega CAS Explorer:

Fig. 1

For |a|> 1, we rewrite x=ax +b as

x = \frac{1}{a}x - \frac{b}{a} \overset{A=\frac{1}{a}, B=-\frac{b}{a}}{=} Ax +B.

Since |a| >1 \implies \frac{1}{|a|} = |A| <1\implies \lim\limits_{n\rightarrow \infty}A^n = 0,

x =\lim\limits_{n \rightarrow \infty}A^n x_0 + B\cdot \frac{1-A^n}{1-A}\frac{}{} = \frac{B}{1-A} = \frac{-\frac{b}{a}}{1-\frac{1}{a}} = \frac{-b}{a-1} = \frac{b}{1-a}.


We have used fact that

|a| < 1 \implies \lim\limits_{n \rightarrow \infty} a^n = 0.\quad\quad\quad(\star)

A proof is as follows:

Since

|a^n| = |\underbrace{a\cdot a\cdot a ... a}_{n\;a's}| =\overbrace{|a||a|...|a|}^{n\;|a|'s} = |a|^n,

if a=0 then a^n = 0\cdot 0 ... 0 = 0. It means

(\forall \epsilon >0,  \forall n \in N^+, |a^n-0|<\epsilon)\implies \lim\limits_{n \rightarrow \infty} a^n = 0.

Otherwise (a \ne 0),

\forall \epsilon >0, |a^n-0| =|a|^n < \epsilon \implies n \log(|a|)<\log(\epsilon).

For |a|<1,

n\log(|a|)<\log(\epsilon) \overset{\log(|a|) < 0}{\implies} n > \frac{\log(\epsilon)}{\log(|a|)}.

And so,

(\forall \epsilon > 0, \exists n^* =  \lceil\frac{\log(\epsilon)}{\log(|a|)}\rceil \ni  n > n^*, |a^n-0| < \epsilon) \implies \lim\limits_{n \rightarrow \infty}a^n = 0.


Exercise-1 Prove by mathematical induction:

(x_{k} = a x_{k-1} + b, k=1,2,...,n ) \implies x_n = a^n x_0 + b\sum\limits_{i=0}^{n-1}a^i.

Advertisement

“Instrumental Flying”

Consider the following set

S_1 = \{(x,y) | x=\frac{e^y-e^{-y}}{2}\}.\quad\quad\quad(1-1)

For all (x, y_1), (x, y_2) \in S_1, we have

\frac{e^{y_1}-e^{-y_1}}{2}=x, \frac{e^{y_2}-e^{-y_2}}{2}=x.

That is,

(x, y_1), (x, y_2) \in S_1 \implies \frac{e^{y_1}-e^{-y_1}}{2}- \frac{e^{y_2}-e^{-y_2}}{2}= 0.\quad\quad\quad(1-2)

Since \frac{e^{y_1}-e^{-y_1}}{2}- \frac{e^{y_2}-e^{-y_2}}{2}= 0 if and only if y_1 = y_2 (Exercise-1),

\frac{e^{y_1}-e^{-y_1}}{2}-\frac{e^{y_2}-e^{-y_2}}{2}=0 \implies y_1 = y_2.\quad\quad\quad(1-3)

From (1-2) and (1-3), we conclude:

\forall (x, y_1), (x, y_2) \in S_1 \implies y_1 = y_2.

i.e., S_1 defines a function.

Alternatively, (1-1) can be expressed as

S_1 = \{(x, y) | x = \sinh(y)\}.

It shows that S_1 is the inverse of \sinh(x). Therefore, we name the function defined by (1-1) \sinh^{-1} and write it as

y = \sinh^{-1}(x).


Let’s look at another set:

S_2 = \{(x,y)|x=\frac{e^y+e^{-y}}{2}\}.\quad\quad\quad(2-1)

For a pair (x, y_1>0) \in S_2, we have

x=\frac{e^{y_1}+e^{-y_1}}{2}.\quad\quad\quad(2-2)

For another pair (x, y_2=-y_1),

\frac{e^{y_2} + e^{-y_2}}{2} = \frac{e^{-y_1}+e^{-(-y_1)}}{2} = \frac{e^{-y_1} + e^{y_1}}{2} \overset{(2-2)}{=} x\implies (x, y_2=-y_1) \in S_2.

Since y_1>0, y_2 = -y_1 \neq y_1, (x, y_1), (x, y_2) \in S_1 does not implie y_1 = y_2. It means S_2 does not define a function.

However, modification of S_2 gives

S_3 = \{(x, y) | x=\frac{e^y+e^{-y}}{2}, y \ge 0\}.\quad\quad\quad(2-3)

It defines a function.

Rewrite (2-3) as

S_3 = \{(x, y) | x = \cosh(y), y \ge 0\}.\quad\quad\quad(2-4)

Then \forall (x, y_1), (x, y_2) \in S_3, we have

x=\cosh(y_1), x=\cosh(y_2)\implies \cosh(y_1) = \cosh(y_2).\quad\quad\quad(2-5)

Notice that by (2-3), y_1, y_2 \ge 0.

Cleary, (2-5) is true if and only if y_1 =y_2. For if y_1 \ne y_2, by (\star), \cosh(y_1) \ne \cosh(y_2).

Therefore,

(x, y_1), (x, y_2) \in S_3 \implies y_1 = y_2.

We name the function defined by (2-3) \cosh^{-1} as (2-4) shows that it is the inverse of \cosh(x).

See “Deriving Two Inverse Functions” for the explicit expressions of \sinh^{-1} and \cosh^{-1}.


Prove

t_1 \ge 0, t_2 \ge 0, t_1 \ne t_2 \implies \cosh(t_1) \ne \cosh(t_2).\quad\quad\quad(\star)

Without loss of generality, we assume that t_2 > t_1. By Lagrange’s mean-value theorem (see “A Sprint to FTC“),

\cosh(t_2) -\cos(t_1) =\cosh'(\xi) (t_2-t_1)

where \xi \in (t_1, t_2).

We have

t_2 > t_1 \implies t_2 - t_1 >0

and

\forall t > 0, (\cosh(t))' = (\frac{e^t+e^{-t}}{2})' = \frac{e^t-e^{-t}}{2}  \overset{t>0\implies t >-t \implies e^t  >e^{-t}}{>} 0.

Consequently,

\cosh(t_2) - \cosh(t_1) = \cosh'(\xi) (t_2-t_1) > 0.

i.e.,

\cosh(t_2) \ne \cosh(t_1).


Exercise-1 Show that \frac{e^{y_1}-e^{-y_1}}{2}- \frac{e^{y_2}-e^{-y_2}}{2}= 0 if and only if y_1 = y_2.