You are on page 1of 17

MARKOV

PART 1
1.
p1 =
0.3700
0.6300
p2 =
0.3460
0.6540
p3 =
0.3268
0.6732
p4 =
0.3114
0.6886
p5 =
0.2992
0.7008
2.
14960 - x
35040 - y
3.
A^5*p0=
0.2992
0.7008
they are the same as in the first questin

4. the population doesnt change


5. [0.25,0.75] = steady state vector
ans =
0.3700
0.6300
6. It will reach a steady state because as K increases the values
gt increasingly close to the steady state vector
7. My guess was right. I am not surprised.
PART 2
1.
p3 =
0.4770
0.2520
0.2710
p5 =
0.5329
0.2400
0.2271
p7 =
0.5500
0.2331
0.2169
p10 =
0.5562
0.2302
0.2137

p15 =
0.5573
0.2295
0.2131

p20 =
0.5574
0.2295
0.2131
They approach
0.5574
0.2295
0.2131
2.
p3 =
0.6300
0.1910
0.1790
p5 =
0.5791
0.2180
0.2029
p7 =
0.5639
0.2261
0.2100
p10 =
0.5584

0.2289
0.2126
p15 =
0.5574
0.2295
0.2131
p20 =
0.5574
0.2295
0.2131
3. In the long term they will reach the same probabilities, aka the
steady state vector
4. p = [-.26154/sqrt(8); -1.0769/sqrt(8)]
a. there is singularity
b.
1.0000
0
0
0.5574
0
1.0000
0
0.2295
0
0
1.0000
0.2131
5.
The limiting matrix is:
0.5574
0.2295
0.2131
the limiting matrix will always be the same for any p0
6.
Location 1-557
Location 2-230
Location 3-213
PART 3
1.
It switches every other

2.
Everyone who begins at 1, switches to 2 and vice versa
3.
There is a steady state, it is [.5;.5]
4.
Everyone switches but there is the same amount of population
5.
It doesnt contradict because it has 0 values
PART 4
1. set k = inf and solve for pk=(A^k)p0
2. pk=(A^k)p0. The side condition is that there are no zero
values. it reaches equilibrium.
3. zero values exist

QR LS
1.
v, x, and z are mutually orthogonal
2.
you can only have 3 linearly independent vectors in R3, and for
any Rn you can have a max of n linearly ind vectors
3.
W=
0.8321

0.2691

0.4851

-0.5547

0.4036

0.7276

0.8745

-0.4851

4.
WTW=

1.0001

-0.0018

0.0001

-0.0018

0.9989

-0.0011

0.0001

-0.0011

1.0000

it is an orthogonal matrix
5.
Norms of b and Wb are equal, as are dot products. It preserves
the length.
6.
W^-1 is the transpose of W.
7.
vprojw =
2.2542
0.3220
-0.9661
v=vprojw+vperpw
8.
ans=
1.0545
0.1860
0.8974
9.
v1=
0.7071
0.7071

0
v2=
0.3015
-0.3015
0.9045
10.
Q multiplied by its transpose will give you the identity matrix
11.
A=[0 1 0;1 1 -1;0 -1 1]
A=
0

-1

-1

[Q,R]=qr(A,0)
Q=
0

0.7071

1.0000

0.7071
0

0 -0.70710.7071
R=
-1.0000 -1.0000
0

1.4142 -0.7071

0.7071

Simple Harmonic 1
1. a)

1.0000

They are opposite of each other and add up to 0. This


relationship remains unaffected by initial value.
b)
There is no damping term, thus the equation is x+x=0
c)
if they were not = to 1, it would mess things up. They wont add
up to zero

2. a)
The velocity graph is the derivative of the position graph. The
relationship is also a trigonometric sine cosine relationship.
b)
It is easiest to stop at +/-1 since makes velocity is highest when
position is closest to 0
c)
the direction of the force
3.
Its harmonic. It holds in the same pattern throughtout.
4.
>> dsolve('2*D2y+3*Dy-4*y=0')
ans =
C1*exp(1/4*(-3+41^(1/2))*t)+C2*exp((-3/4-1/4*41^(1/2))*t)

>> dsolve('2*D2y+3*Dy-4*y=0','y(0)=1','Dy(0)=0')
ans =

(1/2+3/82*41^(1/2))*exp(1/4*(-3+41^(1/2))*t)+(3/82*41^(1/2)+1/2)*exp(-1/4*(3+41^(1/2))*t)

>> dsolve('m*D2y+c*Dy+k*y=0')
ans =
C1*exp(-1/2*(c-(c^2-4*k*m)^(1/2))/m*t)+C2*exp(-1/2*(c+(c^24*k*m)^(1/2))/m*t)
5.
w=sqrt(k/m)
6.
C1 sin(t) + C2 cos(t)
7.
>> dsolve('m*D2y+c*Dy+k*y=0')

ans =

C1*exp(-1/2*(c-(c^2-4*k*m)^(1/2))/m*t)+C2*exp(-1/2*(c+(c^24*k*m)^(1/2))/m*t)
pretty (ans)
2

1/2

(c - (c - 4 k m) ) t
C1 exp(- 1/2 -----------------------)
m
2

1/2

(c + (c - 4 k m) ) t

+ C2 exp(- 1/2 -----------------------)


m

8a. critical dampening

8b. Increasee

8c. Increases

9a.
q1: Positive, decreasing velocity, then negative, increasing
toward zero. Rebounds. compression.
Q2 high starting velocity, decreases toward zero. strech
Q3: negative, becomes positive, then decreases toward zero.
Rebounds. Stretches.
Q4: minus velocity, increases toward zero. Compression
SIMPLE HARM 2
1.
undamped is the sum of two trigonometric functions, so as t
goes to infinity, it wont go to 0.
2.
x+w0 ^2*x=Acos(w0t)
x+w0 ^2*x=0
Asin(w0t)=Bsin(w0t)=0
3.

wf=w0
x+w0^2*x=Acos(wft)
4.
xp(t)=(A/(w0^2-wf^2))*cos(wft)
5.
x(t) = c1*cos(wt) + c2*sin(wt) + A/(wo^2 - wf^2)*(cos(wft))
6.
x(t) = A/(wo^2 - wf^2)*(cos(wft) - cos(wot))7.
>>ezplot('-1*(cos(12*t)-cos(11*t))')
8.
xp(t)=(A/(w0^2-wf^2))*(-sin((wft-w0t)/2)*sin((wft+w0t)/2)
9.
>> ezplot('23/(11^2 - 12^2)*(cos(12*t)-cos(11*t))','t')
>> ezplot('2*sin(1/2*t)','t')
>> ezplot('-2*sin(1/2*t)','t')
SIR
1.
S would start off increasing. Eventually it would level off
2.
I would increase then go down.
3.
R will always increase since they cannot revert back
4.
check

5.
I was right. They acted as I predicted
6.
Everybody will get the disease and then get better and the number susceptible
will eventually be no one

7.
As S decreases, I increases and eventually decreases.
8.
It does not, trend is the same either way.
9.

Yes, it is confirmed
10.
a.
will increase per unit time
b.

will decrease per unit time


c.
indefinite increase or decrease
11.
I was right
12.

13.
Prey varies the most
14.
F increases, S decrease
15.
F goes up S goes down. F peaks and decreases, S peaks and
decreases. Repeat.
16.
(60,40)

17. nullclines are (0,0) (60,40)


18. they match
19. (60,34)
this is what the graph looks like

20.
spirals and collapses into (60,34)
21.
This is due to the fact that the population of prey peaks first
22.
It intended to decrease prey which it did

23.

24.

25.
It changes the equilibrium point.
26. population change is dependent on both populations
27.