Mortgages and Seashells. 1. Iterating Linear Functions.

25
Mortgages and Seashells QuickTime™ and a TIFF (Uncompressed) decompressor are needed to see this picture. QuickTime™ and a TIFF (Uncompressed) decompressor are needed to see this picture.

Transcript of Mortgages and Seashells. 1. Iterating Linear Functions.

Page 1: Mortgages and Seashells. 1. Iterating Linear Functions.

Mortgages and Seashells

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Page 2: Mortgages and Seashells. 1. Iterating Linear Functions.

1. Iterating Linear Functions

Page 3: Mortgages and Seashells. 1. Iterating Linear Functions.
Page 4: Mortgages and Seashells. 1. Iterating Linear Functions.
Page 5: Mortgages and Seashells. 1. Iterating Linear Functions.
Page 6: Mortgages and Seashells. 1. Iterating Linear Functions.

If you have an account that has a current balance of $x and you make

payments of $P per month and the bank uses an interest rate of r%

per month, in one month your account will be worth $f(x) where

f(x) = (1 + r )x + P

Note that if

• x < 0 and P > 0, your account is a loan/mortgage

• x > 0 and P > 0, your account is an annuity

A Useful Linear Function

Page 7: Mortgages and Seashells. 1. Iterating Linear Functions.

If your initial balance is $B[0] and you are investing in an

account that pays r% interest per interest period and you

make payments of $P per interest period then your balance B[n]

in the n - th time period is given by

B[n] = (1+ r)n (B[0] + P

r ) −

P

r

A General Financial Formula

Page 8: Mortgages and Seashells. 1. Iterating Linear Functions.

Suppose you borrowed $10,000 from a bank that charged .05% interest per month and would like to make payments of $500 per month. How long would it take to pay off the loan?

An Application

Page 9: Mortgages and Seashells. 1. Iterating Linear Functions.

-10000, B(n) = 0

Page 10: Mortgages and Seashells. 1. Iterating Linear Functions.

2. Iterating Geometric Transformations

Page 11: Mortgages and Seashells. 1. Iterating Linear Functions.

Rotate thru -90

Page 12: Mortgages and Seashells. 1. Iterating Linear Functions.

Dilate about the origin by a factor of .618

Page 13: Mortgages and Seashells. 1. Iterating Linear Functions.

Translate over 1, up 1

Page 14: Mortgages and Seashells. 1. Iterating Linear Functions.

Rotate thru -90

Page 15: Mortgages and Seashells. 1. Iterating Linear Functions.

Dilate about the origin by a factor of .618

Page 16: Mortgages and Seashells. 1. Iterating Linear Functions.

Translate over 1, up 1

Page 17: Mortgages and Seashells. 1. Iterating Linear Functions.

The Golden Spiral

Page 18: Mortgages and Seashells. 1. Iterating Linear Functions.

Golden Spiral?

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Page 19: Mortgages and Seashells. 1. Iterating Linear Functions.

3. Iterating Complex Linear Functions

In general if you iterate f(z) = αz + β there will be a fixed point at

φ = β

1-α • φ is Attracting if |α | <1

• φ is Repelling if |α | <1

Expressing f(z) in Fixed Point you get f(z) = α ( z - φ) + φ and

as shown earlier

f [n](z) =α n ( z - φ) + φ

Page 20: Mortgages and Seashells. 1. Iterating Linear Functions.

Iterating f(Z) = α ( Z - F ) + F where Zn = f( Zn -1)

Page 21: Mortgages and Seashells. 1. Iterating Linear Functions.

3. Complex Linear Functions

Let α = [r1 ; θ1] and β = [r2 ; θ2] then αβ = [r1 r2 ; θ1 +θ2]

If z = x + yi then the complex linear function

• f(z) = αz will rotate z about the origin thru an angle

of θ1 and dilate it by a factor of r1.

• f(z) = z + a +bi will slide z over a units horizontally

and b units vertically.

• f(z) = αz + a +bi will rotate z about the origin thru an angle

of θ1 and dilate it by a factor of r1 and then slide the result over a units

horizontally and b units vertically.

Page 22: Mortgages and Seashells. 1. Iterating Linear Functions.

The Golden Rectangle Function

The complex linear function f(z) = -i

ϕ

⎝ ⎜

⎠ ⎟z + 1 + i will rotate z

about the origin, dilate z by a factor of 1

ϕ and slide the result

over 1 and up 1 where ϕ is the Golden Ratio.

Page 23: Mortgages and Seashells. 1. Iterating Linear Functions.

Expressed in "point - slope form" f(z) = -i

ϕ

⎝ ⎜

⎠ ⎟z + 1 + i becomes

f(z) = -i

ϕ

⎝ ⎜

⎠ ⎟( z - δ ) + δ

where δ = 1+ i

1+i

ϕ

The n - th iterate of f(z) is

f [n](z) =-i

ϕ

⎝ ⎜

⎠ ⎟

n

( z - δ ) + δ

Page 24: Mortgages and Seashells. 1. Iterating Linear Functions.

Putting DeMoivre’s Theorem to Work

To get the Golden Spiral function g(x), let z = 0

and δ = 1.17082 + 0.276393 i€

f [x ](z) =1

ϕ

⎝ ⎜

⎠ ⎟

x

[cos(−90x) + sin(−90x)i](z − δ) + δ

where x is a real number.

Page 25: Mortgages and Seashells. 1. Iterating Linear Functions.

g(x) = 2

1+ 5

⎝ ⎜

⎠ ⎟x

[cos(−90x) + sin(−90x)i]( −1.17082 - 0.276393 i) + 1.17082 + 0.276393 i

Problem: This gives complex numbers as a function of areal variable. How do you plot g(x)?

Need to plot ( real[g(x)] , imaginary[g(x) ) for x = 0 to 20

Mathematica to the rescue!