Transcript MA3264_L7

MA3264 Mathematical Modelling
Lecture 7
Review Chapters 1-6
(including dynamical systems,
eigenvalues,cubic splines)
Discrete Dynamical Systems
Can be expressed recursively in the form
Initial State
x(0)  R
d
set of d x 1 matrices
same as column vectors
Dynamics
x(n  1)  M x(n)  v, n  0
d
where v  R
set of d x d matrices
d

d
and M  R
Discrete Dynamical Systems
Example 1 A Car Rental Company pages 35-38
On  number of cars in Orlando at end of day n
Tn  number of cars in Tampa at end of day n
On1  .6On  .3Tn Tn1  .4On  .7Tn
Linear Algebra Formulation
On 
0
.6 .3
x ( n)    , v    , M  

T
0
.
4
.
7



 n
Discrete Dynamical Systems
Example 2 The Battle of Trafalgar pages 38-41
Bn  number of British ships at stage n
Fn  number of French-Spanish ships at stage n
Bn1  Bn  0.1Fn Fn1  Fn  0.1Bn
Linear Algebra Formulation
Bn 
0
 1  0.1
x ( n)    , v    , M  

F
0

0
.
1
1



 n
Discrete Dynamical Systems
Example 3 Price Variation Problem 6 pages 49-50
Pn  price of product at year n
Qn  quantity of product at year n
Pn1  Pn  0.1(Qn  500 )
Qn1  Qn  0.2( Pn  100 )
Linear Algebra Formulation
 Pn 
 50 
 1  .1
x ( n)    , v    , M  

Q

20
.
2
1
 


 n
Discrete Dynamical Systems
Example 4 Fibonacci Sequence Problem 1 page 290
Fn 
n-th term of the Fibonacci sequence
F0  F1  1
Fn 2  Fn1  Fn , n  0
Linear Algebra Formulation
 Fn1 
0
1 1
x ( n)    , v    , M   
F
0
1
0

 
 n
Discrete Dynamical Systems
Example 5 Pollution in the Great Lakes pages 222-223
an 
bn 
pollution in Lake A after n years
pollution in Lake B after n years
an1  .35 an  .1bn
bn1  .65 an  .9bn
Linear Algebra Formulation
a n 
0
.35 .1
x ( n)    , v    , M  

b
0
.
65
.
9



 n
Discrete Dynamical Systems
Equilibrium is a vector
that satisfies
xR
d
x  M x v
We observe that
x(n)  x  M  x(n  1)  x , n  1
2
 x(n)  x  M  x(n  2)  x 
3
n
 M  x(n  3)  x     M  x(0)  x 
 x(n)  x  M
n
 x(0)  x 
This gives us a closed formula for the n-th term !
Discrete Dynamical Systems
Equilibria are clearly useful !
Therefore the following questions are important.
1. When do equilibria exist ?
Answer Iff
rank ( I  M ) v  rank ( I  M )
2. When do they exist and are unique ?
Answer Iff ( I  M ) is invertible  rank ( I  M )  d
3. When are they stable ? This means that x(n)
converges for every initial value x(0).
Answer Iff
 an eigenvalue M |  | 1
Linear algebra and eigenvalues are very important !
Eigenvalues
Consider the following linear algebra equation
Mv  v
where
d d
M R
  C is an eigenvalue
d
v  R , v  0 is an eigenvector
set of complex numbers,
please learn them !
with eigenvalue

Eigenvalues
Eigenvalues are clearly useful !
Therefore the following questions are important.
1. When is

an eigenvalue of a given matrix
v
M?
Answer Iff there exists a nonzero vector
or equivalently,
such that
Mv  v,
(I  M )v  0.
2. What conditions on any matrix A determine the
existence of a nonzero vector v such that Av  0 ?
Answer Iff the determinant of
This is expressed as
A vanishes.
det( A)  0.
Characteristic Polynomial
P of a square (d x d) matrix M is defined by
P( z )  det( zI  M ),
z  C.
Remark. P can and should be regarded as a function
P : C  C , defined by a monic degree d whose
roots are the eigenvalues of M .
characteristics Charakteristika {pl}; charakteristische Merkmale;
charakteristische Eigenschaften; Eigentümlichkeiten {pl}
The Man without Qualities (German original title: Der Mann ohne Eigenschaften) is
a novel in three books by the Austrian novelist and essayist Robert Musil.
One of the great novels of the 20th century, Musil's three-volume epic is now available in a highly
praised translation. It may look intimidating, but in fact the story of Ulrich, wealthy ex-soldier,
seducer and scientist, the 'man without qualities', proceeds in short, pithy chapters, each one
abounding in wit and intellectual energy. Lisa Jardine, the eminent historian, wrote of it: 'Musil's
hero is a scientist who finds his science inadequate to help him understand the irrational
and unpredictable world of pre-World War I Austria. The novel is perceptive and at times baroque
account of Ulrich's search for meaning and love in a society hurtling towards political catastrophe.'
Characteristic Polynomial
1
P( z )  z  a
Example 1 M  [a ]  R
Question What are the eigenvalues of M ?
a b 
2
Example 2 M  
R

c d 
z  a
P( z )  det 
 c
b 
2

z
 (a  d ) z  (ad  bc)

z  d
 z  tr (M ) z  det( M ).
2
2
2

 tr ( M )  (tr ( M ))  4 det( M ) 
 
 a  d  (a - d)  4bc 

eigenvalue s  

 

2
2




 


Characteristic Polynomial
symmetric
a b 
2
matrix
Example 3 M  
R

b d 
2
2

 a  d  (a - d)  4b
eigenvalue s  
2







cos  sin  
rotation
Example 4 M 
 sin  cos  
matrix


eigenvalue s   cos   i sin  , i   1
Question When are the eigenvalues in Ex. 3,4 real ?
y Diving Boards
x

Remark. A diving board of length L bends to minimize
Bending Energy


ds
0
 
L
d 2
ds
subject to the constraints at its ends. For small
deformations we use the approximation
s ( x)  
x
0
1
  dx  x,
dy 2
dx
d
ds
 y( x)
Cubic Spline Approximation
Therefore the shape of a diving board can be
approximately described by a function y = y(x),
for x in the interval [0,L], that minimizes
L
E    y  dx
2
0
subject to the constraints at its ends.
y (x)
y (L )
Theorem The condition above implies that
is a cubic polynomial. Furthermore, if
is unconstrained then
y ( L)  0. This is called a
natural, as opposed to a clamped, boundary condition.
Suggested Reading
Section 4.4 Cubic Spline Models pages 159-168.
Learn more about regression and its use in statistics
http://en.wikipedia.org/wiki/Regression_analysis
file:///C:/MATLAB6p5/help/techdoc/math_anal/datafu13.html#17217
Experiment with the web based least squares regression
http://www.scottsarra.org/math/courses/na/nc/polyRegression.html
http://www.statsdirect.com/help/regression_and_correlation/poly.htm
Tutorial 7 Due Week 13–17 Oct
Problem 1. For each of the five examples of discrete dynamical
systems discussed in these lectures, determine if (i) equilibria
exist, (ii) if they are unique, and (iii) are they stable. Prove your
answers by computing the appropriate quantities (ranks and
eigenvalues). Also write and run a computer program to compute
and plot each component of x(n) for n = 1,2,…,40 where you
choose a reasonable starting value x(0).
Problem 2. Compute the coefficients of the cubic polynomial
y(x) that give the shape of a diving board from these
constraints: y (0)  y (0)  0, y ( L)  d .
Problem 3. Write a program to generate the random numbers
y(k )  12  3.5k  2k 2  randn , k  1,2,...,10000
and use another program to fit a quadratic model to this data.
Explain the actual versus ‘expected’ sum of squared errors.