Math 307 Spring, 2005 Hentzel Time: 10:00 to 10:50 MWF Room: 205 Carver Hall Instructor: Irvin Roy Hentzel Office 432 Carver Phone 515-294-8141 E-mail: hentzel@iastate.edu Assignment: Three people work to gether to build themselves three houses. Here is a table showing how much time each worked on his own house and the other persons houses. Thus A worked 70% of the time on his own house, and 20% of the time on B, and only 10% of the time on C. A B C A .7 .1 .1 B .2 .8 .2 C .1 .1 .7 Who got the better deal? How much better. You are asked to suggest how to even things out. RowReduce[1/10{{7,1,1},{2,8,2},{1,1,7}}-IdentityMatrix[3]]; March 25 4.8 and 4.9 Differential Equations and Markov Chains Previous Assignment: Using Exercise 34 on page 262 (a) construct the change of basis matrix P where BC 2 3 4 5 6 B = {1, Cos[t],Cos [t],Cos [t],Cos [t],Cos [t],Cos [t]} C = {1, Cos[t],Cos[2t],Cos[3t],Cos[4t],Cos[5t],Cos[6t]} (b) Now integrate 3 4 5 6 INT 5 Cos [t] - 6 Cos [t] + 5 Cos [t] - 12 Cos [t] dt 2 Cos[2t] = 2 Cos [t]-1 3 Cos[3t] = 4 Cos [t] - 3 Cos[t] 4 2 Cos[4t] = 8 Cos [t] - 8 Cos [t] + 1 5 3 Cos[5t] = + 16 Cos [t] - 20 Cos [t] + 5 cos[t] 6 4 2 Cos[6t] = 32 Cos [t] - 48 Cos [t]+18 Cos [t] - 1 Find the change of basis matrix which converts {1, Cos[t], Cos[2t], Cos[3t], Cos[4t], Cos[5t], Cos[6t]} = <------------------------------B-----------------------> | 1 0 -1 0 1 0 -1 | 2 3 4 5 6 | 0 1 0 -3 0 5 0 | {1, Cos[t], Cos [t], Cos [t],Cos [t],Cos [t], Cos [t]} | 0 0 2 0 -8 0 18 | <---------------------------C------------------------> | 0 0 0 4 0 -20 0 | | 0 0 0 0 8 0 -48 | | 0 0 0 0 0 16 0 | | 0 0 0 0 0 0 32 | |32, 0, 16, 0, 12, 0, 10| P | 0, 32, 0, 24, 0, 20, 0| CB | 0, 0, 16, 0, 16, 0, 15| P = 1/32| 0, 0, 0, 8, 0, 10, 0| BC | 0, 0, 0, 0, 4, 0, 6| | 0, 0, 0, 0, 0, 2, 0| | 0, 0, 0, 0, 0, 0, 1| --------------------------------------------------------------------------- (b) Now integrate 3 4 5 6 INT 5 Cos [t] - 6 Cos [t] + 5 Cos [t] - 12 Cos [t] dt | 0 | | -96 | | 0 | | 110 | P | 0 | 1/16 |-138 | BC | 5 | = | 45 | | -6 | | -48 | | 5 | | 5 | |-12 | | -6 | 1/16 INT -96+ 110Cos[t]-138 Cos[2t]+45 Cos[3t]-48 Cos[4t] +5 Cos[5t] -6 Cos[6t] dx 1/16(-96t+110 Sin[t] -138/2 Sin[2t]+45/3 Sin[3t]-48/4 Sin[4t]+5/5 Sin[5t]-6/6 Sin[6t]) 1/16(-96t+110 Sin[t] - 69 Sin[2t] + 15 Sin[3t] -12 Sin[4t] + Sin[5t] - Sin[6t]) ==================================================================== Solve: x' = -2x -4y -4z y' = 2x +4y +2z z' = x +y +3z / | x | | -2 -4 -4 | | x | | y | = | 2 4 2 | | y | | z | | 1 1 3 | | z | We have X' = AX Change the basis X = PY (PY)' = A P Y P Y' = A P Y -1 Y' = P A P Y -1 | r1 o o| Choose P such that P A P is | o r2 o| | o o r3| The new equation is u' = r1 u u = C1 e^r1t v' = r2 v v = C2 e^r2t w' = r3 w w = C3 e^r3t | C1 e^(r1t) | X = P Y = P | C2 e^(r2t) | | C3 e^(r3t) | |-4 -1 -1 | P = | 2 0 1 | | 1 1 0 | -1 | -1 -1 -1 | P = | 1 1 2 | | 2 3 2 | -------------------------------------------------------- Solve: x' = -2x -4y -4z y' = 2x +4y +2z z' = x +y +3z | -2 -4 -4 | A = | 2 4 2 | | 1 1 3 | |-4 -1 -1 | P = | 2 0 1 | | 1 1 0 | -1 | -1 -1 -1 | P = | 1 1 2 | | 2 3 2 | | x | |-4 -1 -1 | | u | | y | = | 2 0 1 | | v | | z | | 1 1 0 | | w | -1 | -1 -1 -1 | | -2 -4 -4 | | -4 -1 -1 | | 1 0 0 | P A P = | 1 1 2 | | 2 4 2 | | 2 0 1 | = | 0 2 0 | | 2 3 2 | | 1 1 3 | | 1 1 0 | | 0 0 2 | | u | | c1 e^t | | v | = | c2 e^(2t) | | w | | c3 e^(2t) | | x | | -4 -1 -1 | | c1 e^t | | y | = | 2 0 1 | | c2 e^(2t) | | z | | 1 1 0 | | c3 e^(2t) | / | x | | -4 -1 -1 | | c1 e^t | | -4 -2 -2 | | c1 e^t | | y | = | 2 0 1 | | 2 c2 e^(2t) | = | 2 0 2 | | c2 e^(2t) | | z | | 1 1 0 | | 2 c3 e^(2t) | | 1 2 0 | | c3 e^(2t) | | x | | -2 -4 -4 | |-4 -1 -1 | | c1 e^t | | 4 -2 -2 | | c1 e^t | A | y | = | 2 4 2 | | 2 0 1 | | c2 e^(2t) | = | 2 0 2 | | c2 e^(2t) | | z | | 1 1 3 | | 1 1 0 | | c3 e^(2t) | | 1 2 0 | | c3 e^(2t) | ======================================================================= Find a formula for the Fibonacci Series. fn = fn-2 + fn-1 | 0 1 | | fn-2 | = | fn-1 | | 1 1 | | fn-1 | = | fn | n So | 0 1 | | 0 | = | fn | | 1 1 | | 1 | | fn+1 | In general when the k+1 term is a linear combination of the k previous terms, we can create a matrix such that | x0 | | xn | n| x1 | | xn+1 | A | x2 | = | xn+2 | | : | | : | | xk-1 | | xn+k-1| -------------------------------------------------------- Markov Chains. If you have a Markov Chain Xnew = A X Then the steady state consists of the X where AX = X. If the column sums of A are all 1, then two things can happen. You will probably converge rather quickly to this steady state. Under some rather strong conditions, you can cycle. Example 1. | .95 .03 | M = | .05 .97 | What is the steady state? A = 1/100 {{95,3},{5,97}}; RowReduce[A - IdentityMatrix[2]] 1 -3/5 0 0 Steady State = | 3 | | 5 | Example 2 | .70 .10 .30 | M = | .20 .80 .30 | | .10 .10 .40 | What is the steady state? A = 1/100{{70,10,30},{20,80,30},{10,10,40}}; Solve[(A-IdentityMatrix[3]){x,y,z} == {0,0,0} ]; 1 0 -9/4 0 1 -15/4 0 0 0 The steady state is | 9 | | 15 | | 4 | Example 3 | .5 .2 .3 | M = | .3 .8 .3 | | .2 .0 .4 | What is the steady state. A = 1/10 {{5,2,3},{3,8,3},{2,0,4}}; RowReduce[A-IdentityMatrix[3]]; 1 0 -3 0 1 -6 0 0 0 The steady state is | 3 | | 6 | | 1 |