Documente Academic
Documente Profesional
Documente Cultură
http://ebooks.cambridge.org/
Chapter
12 - Sequences of Real Numbers pp. 146-163
Chapter DOI: http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge University Press
12
Sequences of Real Numbers
146
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:42:58 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
147
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:42:59 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
148
a ;);
b ');
c 0;
d ') ;
xO=input('Type xO ' ) ;
n=input('Type the number of times to be iterated ' ) ;
x=[xO];
for j=l:n
if x(j)==Inf I x(j)==-Inf
x(j+l)=a/c;
else
x(j+l) = (a*x(j)+b)/(c*x(j)+d);
end
end;
bar(x)
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:42:59 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
149
Figure 12.1 shows two examples of cobweb diagrams, one in fact for a
Mobius sequence and one for a quadratic sequence (these are discussed
in Project B below). Possibly the second one gives more of an idea of
why the name 'cobweb' is used!
Mobius sequence cobwebs
The M-file cobm.m plots cobweb diagrams for Mobius sequences, which
use the function f{x) (ax + b)/(cx + d). It requires input of a, 6, c, d, xo
and the upper and lower limits of x and y on the diagram. Iteration is
done 30 times, or until it seems that convergence is certain. The sequence
of values of x is printed out at the end.
Note that, when there is a vertical asymptote to the graph of the
function / , this will be replaced by a vertical line joining two points of
the graph. Here are some suitable values:
1 In Example (i) above, lower limits of x and y equal to 3 and
upper limits of x and y equal to 3, x0 = 2 or 2. If you want to
see the action in close-up then you could take say 1.3 < x < 1.5
and the same for y.
2 In Example (ii) above, lower limits of x and y equal to 10 and
upper limits of x and y equal to 10, x0 = 2.
3 In Example (iii) above, lower limits of x and y equal to 5 and
upper limits of x and y equal to 5, XQ = 3.
It is fairly clear in each case what is happening.
The points where the graph of / meets the line y x arefixedpoints
of the function ?/, that is, writing y = f{x), they satisfy f(x) = x. It is
these points, if any, which are limits of the sequence.
axn + b
c#n + a
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:42:59 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
150
2
1.8
1.6
1.4
1.2
0.8
0.6
n
z/
0.4
0.6
0.8
1.2
1.4
1.6
1.8
0.9
0.85
0.8
0.75
/
-
0.7
0.65
0.6
0.55
0.5
0.45
0.4
0.4
0.45
0.5
0.55
0.6
0.65
0.7
0.75
0.8
0.85
0.9
Fig. 12.1. Two cobweb diagrams, the upper one corresponding to a Mobius
sequence and the lower one to a quadratic sequence.
In other words,
if A
w1
then xn+i = .
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:42:59 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
151
if A*
)= [
1 J
then xk = .
\ w2 J
w2
Example 1
Let
Example 2
If you type
format long
A=[l 2; 1 1 ] ;
v=[2 1 ] ' ;
then you should get the answer 1.41421356237310, which is the same
answer as you get by typing s q r t ( 2 ) . By (ii) of the Theorem 1, the
number obtained is x2o when xo = 2.
The proof of Theorem 1 is straightforward: (i) is proved by multiplying
out the two sides and taking a cxn+d. Then (ii) is proved by induction
on k. The case k = 1 is just (i) with n = 0. Assuming (ii) for /c, we
proceed as follows:
The first = uses the induction hypothesis, the second = uses the fact
that /3 is just a number and the third = uses (i) with n replaced by k.
This completes the proof of (ii) by induction.
IiAk is a scalar matrixthat is, of the form A/, where / is the identity
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:42:59 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
152
2 x 2 matrixthen we have
x
o \ _ \ f xo
i J"H i
so that by (ii) of the theorem Xk x 0 , i.e. the values of the Mobius
sequence have recycled back to x$. So periodic sequences can be detected
by calculating powers of the corresponding matrix.
We can also work 'backwards': for example, let us work out the starting value XQ which, for the sequence
Xn+1 =
^TT
gives XQ = 2. Note that when XQ is chosen in this way, the next term
x7 will be 'infinite', since the denominator xQ + 2 vanishes. We want
0\
1 )
{ 1 )
{ 12649
where you can verify the last equality by typing A" (-6)* [-2 1] ' having first input the matrix
(You may find that -22658 actually appears as something like 22657.999
of course!) Thus x0 = -22658/12649 = -1.7913. If you use mobiusl .m
to find 7 for this sequence (input Xo in the above fractional form) you
will find that it gives a very large value. Nevertheless x$ is given correctly as 3.
There is a highly significant fact about the direction of the vector
w = Akv for large values of k. Going back to the matrix A of Example
2 above, try typing
[X D]=eig(A)
You will find that one of the eigenvectors of A is parallel to the vector
w obtained in Example 2. For example, you can type
y=xl./w
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:42:59 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
153
to pull out the first eigenvector of A and then compare it with w in direction. The two entries in the vector y should be approximately the same.
Note that the eigenvector used here is in fact the one corresponding to
the larger eigenvalue.
With matrices we can equally well consider 3 x 3 , but note that this
does not have an obvious analogue in terms of sequences. Try
A=[l
3;-l
-3;1
-2
-3]
and (almost) any starting vector v. This matrix has one real eigenvector,
(-0.5433,0.2849,0.7897), as you can discover by typing [X,D] = eig(A).
This has the same direction as Anw for large values of n.
N o t e on two M-files
It can happen that powers of a matrix A have entries which become very
large indeed, and working out Anw for a large n can be hazardous. There
are two M-files available which overcome this problem when we only
want to know the direction of Anv. They work out Av, A 2 v, A 3 v , . . .
but after each step rescale the answer to be a unit vector. They are
called matit2.m for 2 x 2 matrices and matit3.m for 3 x 3 matrices.
Both require previous input of the matrix A but not of the vector v.
Look at them if you are curious.
For those who like to know the theory, we have the following.
T h e o r e m 2 / / Anv does have a limiting direction, then this limit must
be an eigenvector of the matrix A.
P r o o f If we suppose A n v/||A n v|| > w for some w ^ 0 as n oo, then
A(Anv/\\Anv\\)
-> Aw, so
A n + 1 v ||A w+1 v||
P n + l | | - p n | | -*
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:00 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
154
2
3
3
1
1
1
2
2
3
1
4
1
_2
-V3
V3
-2
3
2
1
1
v^
-1
v^
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:00 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
155
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:00 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
156
x n+ i P
'cP + d\ f xn - as
\ca + d) \xn - P
(ad bc)(xn a)
(cxn + d) (ca + d ) '
xn a
xn-/3
(cP + d\n
\ca +
(XQ-
(ix) Show that f'(a) = (cP + d)/(ca + d), and /'(/?) = (ca + d)/{c
Hint: It is easy to check that f'(x) (ad be) j(ex + d)2. Remembering
that a and /? are the roots of ex2 (a d)x b = 0, deduce that
(ca -h d)(cp + d) = ad- be.
(x) Deduce that if | f(ot) \< 1, then xn > a as n > CXD.
(xi) Show that if (a a1)2 + 46c < 0, then the fixed points are not real.
Why does this imply that the sequence {xn} cannot have a limit?
B Attracting cycles
Aims of the project
This project is about sequences formed by iteration of a quadratic (degree 2) function. These sequences do not generally have a unique limit,
but have 'many limits' in the sense that successive values of the sequence
come close to a collection of different numbers. We shall investigate these
'attracting cycles' both mathematically and experimentally. More details of the mathematics involved here can be found in [2]. There is
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:00 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
157
r (i) = \
(1")
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:00 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
158
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:01 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
1.5
2.5
3.5
159
Fig. 12.2. The 'period doubling' diagram. For each value of A on the horizontal
axis, the points above it are the values of x in the resulting attracting cycle.
So from A around 3.5 there are longer and longer attracting cycles.
that, for 0 < ^o < 1> the resulting sequence is convergent. What is the
limit this time? Confirm your assertion by means of some examples,
using the M-files.
(vii) The M-file perdoub.m (for 'period doubling'!) takes 100 values
of A between two chosen limits 11 and 12. For each one the numbers
sci,... ,#ioo a r e calculated (with XQ = | ) and just the terms from the
75th on are plotted on the vertical line above the value A. So the picture
has axes A, x, where 11 < A < 12 and 0 < x < 1. Figure 12.2 shows the
picture for 1 < / < 4.
Try running it for say 11 = 0,12 = 2. How does the resulting picture
confirm what is shown in (vi) above?
Try running it for 11 2,12 3.5. What do you observe?
(viii) (Optional extra) Between A = 3.9 and A = 4 there are several
more attracting cycles. Find some of them, using the M-files to the best
advantage that you can. (It is possible to be reasonably systematic in
this.)
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:01 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
160
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:01 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
161
x0
xl
xu
2.5
3.2
3.4
3.5
3.8
3.83
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.4
0.4
0.3
0
0
0.7
0.9
0.9
0.9
1
1
yi
0.5
0.4
0.4
0.3
0
0
yu
0.7 20
0.9 20
0.9 40
0.9 20
1 50
1 20
=
=
=
=
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:01 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
162
xi/x = e\n(x)/x a n d s h o w t h a t t h e
derivative of x^
is
Hint: Use
l x
x l (l-\n(x))/x2.
What is the largest value which this y takes? (Answer this question
by using calculus to find the maximum of y.) How does this relate to
the behaviour of the exponential sequence?
Fixed points
A fixed point of a function / is a value of x such that f(x) = x. Consider
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:01 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016
163
Cambridge
Books Online Cambridge University Press, 2010
Downloaded from Cambridge Books Online by IP 81.180.218.225 on Fri Apr 22 09:43:02 BST 2016.
http://dx.doi.org/10.1017/CBO9780511624117.013
Cambridge Books Online Cambridge University Press, 2016