I have a problem that have been trying to solve but it's not going so good. I would like some guidelines on how to work myself around this problem:
Two neighboring countries spy on each other and adapt its defense budget against each other depending on the situation in the neighborhood. Let country A's annual defense budget be a(t) (in billion) and country B's b(t). The change in budget changes each year according to the relationship:
a (t + 1) = r a (t) + s B (t)
b (t + 1) = s a (t) + r b (t)
where r is a positive number a bit less than 1 and s is a small postive number a bit greater than 0. Suppose that r is greater than s, that is, r>s. The budget for the two countries can be described by the vector x (t) = (a b) (<--- matrix) where a = a(t) and b = b(t)
If a(0) = 30 and b(0) = 5, what will happen with both the countries defense budget in the long run?
Solve tasks a) to e) both on paper and in Mathematica.
a) Set up the system transition matrix A such that x(t + 1) = Ax(t)
So what I've done so far is to select r = 0.8 and s = 0.32 and defined it as a 2x2 matrix and I've also defined a column vector with a(0)=30 and b(0)=5, so what I have in mathematica right know is:
I don't feel like this is how I'm supposed to do. At least this doesn't feel like how it should turn out in the "long run".
I would be very happy for someone to help/guide me through this! Thank you!
EDIT: I solved the problem and would like to have some feedback on how it is, if it's messy to follow. I would be thankful! :)
2nd EDIT: In my second question I need to find the Eigenvalues, Eigenvectors and Eigenbase. I have calculated by hand and I've gotten the Eigenvalues to lamda=1 and lamda=0.8 (when using the matrix {0.9,0.1},{0.1,0.9}) and the v1 = {1,1} and v2 = {-1,1}..I've gotten the right answers for it also on mathematica:
MatrixA = {{0.9, 0.1}, {0.1, 0.9}};
EigenMatrix = {{lm, 0}, {0, lm]}};
detMatrix = MatrixA - EigenMatrix
{{0.9 - lm], 0.1}, {0.1, 0.9 - lm}}
KarEk = Det[detMatrix]
0.8 - 1.8lm + lm^2
LamdaVarden = Roots[KarEk == 0, lm]
lm == 0.8 || lm == 1.
However, when trying to solve the Eigenvectors I get:
Eigenvectors[{{0.9, 0.1}, {0.1, 0.9}}]
{{0.707107, 0.707107}, {-0.707107, 0.707107}}
This is wrong, what am I doing wrong?
RSolve
and alsoMatrixPower
for a start. $\endgroup$A
. $\endgroup$MatrixForm
(just display result of a matrix calculation with it). $\endgroup$x[t_] := MatrixPower[{{0.8, 0.32}, {0.32, 0.8}}, t].{30, 5}]
and then justMap
x
onto a range:x /@ Range[0, 10]
This approach provides results but does not as easily identify the limits ("long run"). $\endgroup$