https://mathimages.swarthmore.edu/api.php?action=feedcontributions&user=Xtian1&feedformat=atomMath Images - User contributions [en]2022-09-29T14:41:00ZUser contributionsMediaWiki 1.31.1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38640Systems of Linear Differential Equations2013-09-02T03:45:10Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants by the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so linear combinations of existing solutions are solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since all the variables of the real Cold War arms race are hard to model, we will make assumptions about the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by 2 dollars for every dollar it spent the previous year, and raises it by 5 dollars for every dollar in the United States budget. Finally, assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
The values of ''x'' and ''y'' are in tens of billions of dollars. All of the constants are made up, but they let us study how this hypothetical situation would develop.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
[[Eigenvalues and Eigenvectors#Eigenvalues|To find the eigenvalues]] of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, [[Eigenvalues and Eigenvectors#Eigenvectors|find the eigenvectors]]:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(''t'') and ''y''(''t'') as t goes to &infin;. <br />
<br />
As ''t'' gets larger, ''e''<sup>-8''t''</sup> becomse a smaller and smaller fraction, but ''e''<sup>3''t''</sup> grows exponentially without bound in both equations. So:<br />
<br />
:<math> \lim_{t \to \infty}x(t) = \infty </math> (does not exist)<br />
<br />
:<math> \lim_{t \to \infty}y(t) = \infty </math> (does not exist)<br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet Union will cause the arms race to spiral out of control, with both countries investing more and more of their resources in defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity. This is an ''unstable'' system, or a system that will diverge without bound. Mathematically, the only factors that determine the stability of a system are its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; we know this because the line and eigenvector share the same slope. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>, which we know because the line and eigenvector share the same slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model will follow given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored systems with real eigenvalues. Now we will investigate a system that contains [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium position, and the force ''F'' the spring exerts on the mass at time ''t'' is linearly related to ''x'' by ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplicity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t''. The derivative of displacement is velocity. At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use [[Euler's Formula]] to understand what raising ''e'' to complex numbers means. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in the equation for ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ *}\\<br />
&= \frac{x_0}{2}(2 \cos t) \\<br />
&= x_0 \cos t \text{.}<br />
\end{align} </math><br />
:*Recall that cos(-''x'') = cos(''x'') and sin(-''x'') = -sin''x''.<br />
<br />
The form of our solution is a constant multiplied by a function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not move toward zero, but neither does it go to infinity. We call this type of system ''neutrally stable'': ''neutrally'' because it doesn't approach the origin and ''stable'' because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law give more insight into how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens as time approaches infinity. Each system also has an '''equilibrium point'''. In our arms race example and the complex eigenvalue example, the '''equilibrium point''' is just the origin (in most cases it's the origin). An '''unstable''' system will approach infinity as time approaches infinity, and a '''stable''' system will not. There are two types of stable systems: '''asymptotically stable''' systems and '''neutrally stable''' systems. Neutrally stable systems orbit in a closed path around the equilibrium point (like Hooke's law). Asymptotically stable systems approach the equilibrium point as time approaches infinity. The arms race example that we worked through is a case of an unstable system with a '''saddle equilibrium point'''. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what as when time approaches infinity, we can take the limit of our solution as time approaches infinity. Note that the only factors that affect the outcome of the solution (whether it converges or diverges) are the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, [[Eigenvalues and Eigenvectors#Another way of writing the Characteristic Polynomial|another way of writing the characteristic polynomial]] is<br />
<br />
:<math> \lambda^2 - \text{tr}A\lambda + \text{det}A = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of det''A'' and tr''A''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
For asymptotically stable systems, we want the system to approach the equilibrium point. That means we want the real component of our eigenvalues to be negative. Note that tr''A'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real components of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( \text{tr}A + \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right)<0 </math><br />
<br />
:<math> \text{tr}A < -\sqrt{(\text{tr}A)^2 - 4\text{det}A} </math> <br />
<br />
:<math> (\text{tr}A)^2 > (\text{tr}A)^2 - 4\text{det}A </math> (Squared both sides, note that since tr''A'' < 0, the inequality sign changes.)<br />
<br />
:<math> \text{det}A > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since det''A'' must be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how they converge to the equilibrium point. For complex eigenvalues, the vector field spirals into the equilibrium point. For real eigenvalues, the vector approaches the equilibrium point in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if det''A'' > 0 and tr''A'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to approach either the equilibrium point or infinity. In order to have purely imaginary eigenvalues, we must have tr''A'' = 0 and the expression under the square root to be less than zero. Since tr''A'' = 0, we have -4det''A'' < 0, so det''A'' > 0. Thus a system is neutrally stable if and only if det''A'' > 0 and tr''A'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approach infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( \text{tr}A - \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right) > 0 </math><br />
<br />
:<math> \text{tr}A > \sqrt{(\text{tr}A)^2 - 4\text{det}A} </math> <br />
<br />
:<math> (\text{tr}A)^2 > (\text{tr}A)^2 - 4\text{det}A </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> \text{det}A > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except tr''A'' > 0, and we stated before that this condition also holds for the complex eigenvalue case. Thus a system is unstable if and only if det''A'' > 0 and tr''A'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium point and notice that half of the region is unstable and the other half is unstable. In this case, the equilibrium point is called a saddle point. The eigenvalues for this case are of opposite sign: one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (tr''A'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of half the vector field seeming to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result approached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part diverged to infinity, forcing the entire system toward infinity. Thus the only way for a saddle point system to be stable is for the initial condition to be a scalar multiple of the negative eigenvalue's eigenvector. Look at Figure 3 for what a system with a saddle point looks like. Unlike the previous few cases, tr''A'' has no obvious restriction. We split this into 3 cases: tr''A'' < 0, tr''A'' = 0, tr''A'' > 0.<br />
<br />
'''Case 1 (tr''A'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( \text{tr}A + \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right) > 0 </math><br />
<br />
:<math> \sqrt{(\text{tr}A)^2 - 4\text{det}A} > -tA </math> <br />
<br />
:<math> (\text{tr}A)^2 - 4\text{det}A > (\text{tr}A)^2 </math> (Squared both sides. Since -tr''A'' is positive, we do not need to change sign.)<br />
<br />
:<math> \text{det}A < 0 </math><br />
<br />
The only condition for case 1 is det''A'' < 0.<br />
<br />
'''Case 2 (tr''A'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account tr''A'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4\text{det}A} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4\text{det}A} </math><br />
<br />
We need real numbers, so det''A'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again det''A'' < 0.<br />
<br />
'''Case 3 (tr''A'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( \text{tr}A - \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right) < 0 </math><br />
<br />
:<math> \text{tr}A < \sqrt{(\text{tr}A)^2 - 4\text{det}A} </math> <br />
<br />
:<math> (\text{tr}A)^2 < (\text{tr}A)^2 - 4\text{det}A </math> (Squared both sides. Since tr''A'' is positive, we do not need to change sign.)<br />
<br />
:<math> \text{det}A < 0 </math><br />
<br />
The only condition for case 3 is det''A'' < 0. <br />
<br />
<br />
All three cases resulted in the same condition. Thus the '''only condition''' to create a saddle point is det''A'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case are listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We claimed above that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a ''k''×''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{t^nA^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (Here we use } (PLP^{-1})^n = P(L)^nP^{-1} \text{, which is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} \\<br />
&= \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are applicable to many situations. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written as linear combinations of one another. Such systems include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could not have solved the equations, much less determined the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector; it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with one of the other core ideas of linear algebra - linear combinations - eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38639Systems of Linear Differential Equations2013-09-02T03:37:33Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants by the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so linear combinations of existing solutions are solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since all the variables of the real Cold War arms race are hard to model, we will make assumptions about the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by 2 dollars for every dollar it spent the previous year, and raises it by 5 dollars for every dollar in the United States budget. Finally, assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
The values of ''x'' and ''y'' are in tens of billions of dollars. All of the constants are made up, but they let us study how this hypothetical situation would develop.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
[[Eigenvalues and Eigenvectors#Eigenvalues|To find the eigenvalues]] of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, [[Eigenvalues and Eigenvectors#Eigenvectors|find the eigenvectors]]:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(''t'') and ''y''(''t'') as t goes to &infin;. <br />
<br />
As ''t'' gets larger, ''e''<sup>-8''t''</sup> becomse a smaller and smaller fraction, but ''e''<sup>3''t''</sup> grows exponentially without bound in both equations. So:<br />
<br />
:<math> \lim_{t \to \infty}x(t) = \infty </math> (does not exist)<br />
<br />
:<math> \lim_{t \to \infty}y(t) = \infty </math> (does not exist)<br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet Union will cause the arms race to spiral out of control, with both countries investing more and more of their resources in defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity. This is an ''unstable'' system, or a system that will diverge without bound. Mathematically, the only factors that determine the stability of a system are its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; we know this because the line and eigenvector share the same slope. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>, which we know because the line and eigenvector share the same slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model will follow given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored systems with real eigenvalues. Now we will investigate a system that contains [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium position, and the force ''F'' the spring exerts on the mass at time ''t'' is linearly related to ''x'' by ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplicity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t''. The derivative of displacement is velocity. At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use [[Euler's Formula]] to understand what raising ''e'' to complex numbers means. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in the equation for ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ *}\\<br />
&= \frac{x_0}{2}(2 \cos t) \\<br />
&= x_0 \cos t \text{.}<br />
\end{align} </math><br />
:*Recall that cos(-''x'') = cos(''x'') and sin(-''x'') = -sin''x''.<br />
<br />
The form of our solution is a constant multiplied by a function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not move toward zero, but neither does it go to infinity. We call this type of system ''neutrally stable'': ''neutrally'' because it doesn't approach the origin and ''stable'' because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law give more insight into how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens as time approaches infinity. Each system also has an '''equilibrium point'''. In our arms race example and the complex eigenvalue example, the '''equilibrium point''' is just the origin (in most cases it's the origin). An '''unstable''' system will approach infinity as time approaches infinity, and a '''stable''' system will not. There are two types of stable systems: '''asymptotically stable''' systems and '''neutrally stable''' systems. Neutrally stable systems orbit in a closed path around the equilibrium point (like Hooke's law). Asymptotically stable systems approach the equilibrium point as time approaches infinity. The arms race example that we worked through is a case of an unstable system with a '''saddle equilibrium point'''. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what as when time approaches infinity, we can take the limit of our solution as time approaches infinity. Note that the only factors that affect the outcome of the solution (whether it converges or diverges) are the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, [[Eigenvalues and Eigenvectors#Another way of writing the Characteristic Polynomial|another way of writing the characteristic polynomial]] is<br />
<br />
:<math> \lambda^2 - \text{tr}A\lambda + \text{det}A = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of det''A'' and tr''A''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
For asymptotically stable systems, we want the system to approach the equilibrium point. That means we want the real component of our eigenvalues to be negative. Note that tr''A'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real components of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( \text{tr}A + \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right)<0 </math><br />
<br />
:<math> \text{tr}A < -\sqrt{(\text{tr}A)^2 - 4\text{det}A} </math> <br />
<br />
:<math> (\text{tr}A)^2 > (\text{tr}A)^2 - 4\text{det}A </math> (Squared both sides, note that since tr''A'' < 0, the inequality sign changes.)<br />
<br />
:<math> \text{det}A > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since det''A'' must be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how they converge to the equilibrium point. For complex eigenvalues, the vector field spirals into the equilibrium point. For real eigenvalues, the vector approaches the equilibrium point in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if det''A'' > 0 and tr''A'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to approach either the equilibrium point or infinity. In order to have purely imaginary eigenvalues, we must have tr''A'' = 0 and the expression under the square root to be less than zero. Since tr''A'' = 0, we have -4det''A'' < 0, so det''A'' > 0. Thus a system is neutrally stable if and only if det''A'' > 0 and tr''A'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approach infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( \text{tr}A - \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right) > 0 </math><br />
<br />
:<math> \text{tr}A > \sqrt{(\text{tr}A)^2 - 4\text{det}A} </math> <br />
<br />
:<math> (\text{tr}A)^2 > (\text{tr}A)^2 - 4\text{det}A </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> \text{det}A > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except tr''A'' > 0, and we stated before that this condition also holds for the complex eigenvalue case. Thus a system is unstable if and only if det''A'' > 0 and tr''A'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium point and notice that half of the region is unstable and the other half is unstable. In this case, the equilibrium point is called a saddle point. The eigenvalues for this case are of opposite sign: one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (tr''A'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of half the vector field seeming to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result approached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part diverged to infinity, forcing the entire system toward infinity. Thus the only way for a saddle point system to be stable is for the initial condition to be a scalar multiple of the negative eigenvalue's eigenvector. Look at Figure 3 for what a system with a saddle point looks like. Unlike the previous few cases, tr''A'' has no obvious restriction. We split this into 3 cases: tr''A'' < 0, tr''A'' = 0, tr''A'' > 0.<br />
<br />
'''Case 1 (tr''A'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( \text{tr}A + \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right) > 0 </math><br />
<br />
:<math> \sqrt{(\text{tr}A)^2 - 4\text{det}A} > -tA </math> <br />
<br />
:<math> (\text{tr}A)^2 - 4\text{det}A > (\text{tr}A)^2 </math> (Squared both sides. Since -tr''A'' is positive, we do not need to change sign.)<br />
<br />
:<math> \text{det}A < 0 </math><br />
<br />
The only condition for case 1 is det''A'' < 0.<br />
<br />
'''Case 2 (tr''A'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account tr''A'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4\text{det}A} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4\text{det}A} </math><br />
<br />
We need real numbers, so det''A'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again det''A'' < 0.<br />
<br />
'''Case 3 (tr''A'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( \text{tr}A - \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right) < 0 </math><br />
<br />
:<math> \text{tr}A < \sqrt{(\text{tr}A)^2 - 4\text{det}A} </math> <br />
<br />
:<math> (\text{tr}A)^2 < (\text{tr}A)^2 - 4\text{det}A </math> (Squared both sides. Since tr''A'' is positive, we do not need to change sign.)<br />
<br />
:<math> \text{det}A < 0 </math><br />
<br />
The only condition for case 3 is det''A'' < 0. <br />
<br />
<br />
All three cases resulted in the same condition. Thus the '''only condition''' to create a saddle point is det''A'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case are listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We claimed above that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a ''k''×''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{t^nA^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38638Systems of Linear Differential Equations2013-09-02T00:50:54Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants by the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so linear combinations of existing solutions are solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since all the variables of the real Cold War arms race are hard to model, we will make assumptions about the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by 2 dollars for every dollar it spent the previous year, and raises it by 5 dollars for every dollar in the United States budget. Finally, assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
The values of ''x'' and ''y'' are in tens of billions of dollars. All of the constants are made up, but they let us study how this hypothetical situation would develop.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
[[Eigenvalues and Eigenvectors#Eigenvalues|To find the eigenvalues]] of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, [[Eigenvalues and Eigenvectors#Eigenvectors|find the eigenvectors]]:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(''t'') and ''y''(''t'') as t goes to &infin;. <br />
<br />
As ''t'' gets larger, ''e''<sup>-8''t''</sup> becomse a smaller and smaller fraction, but ''e''<sup>3''t''</sup> grows exponentially without bound in both equations. So:<br />
<br />
:<math> \lim_{t \to \infty}x(t) = \infty </math> (does not exist)<br />
<br />
:<math> \lim_{t \to \infty}y(t) = \infty </math> (does not exist)<br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet Union will cause the arms race to spiral out of control, with both countries investing more and more of their resources in defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity. This is an ''unstable'' system, or a system that will diverge without bound. Mathematically, the only factors that determine the stability of a system are its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; we know this because the line and eigenvector share the same slope. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>, which we know because the line and eigenvector share the same slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model will follow given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored systems with real eigenvalues. Now we will investigate a system that contains [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium position, and the force ''F'' the spring exerts on the mass at time ''t'' is linearly related to ''x'' by ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplicity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t''. The derivative of displacement is velocity. At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use [[Euler's Formula]] to understand what raising ''e'' to complex numbers means. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in the equation for ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ *}\\<br />
&= \frac{x_0}{2}(2 \cos t) \\<br />
&= x_0 \cos t \text{.}<br />
\end{align} </math><br />
:*Recall that cos(-''x'') = cos(''x'') and sin(-''x'') = -sin''x''.<br />
<br />
The form of our solution is a constant multiplied by a function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not move toward zero, but neither does it go to infinity. We call this type of system ''neutrally stable'': ''neutrally'' because it doesn't approach the origin and ''stable'' because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law give more insight into how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens as time approaches infinity. Each system also has an '''equilibrium point'''. In our arms race example and the complex eigenvalue example, the '''equilibrium point''' is just the origin (in most cases it's the origin). An '''unstable''' system will approach infinity as time approaches infinity, and a '''stable''' system will not. There are two types of stable systems: '''asymptotically stable''' systems and '''neutrally stable''' systems. Neutrally stable systems orbit in a closed path around the equilibrium point (like Hooke's law). Asymptotically stable systems approach the equilibrium point as time approaches infinity. The arms race example that we worked through is a case of an unstable system with a '''saddle equilibrium point'''. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what as when time approaches infinity, we can take the limit of our solution as time approaches infinity. Note that the only factors that affect the outcome of the solution (whether it converges or diverges) are the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, [[Eigenvalues and Eigenvectors#Another way of writing the Characteristic Polynomial|another way of writing the characteristic polynomial]] is<br />
<br />
:<math> \lambda^2 - \text{tr}A\lambda + \text{det}A = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of det''A'' and tr''A''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
For asymptotically stable systems, we want the system to approach the equilibrium point. That means we want the real component of our eigenvalues to be negative. Note that tr''A'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real components of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( \text{tr}A + \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right)<0 </math><br />
<br />
:<math> \text{tr}A < -\sqrt{(\text{tr}A)^2 - 4\text{det}A} </math> <br />
<br />
:<math> (\text{tr}A)^2 > (\text{tr}A)^2 - 4\text{det}A </math> (Squared both sides, note that since tr''A'' < 0, the inequality sign changes.)<br />
<br />
:<math> \text{det}A > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since det''A'' must be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how they converge to the equilibrium point. For complex eigenvalues, the vector field spirals into the equilibrium point. For real eigenvalues, the vector approaches the equilibrium point in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if det''A'' > 0 and tr''A'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to approach either the equilibrium point or infinity. In order to have purely imaginary eigenvalues, we must have tr''A'' = 0 and the expression under the square root to be less than zero. Since tr''A'' = 0, we have -4det''A'' < 0, so det''A'' > 0. Thus a system is neutrally stable if and only if det''A'' > 0 and tr''A'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approach infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( \text{tr}A - \sqrt{(\text{tr}A)^2 - 4\text{det}A} \right) > 0 </math><br />
<br />
:<math> \text{tr}A > \sqrt{(\text{tr}A)^2 - 4\text{det}A} </math> <br />
<br />
:<math> (\text{tr}A)^2 > (\text{tr}A)^2 - 4\text{det}A </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> \text{det}A > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except tr''A'' > 0, and we stated before that this condition also holds for the complex eigenvalue case. Thus a system is unstable if and only if det''A'' > 0 and tr''A'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium point and notice that half of the region is unstable and the other half is unstable. In this case, the equilibrium point is called a saddle point. The eigenvalues for this case are of opposite sign: one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (tr''A'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of half the vector field seeming to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result approached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part diverged to infinity, forcing the entire system toward infinity. Thus the only way for a saddle point system to be stable is for the initial condition to be a scalar multiple of the negative eigenvalue's eigenvector. Look at Figure 3 for what a system with a saddle point looks like. Unlike the previous few cases, tr''A'' has no obvious restriction. We split this into 3 cases: tr''A'' < 0, tr''A'' = 0, tr''A'' > 0.<br />
<br />
'''Case 1 (tr''A'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38637Systems of Linear Differential Equations2013-09-02T00:31:57Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants by the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so linear combinations of existing solutions are solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since all the variables of the real Cold War arms race are hard to model, we will make assumptions about the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by 2 dollars for every dollar it spent the previous year, and raises it by 5 dollars for every dollar in the United States budget. Finally, assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
The values of ''x'' and ''y'' are in tens of billions of dollars. All of the constants are made up, but they let us study how this hypothetical situation would develop.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
[[Eigenvalues and Eigenvectors#Eigenvalues|To find the eigenvalues]] of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, [[Eigenvalues and Eigenvectors#Eigenvectors|find the eigenvectors]]:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(''t'') and ''y''(''t'') as t goes to &infin;. <br />
<br />
As ''t'' gets larger, ''e''<sup>-8''t''</sup> becomse a smaller and smaller fraction, but ''e''<sup>3''t''</sup> grows exponentially without bound in both equations. So:<br />
<br />
:<math> \lim_{t \to \infty}x(t) = \infty </math> (does not exist)<br />
<br />
:<math> \lim_{t \to \infty}y(t) = \infty </math> (does not exist)<br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet Union will cause the arms race to spiral out of control, with both countries investing more and more of their resources in defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity. This is an ''unstable'' system, or a system that will diverge without bound. Mathematically, the only factors that determine the stability of a system are its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; we know this because the line and eigenvector share the same slope. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>, which we know because the line and eigenvector share the same slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model will follow given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored systems with real eigenvalues. Now we will investigate a system that contains [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium position, and the force ''F'' the spring exerts on the mass at time ''t'' is linearly related to ''x'' by ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplicity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t''. The derivative of displacement is velocity. At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use [[Euler's Formula]] to understand what raising ''e'' to complex numbers means. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in the equation for ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ *}\\<br />
&= \frac{x_0}{2}(2 \cos t) \\<br />
&= x_0 \cos t \text{.}<br />
\end{align} </math><br />
:*Recall that cos(-''x'') = cos(''x'') and sin(-''x'') = -sin''x''.<br />
<br />
The form of our solution is a constant multiplied by a function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not move toward zero, but neither does it go to infinity. We call this type of system ''neutrally stable'': ''neutrally'' because it doesn't approach the origin and ''stable'' because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law give more insight into how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens as time approaches infinity. Each system also has an '''equilibrium point'''. In our arms race example and the complex eigenvalue example, the '''equilibrium point''' is just the origin (in most cases it's the origin). An '''unstable''' system will approach infinity as time approaches infinity, and a '''stable''' system will not. There are two types of stable systems: '''asymptotically stable''' systems and '''neutrally stable''' systems. Neutrally stable systems orbit in a closed path around the equilibrium point (like Hooke's law). Asymptotically stable systems approach the equilibrium point as time approaches infinity. The arms race example that we worked through is a case of an unstable system with a '''saddle equilibrium point'''. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what as when time approaches infinity, we can take the limit of our solution as time approaches infinity. Note that the only factors that affect the outcome of the solution (whether it converges or diverges) are the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, [[Eigenvalues and Eigenvectors#Another way of writing the Characteristic Polynomial|another way of writing the characteristic polynomial]] is<br />
<br />
:<math> \lambda^2 - \text{tr}A\lambda + \text{det}A = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of det''A'' and tr''A''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
For asymptotically stable systems, we want the system to approach the equilibrium point. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real components of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38636Systems of Linear Differential Equations2013-09-01T15:38:38Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants by the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so linear combinations of existing solutions are solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since all the variables of the real Cold War arms race are hard to model, we will make assumptions about the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by 2 dollars for every dollar it spent the previous year, and raises it by 5 dollars for every dollar in the United States budget. Finally, assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
The values of ''x'' and ''y'' are in tens of billions of dollars. All of the constants are made up, but they let us study how this hypothetical situation would develop.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
[[Eigenvalues and Eigenvectors#Eigenvalues|To find the eigenvalues]] of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, [[Eigenvalues and Eigenvectors#Eigenvectors|find the eigenvectors]]:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(''t'') and ''y''(''t'') as t goes to &infin;. <br />
<br />
As ''t'' gets larger, ''e''<sup>-8''t''</sup> becomse a smaller and smaller fraction, but ''e''<sup>3''t''</sup> grows exponentially without bound in both equations. So:<br />
<br />
:<math> \lim_{t \to \infty}x(t) = \infty </math> (does not exist)<br />
<br />
:<math> \lim_{t \to \infty}y(t) = \infty </math> (does not exist)<br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet Union will cause the arms race to spiral out of control, with both countries investing more and more of their resources in defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity. This is an ''unstable'' system, or a system that will diverge without bound. Mathematically, the only factors that determine the stability of a system are its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; we know this because the line and eigenvector share the same slope. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>, which we know because the line and eigenvector share the same slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model will follow given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored systems with real eigenvalues. Now we will investigate a system that contains [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium position, and the force ''F'' the spring exerts on the mass at time ''t'' is linearly related to ''x'' by ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplicity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t''. The derivative of displacement is velocity. At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use [[Euler's Formula]] to understand what raising ''e'' to complex numbers means. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in the equation for ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ *}\\<br />
&= \frac{x_0}{2}(2 \cos t) \\<br />
&= x_0 \cos t \text{.}<br />
\end{align} </math><br />
:*Recall that cos(-''x'') = cos(''x'') and sin(-''x'') = -sin''x''.<br />
<br />
The form of our solution is a constant multiplied by a function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38635Systems of Linear Differential Equations2013-09-01T15:33:08Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants by the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so linear combinations of existing solutions are solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since all the variables of the real Cold War arms race are hard to model, we will make assumptions about the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by 2 dollars for every dollar it spent the previous year, and raises it by 5 dollars for every dollar in the United States budget. Finally, assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
The values of ''x'' and ''y'' are in tens of billions of dollars. All of the constants are made up, but they let us study how this hypothetical situation would develop.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
[[Eigenvalues and Eigenvectors#Eigenvalues|To find the eigenvalues]] of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, [[Eigenvalues and Eigenvectors#Eigenvectors|find the eigenvectors]]:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(''t'') and ''y''(''t'') as t goes to &infin;. <br />
<br />
As ''t'' gets larger, ''e''<sup>-8''t''</sup> becomse a smaller and smaller fraction, but ''e''<sup>3''t''</sup> grows exponentially without bound in both equations. So:<br />
<br />
:<math> \lim_{t \to \infty}x(t) = \infty </math> (does not exist)<br />
<br />
:<math> \lim_{t \to \infty}y(t) = \infty </math> (does not exist)<br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet Union will cause the arms race to spiral out of control, with both countries investing more and more of their resources in defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity. This is an ''unstable'' system, or a system that will diverge without bound. Mathematically, the only factors that determine the stability of a system are its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; we know this because the line and eigenvector share the same slope. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>, which we know because the line and eigenvector share the same slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model will follow given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored systems with real eigenvalues. Now we will investigate a system that contains [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium position, and the force ''F'' the spring exerts on the mass at time ''t'' is linearly related to ''x'' by ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplicity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t''. The derivative of displacement is velocity. At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use [[Euler's Formula]] to understand what raising ''e'' to complex numbers means. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in the equation for ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) \\<br />
&= x_0 \cos t \text{.}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by a function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38634Systems of Linear Differential Equations2013-09-01T05:56:11Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants by the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so linear combinations of existing solutions are solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since all the variables of the real Cold War arms race are hard to model, we will make assumptions about the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by 2 dollars for every dollar it spent the previous year, and raises it by 5 dollars for every dollar in the United States budget. Finally, assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
The values of ''x'' and ''y'' are in tens of billions of dollars. All of the constants are made up, but they let us study how this hypothetical situation would develop.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
[[Eigenvalues and Eigenvectors#Eigenvalues|To find the eigenvalues]] of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, [[Eigenvalues and Eigenvectors#Eigenvectors|find the eigenvectors]]:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(''t'') and ''y''(''t'') as t goes to &infin;. <br />
<br />
As ''t'' gets larger, ''e''<sup>-8''t''</sup> becomse a smaller and smaller fraction, but ''e''<sup>3''t''</sup> grows exponentially without bound in both equations. So:<br />
<br />
:<math> \lim_{t \to \infty}x(t) = \infty </math> (does not exist)<br />
<br />
:<math> \lim_{t \to \infty}y(t) = \infty </math> (does not exist)<br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet Union will cause the arms race to spiral out of control, with both countries investing more and more of their resources in defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38633Systems of Linear Differential Equations2013-09-01T05:53:44Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants by the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so linear combinations of existing solutions are solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since all the variables of the real Cold War arms race are hard to model, we will make assumptions about the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by 2 dollars for every dollar it spent the previous year, and raises it by 5 dollars for every dollar in the United States budget. Finally, assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
The values of ''x'' and ''y'' are in tens of billions of dollars. All of the constants are made up, but they let us study how this hypothetical situation would develop.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
[[Eigenvalues and Eigenvectors#Eigenvalues|To find the eigenvalues]] of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, [[Eigenvalues and Eigenvectors#Eigenvectors|find the eigenvectors]]:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(''t'') and ''y''(''t'') as t goes to &infin;. <br />
<br />
As ''t'' gets larger, ''e''<sup>-8''t''</sup> becomse a smaller and smaller fraction, but ''e''<sub>3''t''</sup> grows exponentially without bound in both equations. So:<br />
<br />
:<math> \lim_{t \to \infty}x(t) = \infty </math> (does not exist)<br />
<br />
:<math> \lim_{t \to \infty}y(t) = \infty </math> (does not exist)<br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet Union will cause the arms race to spiral out of control, with both countries investing more and more of their resources in defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38632Systems of Linear Differential Equations2013-09-01T05:46:10Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants by the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so linear combinations of existing solutions are solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since all the variables of the real Cold War arms race are hard to model, we will make assumptions about the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by 2 dollars for every dollar it spent the previous year, and raises it by 5 dollars for every dollar in the United States budget. Finally, assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
The values of ''x'' and ''y'' are in tens of billions of dollars. All of the constants are made up, but they let us study how this hypothetical situation would develop.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
[[Eigenvalues and Eigenvectors#Eigenvalues|To find the eigenvalues]] of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38631Systems of Linear Differential Equations2013-09-01T05:28:14Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' = \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38630Systems of Linear Differential Equations2013-09-01T05:27:20Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' &= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 </math><br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38629Systems of Linear Differential Equations2013-09-01T05:26:26Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
The solution to the one dimensional case suggests that the solution to <math>\vec{u}' = A\vec{u}</math> is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = \vec{v} e^{\lambda t} </math> for some scalar λ and vector <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>. We plug our guess, where <math> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e^{\lambda t} p \\ e^{\lambda t} q \end{bmatrix} </math>, into the original equations and find λ and <math>\vec{v}</math> that work.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> x'(t) = p \lambda e^{\lambda t} = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> y'(t) = q \lambda e^{\lambda t} = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite this system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues, λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </ math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Based on the solution to the one dimensional system, we hope to multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>. We must first check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our general solution, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging it into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \vec{u}' &= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2<br />
:<math> \begin{align}<br />
A\vec{u} &= A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38568Systems of Linear Differential Equations2013-07-26T14:57:33Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one function or derivative that is found in at least two equations in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
<br />
We can make some connections between the one and two dimensional system. We see that ''A'' in the two dimensional case is like the ''k'' in the one dimensional case. The initial condition is also a vector instead of a scalar. Thus the solution to the one dimensional case suggests that the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = e^{\lambda t} \vec{v} </math> for some scalar λ (we don't know what this is yet) and <math>\vec{v}</math>. This seemingly random equation will start to make sense once we plug our guess into the original equations and find λ and <math>\vec{v}</math> that work. We write <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> p \lambda e^{\lambda t} = x'(t) = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> q \lambda e^{\lambda t} = y'(t) = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite our system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Ideally, we multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>, but we must check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our solution expression, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \begin{align} \vec{u}' &= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \\<br />
&= A\vec{u} = A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38566Systems of Linear Differential Equations2013-07-26T14:56:23Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one equation that involves a function or derivative that is in another equation in the system. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
<br />
We can make some connections between the one and two dimensional system. We see that ''A'' in the two dimensional case is like the ''k'' in the one dimensional case. The initial condition is also a vector instead of a scalar. Thus the solution to the one dimensional case suggests that the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = e^{\lambda t} \vec{v} </math> for some scalar λ (we don't know what this is yet) and <math>\vec{v}</math>. This seemingly random equation will start to make sense once we plug our guess into the original equations and find λ and <math>\vec{v}</math> that work. We write <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> p \lambda e^{\lambda t} = x'(t) = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> q \lambda e^{\lambda t} = y'(t) = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite our system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Ideally, we multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>, but we must check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our solution expression, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \begin{align} \vec{u}' &= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \\<br />
&= A\vec{u} = A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38563Systems of Linear Differential Equations2013-07-26T14:53:06Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one equation that involves different functions or different derivatives of functions. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
<br />
We can make some connections between the one and two dimensional system. We see that ''A'' in the two dimensional case is like the ''k'' in the one dimensional case. The initial condition is also a vector instead of a scalar. Thus the solution to the one dimensional case suggests that the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = e^{\lambda t} \vec{v} </math> for some scalar λ (we don't know what this is yet) and <math>\vec{v}</math>. This seemingly random equation will start to make sense once we plug our guess into the original equations and find λ and <math>\vec{v}</math> that work. We write <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> p \lambda e^{\lambda t} = x'(t) = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> q \lambda e^{\lambda t} = y'(t) = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite our system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Ideally, we multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>, but we must check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our solution expression, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \begin{align} \vec{u}' &= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \\<br />
&= A\vec{u} = A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38562Systems of Linear Differential Equations2013-07-26T14:52:33Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one equation that involves different functions or different derivatives of functions. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
<br />
We can make some connections between the one and two dimensional system. We see that ''A'' in the two dimensional case is like the ''k'' in the one dimensional case. The initial condition is also a vector instead of a scalar. Thus the solution to the one dimensional case suggests that the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = e^{\lambda t} \vec{v} </math> for some scalar λ (we don't know what this is yet) and <math>\vec{v}</math>. This seemingly random equation will start to make sense once we plug our guess into the original equations and find λ and <math>\vec{v}</math> that work. We write <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> p \lambda e^{\lambda t} = x'(t) = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> q \lambda e^{\lambda t} = y'(t) = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite our system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Ideally, we multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>, but we must check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our solution expression, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \begin{align} \vec{u}' &= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \\<br />
&= A\vec{u} = A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, High school algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38561Systems of Linear Differential Equations2013-07-26T14:51:16Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one equation that involves different functions or different derivatives of functions. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
<br />
We can make some connections between the one and two dimensional system. We see that ''A'' in the two dimensional case is like the ''k'' in the one dimensional case. The initial condition is also a vector instead of a scalar. Thus the solution to the one dimensional case suggests that the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = e^{\lambda t} \vec{v} </math> for some λ and <math>\vec{v}</math>. This seemingly random equation will start to make sense once we plug our guess into the original equations and find λ and <math>\vec{v}</math> that work. We write <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> p \lambda e^{\lambda t} = x'(t) = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> q \lambda e^{\lambda t} = y'(t) = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite our system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Ideally, we multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>, but we must check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our solution expression, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \begin{align} \vec{u}' &= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \\<br />
&= A\vec{u} = A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|other=Linear Algebra, High school algebra, Single Variable Calculus<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38560Systems of Linear Differential Equations2013-07-26T14:50:48Z<p>Xtian1: Undo revision 38559 by Xtian1 (Talk)</p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''&prime;(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''&prime;(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''&prime;(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''&prime;(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one equation that involves different functions or different derivatives of functions. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
<br />
We can make some connections between the one and two dimensional system. We see that ''A'' in the two dimensional case is like the ''k'' in the one dimensional case. The initial condition is also a vector instead of a scalar. Thus the solution to the one dimensional case suggests that the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = e^{\lambda t} \vec{v} </math> for some λ and <math>\vec{v}</math>. This seemingly random equation will start to make sense once we plug our guess into the original equations and find λ and <math>\vec{v}</math> that work. We write <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> p \lambda e^{\lambda t} = x'(t) = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> q \lambda e^{\lambda t} = y'(t) = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite our system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Ideally, we multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>, but we must check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our solution expression, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \begin{align} \vec{u}' &= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \\<br />
&= A\vec{u} = A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|A-\lambda I| &= \begin{vmatrix} -3-\lambda & 6 \\ 5 & -2-\lambda \end{vmatrix} \\<br />
&= (-3-\lambda)(-2-\lambda) - 30 \\<br />
&= \lambda^2 + 5\lambda - 24 \\<br />
&= (\lambda + 8)(\lambda - 3) = 0 \end{align} </math> <br />
<br />
So our eigenvalues are λ = -8, 3. Using the eigenvalues, find the eigenvectors:<br />
<br />
:For λ<sub>1</sub> = -8: <math> A-\lambda I = \begin{bmatrix} 5&6 \\ 5&6 \end{bmatrix} </math>, so <math> \vec{v}_1 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>. <br />
<br />
:For λ<sub>2</sub> = 3: <math> A-\lambda I = \begin{bmatrix} -6&6 \\ 5&-5 \end{bmatrix} </math>, so <math> \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Remember that we can use Gaussian elimination to find them.<br />
<br />
:Start with <math> \left[\begin{array}{rr|r} -6 & 1 & 13 \\ 5 & 1 & 15 \end{array}\right] </math>, after Gaussian elimination --> <math> \left[\begin{array}{rr|r} 1 & 0 & \frac{2}{11} \\[6pt] 0 & 1 & \frac{155}{11} \end{array}\right] </math>, so ''c''<sub>1</sub> = <sup>2</sup> &frasl; <sub>11</sub> and ''c''<sub>2</sub> = <sup>155</sup> &frasl; <sub>11</sub>.<br />
<br />
Finally, we just plug all of our values back into our general solution to get our particular solution.<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{2}{11} e^{-8t} \begin{bmatrix} -6 \\ 5 \end{bmatrix} + \frac{155}{11} e^{3t} \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math><br />
<br />
Thus we have the equations<br />
<br />
:<math> x(t) = \frac{-12}{11} e^{-8t} + \frac{155}{11} e^{3t} </math><br />
:<math> y(t) = \frac{10}{11} e^{-8t} + \frac{155}{11} e^{3t} </math>.<br />
<br />
These equations satisfy both the system of differential equations and the initial condition (check if doubtful).<br />
<br />
We can now use these equations to help analyze the results of our hypothetical arms race. The results will happen many years later, so we can get a good estimate by taking the limit of ''x''(t) and ''y''(t) as t goes to &infin;. <br />
<br />
:<math> \lim_{t \to \infty}x(t) = \frac{-12}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{-12}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
:<math> \lim_{t \to \infty}y(t) = \frac{10}{11} e^{-8(\infty)} + \frac{155}{11} e^{3(\infty)} = \frac{10}{11} (1) + \frac{155}{11} (\infty) = \infty </math><br />
<br />
The results of this hypothetical arms race are disastrous; they indicate that tensions between the United States and Soviet will cause the arms race to spiral out of control, with both countries investing more and more of their resources into defense. The outcome of that is the economic collapse of at least one of the two powers. Thus, both countries should lessen the military and nuclear competition to avoid national turmoil. <br />
<br />
We can represent our arms race example visually:<br />
<br />
[[Image:Arms_race2.JPG|thumb|Figure 3|700px|center]]<br />
<br />
This is a vector field of all the paths in our made up model. The horizontal axis represent U.S. defense spending, and the vertical axis represent Soviet defense spending. In order to find the solution path for our initial condition, find the point (13, 15) on the plot and follow the arrows. While the vector field of all four quadrants is displayed, we are mainly interested in the first quadrant; it makes no sense for either country to have negative defense spending. Note that regardless of where the initial condition is in the first quadrant, the arrows lead to positive infinity . This is an ''unstable'' system, or a system that will reach infinity. Mathematically, the only factor that determines the stability of a system is its eigenvalues (more about this later). <br />
<br />
Figure 3 also shows the vital role of the eigenvectors. Using Geometer's Sketchpad, we calculated the slopes of the two predominant lines. Line ''AC'' corresponds to <math>\vec{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} </math>; they both have a slope of 1. Similarly, line ''AB'' corresponds to <math>\vec{v}_2 = \begin{bmatrix} -6 \\ 5 \end{bmatrix} </math>; they both have a slope of <sup>5</sup> &frasl; <sub>-6</sub>, or -0.833. These eigenvectors dictate the possible paths our model can go through given different initial conditions. <br />
<br />
==The Complex Eigenvalue Case==<br />
So far, we have explored the systems with real eigenvalues. Now we will investigate a system that will contain [[Complex Numbers|complex]] eigenvalues. <br />
<br />
In physics, springs are modeled by an equation known as Hooke's law. In an ideal environment (no air resistance, no friction, no heat generated by movement, etc.), an object of mass ''m'', when set into motion attached to a spring, should oscillate forever. Hooke's law states that the mass's displacement ''x'' from the equilibrium and the force ''F'' the spring is exerting on the mass at time ''t'' is linearly related by a constant ''k'', the spring constant. This constant quantifies the stiffness of the spring. Furthermore, this linear relationship is negative; the force is acting in a direction opposite of the displacement. We can write Hooke's law as <br />
<br />
:<math>F = -kx</math>.<br />
<br />
We combine Hooke's law with Newton's second law of motion, ''F'' = ''ma'', to get<br />
<br />
:<math>F = ma = -kx</math>, so <math>a = -\frac{k}{m} x</math>.<br />
<br />
Remember that acceleration ''a'' is the second derivative of displacement ''x''. Thus we observe that Hooke's law is actually the differential equation <br />
<br />
:<math>x'' = -\frac{k}{m} x</math>.<br />
<br />
For the sake of simplificity, we assume ''k'' = ''m'' = 1. The only function in our differential equation is the displacement ''x'', and it's a function of time ''t''. The goal is to find the equation for ''x'' in terms of ''t''. Note that our equation is actually a '''second order''' differential equation. So how do we solve this? We transform the equation into two first order differential equations by introducing a dummy variable ''y''. Set <math>y = x'</math>, so <math>x'' = y' = -x</math>. In physics, ''y'' is the velocity of the mass at time ''t'' (derivative of displacement is velocity). At time ''t'' = 0, the displacement is ''x''<sub>0</sub> and the velocity is always 0 (the velocity of the mass the instant it is released is 0). Now we have the system of first order linear differential equations<br />
<br />
:<math> x' = y \quad\quad\quad x(0) = x_0 </math><br />
:<math> y' = -x \quad\quad\, y(0) = 0 </math>.<br />
<br />
From here, solving this is the same as solving any other system of first order linear differential equations. We write this as the matrix equation<br />
<br />
:<math> \vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = A \vec{u} </math>.<br />
<br />
Solve for the eigenvalues of ''A'':<br />
<br />
:<math> |A-\lambda I| = \begin{vmatrix} 0-\lambda & 1 \\ -1 & 0-\lambda \end{vmatrix} = \lambda^2 + 1 = 0 </math><br />
<br />
So our eigenvalues are λ = ''i'', -''i''. Using these eigenvalues, we find the eigenvectors.<br />
<br />
:For λ<sub>1</sub> = ''i'': <math> A-\lambda I = \begin{bmatrix} -i & 1 \\ -1 & -i \end{bmatrix} </math>, so <math>\vec{v}_1 = \begin{bmatrix} 1 \\ i \end{bmatrix} </math>.<br />
<br />
:For λ<sub>2</sub> = -''i'': <math> A-\lambda I = \begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix} </math>, so <math>\vec{v}_2 = \begin{bmatrix} 1 \\ -i \end{bmatrix} </math>.<br />
<br />
Now we will find the constants for our initial condition. Since we do not have a specific starting value for ''x'', we will solve the system of equations instead of use Gaussian Elimination. When ''t'' = 0, we have<br />
<br />
:<math> x(0) = x_0 = c_1 + c_2 </math> and <math> y(0) = 0 = ic_1 - ic_2 </math>.<br />
<br />
Looking at the second equation, we see that since ''ic''<sub>1</sub> = ''ic''<sub>2</sub>, ''c''<sub>1</sub> = ''c''<sub>2</sub>. Since the constants are equal, we will just call both constants ''c''. We plug this fact into the first equation and we get ''x''<sub>0</sub> = 2''c'', so ''c'' = <sup>''x''<sub>0</sub></sup> &frasl; <sub>2</sub>. Our general solution is then<br />
<br />
:<math> \vec{u} = \begin{bmatrix} x \\ y \end{bmatrix} = \frac{x_0}{2} \left(e^{it} \begin{bmatrix} 1 \\ i \end{bmatrix} + e^{-it} \begin{bmatrix} 1 \\ -i \end{bmatrix} \right) </math>.<br />
<br />
Remember that we are only interested in ''x'', the displacement of the mass. The general equation for ''x'' is<br />
<br />
:<math> x(t) = \frac{x_0}{2}(e^{it}+e^{-it}) </math>.<br />
<br />
Our solution still has complex numbers. We use Euler's formula to understand what raising ''e'' by complex numbers mean. Euler's formula states<br />
<br />
:<math> e^{ix} = \cos x + i\sin x </math> for any ''x''. <br />
<br />
We now use Euler's formula in equation ''x'':<br />
<br />
:<math> \begin{align} x(t) &= \frac{x_0}{2}(e^{it}+e^{-it}) \\<br />
&= \frac{x_0}{2}(e^{it}+e^{i(-t)}) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos(-t) + i\sin(-t)) \\<br />
&= \frac{x_0}{2}(\cos t + i\sin t + \cos t - i\sin t) \text{ (Recall that } \cos(-x) = \cos x \text{ and } \sin(-x) = -\sin x \text{)} \\<br />
&= \frac{x_0}{2}(2 \cos t) = x_0 \cos t \text{ .}<br />
\end{align} </math><br />
<br />
The form of our solution is a constant multiplied by some type of function, quite similar to the real eigenvalue case. The main difference is the function; the function for the complex eigenvalue case is trigonometric while the function for the real eigenvalue case is exponential. This provides insight to the nature of complex numbers. Complex numbers might not be so "imaginary" after all; they seem to reside in a realm parallel to real numbers. <br />
<br />
Just like with real eigenvalues, we can use a vector field to visualize our solution:<br />
<br />
[[Image:Complex_eigenvalue.JPG|thumb|Figure 4|700px|center]]<br />
<br />
This solution is very interesting. Unlike the arms race model, we are interested in all four quadrants, since velocity and displacement can be negative. Note that regardless of where we start (except the origin), we will just orbit the origin in a perfect circle. Does that make sense? In an ideal spring system, the mass moves back and forth forever. Furthermore, the displacement and the velocity are negatively related. The velocity is at a maximum when the displacement is 0, and the displacement is at a maximum when the velocity is 0. Note that the vector field portrays both properties. Analyzing the stability of the system, the system does not end up at infinity. We call this type of system ''neutrally stable'', neutrally because it doesn't approach the origin and stable because it doesn't reach infinity. The different stabilities of the arms race model and Hooke's law gives more insight to how important eigenvalues are to the stability of a system.<br />
<br />
==Stability of the Two Dimensional System==<br />
<br />
We judge the stability of a system by what happens when time goes to infinity. Each system also has an ''equilibrium''. In our arms race example, the equilibrium is just the origin (in most cases it's the origin). An ''unstable'' system will go to infinity as time goes to infinity, and a ''stable'' system will not. There are two types of stable systems: ''asymptotically stable'' systems and ''neutrally stable'' systems. Neutrally stable systems circles in a closed path around the equilibrium (like Hooke's law). Asymptotically stable systems approach the equilibrium as time goes to infinity. The arms race example that we worked through is a case of an unstable system with a saddle point equilibrium. As mentioned above, the eigenvalues of a system are the only things required to determine the system's stability. We use our arms race example to help explain this. Since we judge the stability of a system by what happens when time goes to infinity, we can take the limit of our solution as time goes to infinity. Note that the only factor that affected the outcome of the solution (whether it converges or diverges) is the exponents on the ''e''&prime;s, and the exponents of the ''e''&prime;s are based on the eigenvalues. Thus, we can explore the relationship between the eigenvalues of our system and its stability.<br />
<br />
For a 2x2 matrix, another way of writing the characteristic polynomial is<br />
<br />
:<math> \lambda^2 - trA\lambda + detA = 0 </math>.<br />
<br />
Thus we know by the quadratic formula that<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) </math><br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) </math>.<br />
<br />
With these in mind, we will analyze each type of stability and derive inequalities for λ in terms of ''detA'' and ''trA''.<br />
<br />
===Stable Systems===<br />
====Asymptotically Stable====<br />
When we take the limit of our solution as time goes to infinity, the only factor that determines if the solution will go to infinity is the exponents on ''e'', or the eigenvalues. For asymptotically stable systems, we want the system to approach 0. That means we want the real component of our eigenvalues to be negative. Note that ''trA'' must be negative. For the real eigenvalue case, we look at λ<sub>1</sub> because if the real component of λ<sub>1</sub> is negative, then the real component of λ<sub>2</sub> is negative as well. We observe<br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right)<0 </math><br />
<br />
:<math> trA < -\sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides, note that since ''trA'' < 0, the inequality sign changes.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
This condition also works for the complex eigenvalue case since it requires ''detA'' to be greater than 0 in order for the eigenvalues to be complex. The only difference between real and complex eigenvalues otherwise is how it converges to the equilibrium. For complex eigenvalues, the vector field actually spirals into the equilibrium. For real eigenvalues, the vector approaches the origin in some other curve. Regardless, we conclude that a system is asymptotically stable if and only if ''detA'' > 0 and ''trA'' < 0.<br />
<br />
====Neutrally Stable====<br />
Hooke's law is an example of a neutrally stable system. A property of a neutrally stable system is that it must have purely imaginary eigenvalues. The existence of a real number within the eigenvalues causes the system to either go to equilibrium or go to infinity. In order to have purely imaginary eigenvalues, we must have ''trA'' = 0 and the expression under the square root to be less than zero. Since ''trA'' = 0, we have -''4detA'' < 0, so ''detA'' > 0. Thus a system is neutrally stable if and only if ''detA'' > 0 and ''trA'' = 0. <br />
<br />
===Unstable Systems===<br />
Unstable systems approaches infinity as time passes, so the real component of the eigenvalue must be positive. We look at λ<sub>2</sub> this time since if the real component of λ<sub>2</sub> is positive, the real component of λ<sub>1</sub> is positive as well. For the real eigenvalue case, we have<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> trA > \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 > (trA)^2 - 4detA </math> (Squared both sides. Since both are positive, no need to change inequality sign.)<br />
<br />
:<math> detA > 0 </math>.<br />
<br />
We get the same result as the asymptotically stable case (except ''trA'' > 0, and we stated before that this condition is also required for the complex eigenvalue case. Thus a system is unstable if and only if ''detA'' > 0 and ''trA'' > 0. <br />
<br />
====Saddle Point====<br />
<br />
A special case arises when we observe the region around the equilibrium and notice how half of the region is unstable and the other half is unstable. In this case, the equilibrium is called a saddle point. The eigenvalues for this case are of opposite sign, one is positive and the other negative. Hence the eigenvalues must also be real, since complex eigenvalues cannot have different real components (''trA'' is fixed). The arms race example is a great example of a saddle point. Observe that at the origin, the vectors from quadrant II and IV seem to be stable while the vectors from quadrant I and III seem to be unstable. Regardless of how half the vector field seems to be stable, we still characterize this case as unstable. Remember how in finding the limits of our solution, the result reached infinity. While the part of the expression with the negative eigenvalue converged to a number, the other part went to infinity, forcing the entire system to infinity. Thus the only way for a saddle point system to be stable is if the initial condition is a scalar multiple of the negative eigenvalue's eigenvector. Unlike the previous few cases, ''trA'' has no obvious restriction. We split this into 3 cases: ''trA'' < 0, ''trA'' = 0, ''trA'' > 0.<br />
<br />
'''Case 1 (''trA'' < 0)'''<br />
<br />
λ<sub>2</sub> is always negative, so we focus on making λ<sub>1</sub> positive. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} \left( trA + \sqrt{(trA)^2 - 4detA} \right) > 0 </math><br />
<br />
:<math> \sqrt{(trA)^2 - 4detA} > -tA </math> <br />
<br />
:<math> (trA)^2 - 4detA > (trA)^2 </math> (Squared both sides. Since -''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 1 is ''detA'' < 0.<br />
<br />
'''Case 2 (''trA'' = 0)'''<br />
<br />
We rewrite λ<sub>1</sub> and λ<sub>2</sub> taking into account ''trA'' = 0. <br />
<br />
:<math> \lambda_1 = \frac{1}{2} sqrt{-4detA} </math><br />
<br />
:<math> \lambda_2 = -\frac{1}{2} sqrt{-4detA} </math><br />
<br />
We need real numbers, so ''detA'' = 0. With that condition, λ<sub>1</sub> is automatically positive and λ<sub>2</sub> is automatically negative. Thus the only condition for case 2 is once again ''detA'' < 0.<br />
<br />
'''Case 3 (''trA'' > 0)'''<br />
<br />
λ<sub>1</sub> is always positive, so we focus on making λ<sub>2</sub> negative.<br />
<br />
:<math> \lambda_2 = \frac{1}{2} \left( trA - \sqrt{(trA)^2 - 4detA} \right) < 0 </math><br />
<br />
:<math> trA < \sqrt{(trA)^2 - 4detA} </math> <br />
<br />
:<math> (trA)^2 < (trA)^2 - 4detA </math> (Squared both sides. Since ''trA'' is positive, we do not need to change sign.)<br />
<br />
:<math> detA < 0 </math><br />
<br />
The only condition for case 3 is ''detA'' < 0. <br />
<br />
<br />
Thus the only condition to create a saddle point is ''detA'' < 0.<br />
<br />
===Conclusion===<br />
<br />
We summarize our findings here. The conditions for each case is listed below.<br />
<br />
Stable System<br />
:*Asymptotically stable: ''detA'' > 0 and ''trA'' < 0.<br />
:*Neutrally stable: ''detA'' > 0 and ''trA'' = 0.<br />
<br />
Unstable<br />
:*No saddle point: ''detA'' > 0 and ''trA'' > 0.<br />
:*With saddle point: ''detA'' < 0. <br />
<br />
We can use a graph to summarize all our results.<br />
<br />
[[Image:Capture.JPG|thumb|Figure 5|700px|center]]<br />
<br />
From the image, we see that all of the positive stability cases is covered. The image was actually more specific than us, breaking asymptotically stable and unstable with no saddle point into real and complex eigenvalues. This is not too challenging; just set the expression under the square root for λ<sub>1</sub> and λ<sub>2</sub> to less than zero for complex eigenvalues or greater than zero for real eigenvalues. <br />
<br />
==The More Rigorous Proof==<br />
{{SwitchPreview|HideMessage=Click here to hide the more rigorous proof.|ShowMessage=Click here to show the more rigorous proof.<br />
|PreviewText=Requires a competent understanding of infinite series, Taylor Series, and Matrix algebra.|FullText=<br />
We have mentioned above that since the one-dimensional case is <math>u=u_0 e^{at}</math> for initial condition ''u''<sub>0</sub>, the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. Using [[Taylor Series]], we define<br />
<br />
:<math>e^A = \sum_{n=0}^{\infty}\frac{A^n}{n!}</math> for a square ''k''x''k'' matrix ''A''. Note: ''A''<sup>0</sup> = ''I''. <br />
<br />
Now we have to show that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>:<br />
<br />
:<math>\begin{align} <br />
\vec{u}' = \frac{d}{dt} (e^{tA} \vec{u}_0) & = \frac{d}{dt} \left( \left(\sum_{n=0}^{\infty}\frac{tA^n}{n!} \right) \vec{u}_0 \right) \\<br />
& = \left( \frac{d}{dt}\sum_{n=0}^{\infty}\frac{t^nA^n}{n!} \right)\vec{u}_0 \text{ (}\vec{u}_0 \text{ is a constant)} \\<br />
& = \left( \sum_{n=0}^{\infty} \frac{d}{dt} \left( \frac{A^n}{n!} \right) \right) \vec{u}_0 \\<br />
& = \left( \sum_{n=1}^{\infty}\frac{n t^{n-1} A^n}{n!} \right) \vec{u}_0 \text{ (Note the index change)} \\ <br />
& = \left( A \sum_{n=1}^{\infty} \frac{t^{n-1}A^{n-1}}{(n-1)!} \right) \vec{u}_0 \\<br />
& = \left( A \sum_{j=0}^{\infty} \frac{(tA)^j}{j!} \right) \vec{u}_0 \\<br />
& = Ae^{tA} \vec{u}_0 = A \vec{u} \quad \blacksquare<br />
\end{align} </math>.<br />
<br />
So we know that <math>\vec{u} = e^{tA}\vec{u}_0</math> solves <math>\vec{u}'=A\vec{u}</math>. But what does <math>e^{tA}\vec{u}_0</math> mean? We use diagonalization. If the sum of the dimensions of a square [[Matrix|matrix]] ''A'''s eigenspaces is equal to dim(''A''), then we can write ''A'' as <math>A=PLP^{-1}</math>, where ''P'' has the eigenvectors of ''A'' as its columns and ''L'' is a diagonal matrix with the eigenvalues of ''A'' as its diagonal entries. The eigenvalues of ''A'' in ''L'' must match up with the eigenvectors in ''P'', meaning that if we choose a random eigenvector/column (say this is the ''k''<sup>th</sup> eigenvector/column) of ''P'', then the eigenvalue in the ''k''<sup>th</sup> column of ''L'' must correspond to that eigenvector. Let us first consider ''e<sup>tA</sup>''. <br />
<br />
:<math> \begin{align} e^{tA} = e^{t(PLP^{-1})} = e^{P(tL)P^{-1}} &= \sum_n \frac{(PtLP^{-1})^n}{n!} \\<br />
&= \sum_n \frac{P(tL)^nP^{-1}}{n!} \text{ (} (PLP^{-1})^n = P(L)^nP^{-1} \text{ is a property of diagonalization.)} \\<br />
&= P \left(\sum_n \frac{(tL)^n}{n!} \right) P^{-1} \\<br />
&= P \left(\sum_n \begin{bmatrix} (\lambda_1 t)^n/n! & & & \\ & (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & (\lambda_k t)^n/n! \end{bmatrix} \right) P^{-1} \\<br />
&= P \begin{bmatrix} \displaystyle\sum\limits_{n} (\lambda_1 t)^n/n! & & & \\ & \displaystyle\sum\limits_{n} (\lambda_2 t)^n/n! & & \\ & & \ddots & \\ & & & \displaystyle\sum\limits_{n} (\lambda_k t)^n/n! \end{bmatrix} P^{-1} \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1} \text{ (Remember Taylor Series.)}<br />
\end{align} </math><br />
<br />
Before we continue, consider <math>P^{-1}\vec{u}_0</math>. Remember in solving the two dimensional case, we made up constants ''c''<sub>1</sub> and ''c''<sub>2</sub> to satisfy the initial condition. For this more rigorous proof, we define<br />
<br />
:<math> \vec{c} = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_k \end{bmatrix} </math>.<br />
<br />
We solve for the constants by knowing that <math>P \vec{c} = \vec{u}_0 </math>, so <math>\vec{c} = P^{-1} \vec{u}_0</math>. Thus<br />
<br />
:<math> \begin{align} e^{tA}\vec{u}_0 &= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} P^{-1}\vec{u}_0 \\<br />
&= P \begin{bmatrix} e^{\lambda_1 t} & & & \\ & e^{\lambda_2 t} & & \\ & & \ddots & \\ & & & e^{\lambda_k t} \end{bmatrix} \vec{c} \\<br />
&= P \begin{bmatrix} c_1 e^{\lambda_1 t} \\ c_2 e^{\lambda_2 t} \\ \vdots \\ c_k e^{\lambda_k t} \end{bmatrix} = \sum_{i=1}^k c_i e^{\lambda_i t} \vec{v}_i \text{ .} \end{align} </math><br />
<br />
When ''k'' = 2, note that this final expression expands into our two dimensional general solution. Thus the solution to any system of differential equations that can be written in the form <math> \vec{u}' = A\vec{u} </math> is a linear combination of exponential functions with the eigenvectors and eigenvalues of ''A''. }}<br />
<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Systems_of_Linear_Differential_Equations&diff=38559Systems of Linear Differential Equations2013-07-26T14:50:12Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=U.S. and Soviet Union nuclear warheads<br />
|Image=Nuclear.JPG<br />
|ImageIntro=Differential equations have always been a popular research topic due to their various applications. A system of linear differential equations is no exception; it can be used to model arms races, simple predator prey models, and more.<br />
|ImageDescElem=In 1945, the United States dropped atomic bombs on the Japanese cities Hiroshima and Nagasaki, ending World War II and establishing itself as a new superpower. The Soviet Union, while an ally of the United States during WWII, feared the bomb and spent the next few years developing their own atomic bomb, finally detonating their first nuclear weapon in 1949. This marked the beginning of a long and expensive arms race between the two powers. The competition for nuclear might, along with the countries' different ideologies (communism vs. capitalism), caused a political and psychological war during the second half of the 20th century, now known as the Cold War. During this period, both powers invested tremendous resources into their technology and weaponry, worried that the other was pulling ahead.<br />
<br />
We will attempt to build a simple model to see the effects of the nuclear arms race. What type of model would fit best? Consider these two images.<br />
<br />
[[Image:US_spending.JPG|thumb|Figure 1|700px|center]] [[Image:Soviet_spending.JPG|thumb|Figure 2|700px|center]]<br />
<br />
Note that, starting in 1947, the Soviet Union rapidly increased its defense spending (Figure 2). The United States responded in kind beginning in 1948 (Figure 1). From that point on, the spending of the two powers pushed and pulled, staying within a fairly narrow range (the two higher points of United States defense spending around 1953 and 1968 are related to the Korean and Vietnam Wars). These fluctuating changes are connected with each power's analysis of both its own defense spending and that of the other power. The more the United States is already spending on defense, the less willing it is to spend on defense the following year. However, the more the Soviet Union spends on defense, the more likely the United States will be to increase its defense spending to not be left behind. With this dynamic, we can analyze the defense spending of each country by analyzing the '''change''' in defense spending from year to year. Since derivatives are the mathematical tool to analyze change, we will build our model around derivatives. <br />
<br />
Let ''x''(''t'') and ''y''(''t'') be the defense spending of the United States and the Soviet Union respectively at time ''t'' (in years). Then ''x''′(''t'') is the derivative of ''x'' over ''t'' and it represents how much the U.S. spending changes over ''t'' years. Likewise, ''y''′(''t'') is the derivative of ''y'' over ''t'' and it represents how much the Soviet spending changes over ''t'' years. As mentioned above, the rate of U.S. defense spending depends negatively on its current defense spending and positively on the Soviet Union's current defense spending. Correspondingly, the rate of Soviet defense spending depends negatively on its current defense spending and positively on the United States's current defense spending. The model's starting point is the year in which the arms race started, when ''t'' = 0. Let ''x''<sub>0</sub> and ''y''<sub>0</sub> be the ''initial''(''t'' = 0) defense spending of the United States and the Soviet Union respectively The following equations fit these conditions.<br />
<br />
:<math>x'(t) = ax(t) + by(t)\quad\quad\quad x(0) = x_0 </math> , where ''a'' is negative and ''b'' is positive.<br />
:<math>y'(t) = cx(t) + dy(t)\quad\quad\quad\, y(0) = y_0 </math> , where ''c'' is positive and ''d'' is negative.<br />
<br />
This is a linked system of first order linear differential equations. In other words, equation ''x''′(''t'') states that the United States lowers its budget by ''a'' dollars for every dollar it spent the previous year, and raises it by ''b'' dollars for every dollar in the Soviet Union's budget. Equation ''y''′(''t'') states that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget.<br />
<br />
Note: We must use our model with a degree of skepticism because there are far more factors affecting the arms race than just the two countries' defense spending, such as available money/resources and the spending requirements of other important programs. Nevertheless, our model is useful for analyzing the general outline of the Cold War arms race and predicting its outcomes. <br />
<br />
===Introduction to Systems of Linear Differential Equations===<br />
We clarify a few '''terms''':<br />
<br />
*A '''differential equation''' is an equation that contains both function(s) and their derivatives.<br />
*A''' ''n<sup>th<sup>'' order''' differential equation only involves up to the ''n<sup>th</sup>'' derivative of any function.<br />
*A '''linked system''' of differential equations has at least one equation that involves different functions or different derivatives of functions. <br />
*The expressions of '''linear equations''' are [http://en.wikipedia.org/wiki/Linear_combinations linear combinations] of functions. <br />
<br />
Each equation in our system is a linear combination of functions ''x''(''t'') and ''y''(''t'') and both have one derivative of either ''x'' or ''y''. Hence we have a linked system of first order linear differential equations. <br />
<br />
We can use eigentheory to solve for any system of first order linear differential equations. Indeed, the outcome of our nuclear arms race model depends on the eigenvalues (read the More Mathematical Explanation for details).<br />
|ImageDesc===Solving the Two Dimensional System==<br />
In order to understand how a system of linear differential equations is useful in making sense of the Cold War Arms Race, we first need to understand the general system.<br />
<br />
The general system of linear differential equations in two dimensions is<br />
<br />
:<math>x'(t) = ax(t) + by(t) \quad\quad\quad x(0) = x_0 </math><br />
:<math>y'(t) = cx(t) + dy(t) \quad\quad\quad\, y(0) = y_0 </math>.<br />
<br />
Since we are solving the general system, the coefficients ''a'', ''b'', ''c'', and ''d'' are elements of ALL numbers (including imaginary numbers). <br />
<br />
We can write this system with [[Matrix|matrices]] in the form<br />
<br />
:<math>\vec{u}'=A\vec{u}</math>, where <math>A=\begin{bmatrix} a & b \\ c & d \end{bmatrix}</math>, <math>\vec{u} = \begin{bmatrix} x \\ y \end{bmatrix}</math>, and <math>\vec{u}' = \begin{bmatrix} x' \\ y' \end{bmatrix}</math>.<br />
<br />
In order to gain an understanding on how to solve this equation, we consider the one dimensional case.<br />
<br />
===The One Dimensional Case===<br />
If the two dimensional case involved the equation :<math>\vec{u}' = A\vec{u}</math> with ''A'' a 2x2 matrix, then the ''A'' in the equation of the one dimensional case must be a 1x1 matrix, or just a constant. Consequently, <math> \vec{u} </math> will actually be ''u'' instead; it is no longer a vector. Hence the one dimensional equation is<br />
<br />
:<math>u' = ku</math>, where ''k'' is a real number. <br />
<br />
Solving this requires basic knowledge of calculus. We can write this as<br />
<br />
:<math>u' = \frac{du}{dt} = ku</math> (remember that ''u'' is a function of ''t'')<br />
:<math>\frac{1}{u} du = kdt </math> (rearranged variables).<br />
<br />
Integrate both sides:<br />
<br />
:<math>\int \frac{1}{u} du = \int kdt</math><br />
<br />
:<math>ln(u) = kt + c </math> <br />
:<math>e^{ln(u)} = e^{kt+c} </math><br />
:<math>u = e^{kt}e^{c} </math><br />
:<math>u = Ce^{kt}</math>. (So ''C'' = ''e<sup>c</sup>''.)<br />
<br />
Now we can apply the initial condition. Note that<br />
<br />
:<math>u(0) = C(1) = C</math>, so ''u''(0) = ''C''.<br />
<br />
Thus the solution to the one dimensional case is <br />
<br />
:<math>u(t) = u_0e^{kt}</math>.<br />
<br />
===Back to the Two Dimensional System===<br />
<br />
We can make some connections between the one and two dimensional system. We see that ''A'' in the two dimensional case is like the ''k'' in the one dimensional case. The initial condition is also a vector instead of a scalar. Thus the solution to the one dimensional case suggests that the solution to our system is <math>\vec{u}(t) = e^{At}\vec{u}_0</math>. We will explore the concept of raising ''e'' to a matrix later. Since the solution to the one dimensional case is ''u'' = ''Ce<sup>kt</sup>'', a good guess of the solution to the two dimensional case is <math> \vec{u}(t) = e^{\lambda t} \vec{v} </math> for some λ and <math>\vec{v}</math>. This seemingly random equation will start to make sense once we plug our guess into the original equations and find λ and <math>\vec{v}</math> that work. We write <math> \vec{v} = \begin{bmatrix} p \\ q \end{bmatrix} </math>.<br />
<br />
We verify our guess by plugging it into our original system:<br />
<br />
:<math> p \lambda e^{\lambda t} = x'(t) = ap e^{\lambda t} + bq e^{\lambda t} </math><br />
:<math> q \lambda e^{\lambda t} = y'(t) = cp e^{\lambda t} + dq e^{\lambda t} </math><br />
<br />
After we divide by ''e<sup>λt</sup>'' (which is never 0), we can rewrite our system as <math> \lambda \vec{v} = A \vec{v}</math>. Thus, our guess is correct if and only if λ is an [[Eigenvalues and Eigenvectors|eigenvalue]] and <math> \vec{v} </math> is an [[Eigenvalues and Eigenvectors|eigenvector]] of ''A''. <br />
<br />
Now we must account for the fact that a 2x2 matrix can have two eigenvalues λ<sub>1</sub> and λ<sub>2</sub>. Since differentiation is a linear operator, we know that the solution to our system is linear. We write the general solution as a linear combination<br />
<br />
:<math> \vec{u} = e^{\lambda_1 t} \vec{v}_1 + e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We now apply our initial condition. When ''t'' = 0, our general solution becomes<br />
<br />
:<math> \vec{u}(0) = \vec{v}_1 + \vec{v}_2 </math>.<br />
<br />
It is rare that <math> \vec{v}_1 </math> and <math> \vec{v}_2 </math> add up to the initial condition, so how do we solve this? Ideally, we multiply the two vectors by real number constants ''c''<sub>1</sub> and ''c''<sub>2</sub>, but we must check that this still works for our system. <br />
<br />
{{SwitchPreview|HideMessage=Click here to hide the verification!|ShowMessage=Click here to show the verification!<br />
|PreviewText=|FullText=<br />
By multiplying constants to each term of our solution expression, our new proposed solution is <br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
We verify this by plugging into our matrix equation <math>\vec{u} = A\vec{u}</math>.<br />
<br />
:<math> \begin{align} \vec{u}' &= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \\<br />
&= A\vec{u} = A(c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2) \\<br />
&= A(c_1 e^{\lambda_1 t} \vec{v}_1) + A(c_2 e^{\lambda_2 t} \vec{v}_2) \text{ (Matrix multiplication is distributive.)} \\<br />
&= c_1 e^{\lambda_1 t} (A \vec{v}_1) + c_2 e^{\lambda_2 t} (A \vec{v}_2) \text{ (Scalars pass through.)} \\<br />
&= c_1 e^{\lambda_1 t} (\lambda_1 \vec{v}_1) + c_2 e^{\lambda_2 t} (\lambda_2 \vec{v}_2) \\<br />
&= \lambda_1 c_1 e^{\lambda_1 t} \vec{v}_1 + \lambda_2 c_2 e^{\lambda_2 t} \vec{v}_2 \quad \blacksquare<br />
\end{align} </math><br />
<br />
In fact, multiplying constants to the terms is equivalent to finding a linear combination of our basis vectors <math>e^{\lambda_1 t} \vec{v}_1</math> and <math>e^{\lambda_2 t} \vec{v}_2</math>. Remember that differentiation is a linear transformation, so the linear combinations of existing solutions are naturally solutions as well. }}<br />
<br />
Now that we have a more refined general solution, we need to know how to solve for the constants. Our initial condition now becomes <br />
<br />
:<math> \vec{u}(0) = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} = c_1\begin{bmatrix} p_1 \\ q_1 \end{bmatrix} + c_2\begin{bmatrix} p_2 \\ q_2 \end{bmatrix} </math>.<br />
<br />
We can rewrite this as<br />
<br />
:<math> \begin{bmatrix} p_1 & p_2 \\ q_1 & p_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} </math>, which can be solved using Gaussian elimination. <br />
<br />
Thus we have our particular solution for any initial condition. With the constants solvable, our general solution is<br />
<br />
:<math> \vec{u} = c_1 e^{\lambda_1 t} \vec{v}_1 + c_2 e^{\lambda_2 t} \vec{v}_2 </math>.<br />
<br />
==Arms Race Example==<br />
We will solve a system that follows the rules of our arms race model. Since the real Cold War arms race is hard to model, we will make assumptions on the actions of the United States and the Soviet Union. Assume that the United States lowers its budget by 3 dollars for every dollar it spent the previous year, and raises it by 6 dollars for every dollar in the Soviet Union's budget. Further assume that the Soviet Union lowers its budget by ''d'' for every dollar it spent the previous year, and raises it by ''c'' dollars for every dollar in the United States's budget. Finally assume that the United States defense spending is 130 billion dollars and the Soviet Union defense spending is 150 billion dollars at ''t'' = 0.<br />
<br />
:<math>x'(t) = -3x(t) + 6y(t) \quad\quad\quad x(0)=13</math><br />
:<math>y'(t) = 5x(t) - 2y(t) \quad\quad\quad\;\;\; y(0)=15</math>.<br />
<br />
All of the constants are made up. The values of ''x'' and ''y'' are in tens of billions of dollars.<br />
<br />
We can rewrite this as<br />
:<math> \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} -3 & 6 \\ 5 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} </math>.<br />
<br />
To find the eigenvalues of ''A'', remember that λ is an eigenvalue if and only if the determinant of (''A'' - λ''I'') is 0:<br />
<br />
:<math> \begin{align}<br />
|other=Linear Algebra, High school algebra, Single Variable Calculus<br />
|Field=Calculus<br />
|Field2=Dynamic Systems<br />
|WhyInteresting=We have shown how linear differential equations are highly applicable. They can model basic arms races and Hooke's law with a high degree of accuracy. We can use linear differential equations for any system that has derivatives and functions written in linear combinations of one another. Some include heat flow, bank interest, basic predator-prey models, and population through time. Through the Hooke's law case, we saw that our method for solving linear differential equations also works for second order equations. In fact, we can write any ''k'' order differential equation as a system of ''k'' first-order differential equations. <br />
<br />
Even if we ignore their applicability, linear differential equations are fascinating topics to study. They help show how differentiation is a linear transformation by writing the system as a matrix equation and deriving a linear combination as the solution. Furthermore, they emphasize the importance of eigentheory. Without eigentheory, we could have solved the equations, much less determine the stability of our system. Eigentheory is not just a matrix stretching or shrinking a vector, it contains one of the core ideas of linear algebra - scalar multiplication. Coupled with the other core idea of linear algebra, linear combinations, eigentheory is an essential tool for linear algebra and all of mathematics.<br />
|References=<references /><br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Talk:Pythagorean_Tree&diff=38547Talk:Pythagorean Tree2013-07-26T14:14:37Z<p>Xtian1: </p>
<hr />
<div>=Checklist for writing pages=<br />
Completed by --[[User:Xtian1|Xtian1]] 10:14, 26 July 2013 (EDT)<br />
<br />
==Messages to the Future==<br />
*If someone can actually show what the limit of the area of the entire tree is, then please do it.<br />
*If someone can explain more about perimeter and derive more math, then please do it.<br />
<br />
==References and Footnotes==<br />
*Not applicable for this page.<br />
<br />
==Good writing==<br />
===Context===<br />
*The title image is interesting and the concept is pretty cool.<br />
<br />
===Quality of prose and page structuring===<br />
*Section title or first few sentences explain what section is about.<br />
*Each section is relevant.<br />
<br />
===Integration of Images and Text===<br />
*Images are referred to.<br />
<br />
===Connections to Other Mathematical Topics===<br />
*Explained relationship to Pythagorean theorem. Besides that not many other connections.<br />
<br />
===Examples, Calculations, Applications, Proofs===<br />
*Numerical examples provided.<br />
*Proofs and relationship to Pythagorean theorem established.<br />
<br />
===Mathematical Accuracy and Precision of Language===<br />
*All math is free of error (to my knowledge).<br />
*Tone is casual while still maintaining some rigor (well I tried to make this as beginning high school level as I could).<br />
*No new terms really show up.<br />
<br />
===Layout===<br />
*Text is in short paragraphs and images are distributed throughout.<br />
*No awkward chunks of white space.<br />
*Text wrapping doesn't cause problems.<br />
*Images are in the correct location of the page.<br />
*Viewed in different window sizes and saw no problems.<br />
<br />
=Older Comments=<br />
{{Hide|1=<br />
<font color=red>Hello John and Enri,<br />
<br />
Hope you two are having a relaxing summer break. I have a few suggestions for the page:<br />
<br />
: '''Image and Image Description (at the very top)'''<br />
<br />
::* I really like how you created your own image for the page. Most people just copy and paste from some website.<br />
::* In the image description, mention how the fractal has a starting point (the starting square) and how it is constructed in a particular order. <br />
::* In the image description at the very top, say “The space between the squares is a right triangle” rather than “The space between the squares in each iteration creates a right triangle”. <br />
<br />
: '''Basic Description'''<br />
<br />
::* Nice job on creating the gif! If you have the time, try to crop the gif so that only the Pythagorean Tree is there (not the surrounding window. This just makes it look prettier. Since GSP sucks at making gifs, I suggest drawing a large rectangle in GSP that surrounds the entire Tree. You can use this rectangle to crop the images to create a smooth gif. If you need help, just let me know. <br />
::* Mainly watch out for verboseness (examples below).<br />
::* 2nd sentence: Write “The hypotenuse of the triangle is directly connected to the square” instead of “The hypotenuse of the triangle must always be the one that is directly connected to the square”. <br />
::* 3rd sentence: Write “the legs of it” rather than the “legs of said triangle”.<br />
::* 4th sentence: Write “so the area of each new square is less than the area of the old square” instead of “so the square are smaller than the big one”.<br />
::* Remove the 7th sentence: “When the angles of the triangle are changed, one is made bigger, and the other is made smaller.” <br />
::* Change the 8th to the last sentence from “so the sides change too” to “so changing the angle changes the side”.<br />
<br />
: '''A More Mathematical Explanation'''<br />
<br />
:: Visual Suggestions<br />
<br />
:::* Whenever you write expressions and equations outside of the math environment, make sure to only italicize the variables; don’t italicize numbers. For instance, make sure the 2 superscript in ''s''<sup>2</sup> is not in the italics; in other words put the '' only around the ''s''. This change applies to numerical constants as well (0.5''s'' rather than ''0.5s''). <br />
:::* For the sines and cosines, write them in the math environment as \sin or \cos rather than just typing sin or cos. <br />
:::* Whenever you multiply a constant to sine or cosine, you don’t need the * between it. If you make the previous fix, then the sin and cos will look different enough from the normal math environment letters that the reader won’t be confused.<br />
:::* Fix the equation Proxy-Connection : keep-aliveCache...<br />
:::* Crop out the white spaces surrounding the bottom 3 images. I suggest you place the images as thumbnails to the right or left so the text will curve around it. Let me know if you need help.<br />
:::* This is just a personal thing of mine. I just don’t like how the * looks anywhere; I prefer parenthesis, brackets, or even the center dot far more. If both of you are fine with how it looks, then leave it.<br />
<br />
:: Content Suggestions<br />
<br />
:::* At the start of the mathematical explanation, rewrite the proof of how the sum of the area of the smaller squares equals the area of the larger square. You start with the Pythagorean Theorem, then show proving it is related to it. Instead, try to start with deriving the sides of the squares first (express ''a'' and ''b'' in terms of ''θ'' and ''s''), then showing how the sum of the areas is equal to the area of the larger square. THEN state how the Pythagorean Theorem is related to all this. <br />
:::* When you talk about finding the general equation of the area for any iterations and give examples about it, remember to put () around ''n'' + 1 since you’re multiplying ''s''<sup>2</sup> by that entire number (order of operations). <br />
:::* You should write your NOTE: (right under the second to last image) under the derivation of the general equation because it’s an assumption of the equation.<br />
:::* When you talked about the perimeter of the 45-45-90 case, I didn’t see any mentioning of the perimeter; I only saw discussion of the side length. While the side length is a necessary topic to discuss, it’s not enough to convincingly derive an equation of the perimeter for any number of iterations. <br />
:::* Try to derive the surface area for any iteration. It isn’t easy, so it might take a while. If you don’t want/can’t do it, let me know.<br />
<br />
Finally, I see two main options for the '''history of the tree''':<br />
<br />
1. Expand on it and make it a new section (history of something is not part of a more mathematical explanation).<br />
<br />
2. Remove it.<br />
<br />
That’s it for now. Great job on the page so far, and good luck.<br />
<br />
--[[User:Xtian1|Xintong Tian]] 11:50, 2 July 2013 (EDT)</font>}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38543Pythagorean Tree2013-07-26T12:46:06Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean trees.<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': Area of <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': Area of <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A<sub>n</sub>'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations. This method of finding the area does not consider the triangles in between the squares. We consider those triangles as empty spaces.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|100px|left]]<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|200px|right]]<br />
<br />
As you can see in Figure 2, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
For the first iteration as shown in Figure 3, the 0th iteration had one square with area ''s''<sup>2</sup>, and the new iteration had two squares. As we mentioned before, the sum of the smaller squares' areas would be equal to the area of the original square, so ''s''<sup>2</sup> + ''s''<sup>2</sup> = 2''s''<sup>2</sup>. We now use our formula to confirm this. <br />
<br />
::<math> A_2 = s^2 (1 + 1) = 2s^2 </math><br />
<br />
We can use this formula for only a small amount of iterations. Why? Look at the title image. After a few iterations, the tree starts to overlap and the area of the entire tree starts to converge to a single value. However, our formula implies that if we have infinite iterations, then our tree will have infinite area. Thus while our formula is useful for applying the area relationship per iteration, it is not an all powerful tool we can use to calculate the area for any amount of iterations.<br />
<br />
===Perimeter Relationship between iterations===<br />
We will attempt to find a relationship between the perimeters of squares from consequent iterations. Figure 1 will be used as a visual guide. We have the side lengths of all the squares.<br />
<br />
:Square ''ABCD'': Side length of ''s''.<br />
<br />
:Square ''CFHG'': Side length of <math>s \cos (\theta_1)</math>.<br />
<br />
:Square ''DFIJ'': Side length of <math>s \sin (\theta_1)</math>.<br />
<br />
The perimeter of a square is just its side length multiplied by 4. Thus we have our perimeters.<br />
<br />
:Square ''ABCD'': Perimeter of <math>4s</math>.<br />
<br />
:Square ''CFHG'': Perimeter of <math>4s \cos (\theta_1)</math>.<br />
<br />
:Square ''DFIJ'': Perimeter of <math>4s \sin (\theta_1)</math>.<br />
<br />
It seems that unlike area, there is no simple relationship between the perimeters of the squares. Multiplying, adding, dividing, and subtracting any of the perimeters from other values don't seem to work. This is common in mathematics. While some topics have very interesting applications and properties (like the area), other topics have no connections and seem obscure. <br />
<br />
The lack of a simple relationship between perimeters makes creating a general formula for the tree's perimeter very challenging. However, the one factor that truly makes creating the general formula challenging can be observed in the title image. The perimeter of the tree isn't just the sum of the perimeters of all the squares. The layout of the tree forces only the outer sides of most squares to be counted. We can already see this phenomenon in Figure 3 for the first iteration. If we were to calculate the perimeter of the first iteration, we would not count the inner sides of any of the squares. The situation only worsens as we continue to further iterations. Thus we will not derive a general formula for the tree's perimeter here.<br />
|other=Basic Algebra, Geometry, and Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Geometry<br />
|Field2=Fractals<br />
|WhyInteresting=The Pythagorean Tree is a good example of making interesting shapes with recursive fractals. The relationship for area between iterations gives the tree its name; it is the same equation as the Pythagorean theorem! The lack of a nice equation and relationship for perimeter shows how mathematics is not always beautiful and interesting.<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38542Pythagorean Tree2013-07-26T12:45:13Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean trees.<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': Area of <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': Area of <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A<sub>n</sub>'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations. This method of finding the area does not consider the triangles in between the squares. We consider those triangles as empty spaces.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|100px|left]]<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|200px|right]]<br />
<br />
As you can see in Figure 2, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
For the first iteration as shown in Figure 3, the 0th iteration had one square with area ''s''<sup>2</sup>, and the new iteration had two squares. As we mentioned before, the sum of the smaller squares' areas would be equal to the area of the original square, so ''s''<sup>2</sup> + ''s''<sup>2</sup> = 2''s''<sup>2</sup>. We now use our formula to confirm this. <br />
<br />
::<math> A_2 = s^2 (1 + 1) = 2s^2 </math><br />
<br />
We can use this formula for only a small amount of iterations. Why? Look at the title image. After a few iterations, the tree starts to overlap and the area of the entire tree starts to converge to a single value. However, our formula implies that if we have infinite iterations, then our tree will have infinite area. Thus while our formula is useful for applying the area relationship per iteration, it is not an all powerful tool we can use to calculate the area for any amount of iterations.<br />
<br />
===Perimeter Relationship between iterations===<br />
We will attempt to find a relationship between the perimeters of squares from consequent iterations. Figure 1 will be used as a visual guide. We have the side lengths of all the squares.<br />
<br />
:Square ''ABCD'': Side length of ''s''.<br />
<br />
:Square ''CFHG'': Side length of <math>s \cos (\theta_1)</math>.<br />
<br />
:Square ''DFIJ'': Side length of <math>s \sin (\theta_1)</math>.<br />
<br />
The perimeter of a square is just its side length multiplied by 4. Thus we have our perimeters.<br />
<br />
:Square ''ABCD'': Perimeter of <math>4s</math>.<br />
<br />
:Square ''CFHG'': Perimeter of <math>4s \cos (\theta_1)</math>.<br />
<br />
:Square ''DFIJ'': Perimeter of <math>4s \sin (\theta_1)</math>.<br />
<br />
It seems that unlike area, there is no simple relationship between the perimeters of the squares. Multiplying, adding, dividing, and subtracting any of the perimeters from other values don't seem to work. This is common in mathematics. While some topics have very interesting applications and properties (like the area), other topics have no connections and seem obscure. <br />
<br />
The lack of a simple relationship between perimeters makes creating a general formula for the tree's perimeter very challenging. However, the one factor that truly makes creating the general formula challenging can be observed in the title image. The perimeter of the tree isn't just the sum of the perimeters of all the squares. The layout of the tree forces only the outer sides of most squares to be counted. We can already see this phenomenon in Figure 3 for the first iteration. If we were to calculate the perimeter of the first iteration, we would not count the inner sides of any of the squares. The situation only worsens as we continue to further iterations. Thus we will not derive a general formula for the tree's perimeter here.<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|WhyInteresting=The Pythagorean Tree is a good example of making interesting shapes with recursive fractals. The relationship for area between iterations gives the tree its name; it is the same equation as the Pythagorean theorem! The lack of a nice equation and relationship for perimeter shows how mathematics is not always beautiful and interesting.<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38541Pythagorean Tree2013-07-26T12:40:41Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean trees. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': Area of <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': Area of <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A<sub>n</sub>'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations. This method of finding the area does not consider the triangles in between the squares. We consider those triangles as empty spaces.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|100px|left]]<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|200px|right]]<br />
<br />
As you can see in Figure 2, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
For the first iteration as shown in Figure 3, the 0th iteration had one square with area ''s''<sup>2</sup>, and the new iteration had two squares. As we mentioned before, the sum of the smaller squares' areas would be equal to the area of the original square, so ''s''<sup>2</sup> + ''s''<sup>2</sup> = 2''s''<sup>2</sup>. We now use our formula to confirm this. <br />
<br />
::<math> A_2 = s^2 (1 + 1) = 2s^2 </math><br />
<br />
We can use this formula for only a small amount of iterations. Why? Look at the title image. After a few iterations, the tree starts to overlap and the area of the entire tree starts to converge to a single value. However, our formula implies that if we have infinite iterations, then our tree will have infinite area. Thus while our formula is useful for applying the area relationship per iteration, it is not an all powerful tool we can use to calculate the area for any amount of iterations.<br />
<br />
===Perimeter Relationship between iterations===<br />
We will attempt to find a relationship between the perimeters of squares from consequent iterations. Figure 1 will be used as a visual guide. We have the side lengths of all the squares.<br />
<br />
:Square ''ABCD'': Side length of ''s''.<br />
<br />
:Square ''CFHG'': Side length of <math>s \cos (\theta_1)</math>.<br />
<br />
:Square ''DFIJ'': Side length of <math>s \sin (\theta_1)</math>.<br />
<br />
The perimeter of a square is just its side length multiplied by 4. Thus we have our perimeters.<br />
<br />
:Square ''ABCD'': Perimeter of <math>4s</math>.<br />
<br />
:Square ''CFHG'': Perimeter of <math>4s \cos (\theta_1)</math>.<br />
<br />
:Square ''DFIJ'': Perimeter of <math>4s \sin (\theta_1)</math>.<br />
<br />
It seems that unlike area, there is no simple relationship between the perimeters of the squares. Multiplying, adding, dividing, and subtracting any of the perimeters from other values don't seem to work. This is common in mathematics. While some topics have very interesting applications and properties (like the area), other topics have no connections and seem obscure. <br />
<br />
The lack of a simple relationship between perimeters makes creating a general formula for the tree's perimeter very challenging. However, the one factor that truly makes creating the general formula challenging can be observed in the title image. The perimeter of the tree isn't just the sum of the perimeters of all the squares. The layout of the tree forces only the outer sides of most squares to be counted. We can already see this phenomenon in Figure 3 for the first iteration. If we were to calculate the perimeter of the first iteration, we would not count the inner sides of any of the squares. The situation only worsens as we continue to further iterations. Thus we will not derive a general formula for the tree's perimeter here. <br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38540Pythagorean Tree2013-07-26T12:16:07Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean trees. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A<sub>n</sub>'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations. This method of finding the area does not consider the triangles in between the squares. We consider those triangles as empty spaces.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|100px|left]]<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|200px|right]]<br />
<br />
As you can see in Figure 2, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
For the first iteration as shown in Figure 3, the 0th iteration had one square with area ''s''<sup>2</sup>, and the new iteration had two squares. As we mentioned before, the sum of the smaller squares' areas would be equal to the area of the original square, so ''s''<sup>2</sup> + ''s''<sup>2</sup> = 2''s''<sup>2</sup>. We now use our formula to confirm this. <br />
<br />
::<math> A_2 = s^2 (1 + 1) = 2s^2 </math><br />
<br />
We can use this formula for only a small amount of iterations. Why? Look at the title image. After a few iterations, the tree starts to overlap and the area of the entire tree starts to converge to a single value. However, our formula implies that if we have infinite iterations, then our tree will have infinite area. Thus while our formula is useful for applying the area relationship per iteration, it is not an all powerful tool we can use to calculate the area for any amount of iterations.<br />
<br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38539Pythagorean Tree2013-07-26T12:15:12Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean trees. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A<sub>n</sub>'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations. This method of finding the area does not consider the triangles in between the squares. We consider those triangles as empty spaces.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|100px|left]]<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|200px|right]]<br />
<br />
As you can see in Figure 2, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
For the first iteration as shown in Figure 3, the 0th iteration had one square with area ''s''<sup>2</sup>, and the new iteration had two squares. As we mentioned before, the sum of the smaller squares' areas would be equal to the area of the original square, so ''s''<sup>2</sup> + ''s''<sup>2</sup> = 2''s''<sup>2</sup>. We now use our formula to confirm this. <br />
<br />
:<math> A_2 = s^2 (1 + 1) = 2s^2 </math><br />
<br />
We can use this formula for only a small amount of iterations. Why? Look at the title image. After a few iterations, the tree starts to overlap and the area of the entire tree starts to converge to a single value. However, our formula implies that if we have infinite iterations, then our tree will have infinite area. Thus while our formula is useful for applying the area relationship per iteration, it is not an all powerful tool we can use to calculate the area for any amount of iterations.<br />
<br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38538Pythagorean Tree2013-07-26T12:10:11Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A<sub>n</sub>'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations. This method of finding the area does not consider the triangles in between the squares. We consider those triangles as empty spaces.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|100px|left]]<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|200px|right]]<br />
<br />
As you can see in Figure 2, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
For the first iteration as shown in Figure 3, the 0th iteration had one square with area ''s''<sup>2</sup>, and the new iteration had two squares. As we mentioned before, the sum of the smaller squares' areas would be equal to the area of the original square, so ''s''<sup>2</sup> + ''s''<sup>2</sup> = 2''s''<sup>2</sup>. We now use our formula to confirm this. <br />
<br />
:<math> A_2 = s^2 (1 + 1) = 2s^2 </math><br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38537Pythagorean Tree2013-07-26T12:09:22Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A<sub>n</sub>'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations. This method of finding the area does not consider the triangles in between the squares. We consider those triangles as empty spaces.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|80px|left]]<br />
<br />
As you can see in Figure 2, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|200px|right]]<br />
<br />
For the first iteration as shown in Figure 3, the 0th iteration had one square with area ''s''<sup>2</sup>, and the new iteration had two squares. As we mentioned before, the sum of the smaller squares' areas would be equal to the area of the original square, so ''s''<sup>2</sup> + ''s''<sup>2</sup> = 2''s''<sup>2</sup>. We now use our formula to confirm this. <br />
<br />
:<math> A_2 = s^2 (1 + 1) = 2s^2 </math><br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38536Pythagorean Tree2013-07-26T12:08:46Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A<sub>n</sub>'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations. This method of finding the area does not consider the triangles in between the squares. We consider those triangles as empty spaces.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|150px|left]]<br />
<br />
As you can see in Figure 2, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|150px|right]]<br />
<br />
For the first iteration as shown in Figure 3, the 0th iteration had one square with area ''s''<sup>2</sup>, and the new iteration had two squares. As we mentioned before, the sum of the smaller squares' areas would be equal to the area of the original square, so ''s''<sup>2</sup> + ''s''<sup>2</sup> = 2''s''<sup>2</sup>. We now use our formula to confirm this. <br />
<br />
:<math> A_2 = s^2 (1 + 1) = 2s^2 </math><br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38535Pythagorean Tree2013-07-26T11:51:41Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|150px|left]]<br />
<br />
As you can see, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
Now, on the first iteration, a trend that is apparent all further iterations will appear. <br />
<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|150px|left]]<br />
<br />
NOTE:The triangles in a Pythagorean tree are NOT actually there, in the sense that there is no "interior". The sides are all there, but where the interior would be, there is nothing. As such, the triangles are not counted when looking at the area of a Pythagorean Tree. <br />
<br />
The specific trend is that, with every coming iteration, the areas of the squares will be much lower than that of the previous, but there will be twice as many, so the total sum of the areas of the newly iterated squares will become equivalent to the area of the original square. The total sum of the areas of every square in an iteration is equal to the area of the original square. In this case, for example, there was one square of ''s<sup>2</sup>'', and the new iteration had two squares. Since the triangle used to make the tree is a 45-45-90, the two smaller squares are congruent, but even if they weren't, the end result would be the same. The sum of their areas would be equal to the area of the original square. To confirm the formula, ''s<sup>2</sup>+(.5s<sup>2</sup>+.5s<sup>2</sup>)=2s<sup>2</sup>'' This being iteration 1, our formula would be ''A=s<sup>2</sup>*1+1=s<sup>2</sup>*2=2s<sup>2</sup>''. The formula would continue to increase at a similar rate indefinitely. It is a fractal, and can therefore go on to any value. As such, the formula can calculate it for any amount of iterations.<br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38534Pythagorean Tree2013-07-26T11:50:49Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|300px|left]]<br />
<br />
As you can see, for 0 iterations (the original square), the area is ''s<sup>2</sup>''. Or, when using the formula, ''s''<sup>2</sup> (0 + 1) = ''s''<sup>2</sup>.<br />
<br />
Now, on the first iteration, a trend that is apparent all further iterations will appear. <br />
<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|300px|left]]<br />
<br />
NOTE:The triangles in a Pythagorean tree are NOT actually there, in the sense that there is no "interior". The sides are all there, but where the interior would be, there is nothing. As such, the triangles are not counted when looking at the area of a Pythagorean Tree. <br />
<br />
The specific trend is that, with every coming iteration, the areas of the squares will be much lower than that of the previous, but there will be twice as many, so the total sum of the areas of the newly iterated squares will become equivalent to the area of the original square. The total sum of the areas of every square in an iteration is equal to the area of the original square. In this case, for example, there was one square of ''s<sup>2</sup>'', and the new iteration had two squares. Since the triangle used to make the tree is a 45-45-90, the two smaller squares are congruent, but even if they weren't, the end result would be the same. The sum of their areas would be equal to the area of the original square. To confirm the formula, ''s<sup>2</sup>+(.5s<sup>2</sup>+.5s<sup>2</sup>)=2s<sup>2</sup>'' This being iteration 1, our formula would be ''A=s<sup>2</sup>*1+1=s<sup>2</sup>*2=2s<sup>2</sup>''. The formula would continue to increase at a similar rate indefinitely. It is a fractal, and can therefore go on to any value. As such, the formula can calculate it for any amount of iterations.<br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
[[Image:PTree02.JPG]]<br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38533Pythagorean Tree2013-07-26T11:46:44Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A'' = ''s''<sup>2</sup> (''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|300px|right]]<br />
<br />
As you can see, for 0 iterations, A.K.A the original square, the area is ''s<sup>2</sup>''. Or, when using the formula, ''s<sup>2</sup>*0+1=s<sup>2</sup>''<br />
<br />
Now, on the first iteration, a trend that will become apparent for the every iteration onward appears. <br />
<br />
[[Image:PTree02.JPG|Figure 3: The 1st iteration|thumb|300px|right]]<br />
<br />
NOTE:The triangles in a Pythagorean tree are NOT actually there, in the sense that there is no "interior". The sides are all there, but where the interior would be, there is nothing. As such, the triangles are not counted when looking at the area of a Pythagorean Tree. <br />
<br />
The specific trend is that, with every coming iteration, the areas of the squares will be much lower than that of the previous, but there will be twice as many, so the total sum of the areas of the newly iterated squares will become equivalent to the area of the original square. The total sum of the areas of every square in an iteration is equal to the area of the original square. In this case, for example, there was one square of ''s<sup>2</sup>'', and the new iteration had two squares. Since the triangle used to make the tree is a 45-45-90, the two smaller squares are congruent, but even if they weren't, the end result would be the same. The sum of their areas would be equal to the area of the original square. To confirm the formula, ''s<sup>2</sup>+(.5s<sup>2</sup>+.5s<sup>2</sup>)=2s<sup>2</sup>'' This being iteration 1, our formula would be ''A=s<sup>2</sup>*1+1=s<sup>2</sup>*2=2s<sup>2</sup>''. The formula would continue to increase at a similar rate indefinitely. It is a fractal, and can therefore go on to any value. As such, the formula can calculate it for any amount of iterations.<br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
[[Image:PTree02.JPG]]<br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38532Pythagorean Tree2013-07-26T11:45:56Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration 0) multiplied by the number of iterations plus one. Or ''A'' = ''s''<sup>2</sup>(''n'' + 1), where ''s'' is the side length of the original square, and ''n'' is the number of iterations.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|300px|right]]<br />
<br />
As you can see, for 0 iterations, A.K.A the original square, the area is ''s<sup>2</sup>''. Or, when using the formula, ''s<sup>2</sup>*0+1=s<sup>2</sup>''<br />
<br />
Now, on the first iteration, a trend that will become apparent for the every iteration onward appears. <br />
<br />
[[Image:PTree02.JPG]]<br />
<br />
NOTE:The triangles in a Pythagorean tree are NOT actually there, in the sense that there is no "interior". The sides are all there, but where the interior would be, there is nothing. As such, the triangles are not counted when looking at the area of a Pythagorean Tree. <br />
<br />
The specific trend is that, with every coming iteration, the areas of the squares will be much lower than that of the previous, but there will be twice as many, so the total sum of the areas of the newly iterated squares will become equivalent to the area of the original square. The total sum of the areas of every square in an iteration is equal to the area of the original square. In this case, for example, there was one square of ''s<sup>2</sup>'', and the new iteration had two squares. Since the triangle used to make the tree is a 45-45-90, the two smaller squares are congruent, but even if they weren't, the end result would be the same. The sum of their areas would be equal to the area of the original square. To confirm the formula, ''s<sup>2</sup>+(.5s<sup>2</sup>+.5s<sup>2</sup>)=2s<sup>2</sup>'' This being iteration 1, our formula would be ''A=s<sup>2</sup>*1+1=s<sup>2</sup>*2=2s<sup>2</sup>''. The formula would continue to increase at a similar rate indefinitely. It is a fractal, and can therefore go on to any value. As such, the formula can calculate it for any amount of iterations.<br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
[[Image:PTree02.JPG]]<br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38531Pythagorean Tree2013-07-26T11:43:45Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Figure 1: Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration "O") multiplied by the number of iterations plus one. Or ''A=s<sup>2</sup>*n+1'', where ''s'' of course is the length of one of the sides, and n is the number of iterations.<br />
<br />
[[Image:PTree01.JPG|Figure 2: The 0th iteration|thumb|300px|right]]<br />
<br />
As you can see, for 0 iterations, A.K.A the original square, the area is ''s<sup>2</sup>''. Or, when using the formula, ''s<sup>2</sup>*0+1=s<sup>2</sup>''<br />
<br />
Now, on the first iteration, a trend that will become apparent for the every iteration onward appears. <br />
<br />
[[Image:PTree02.JPG]]<br />
<br />
NOTE:The triangles in a Pythagorean tree are NOT actually there, in the sense that there is no "interior". The sides are all there, but where the interior would be, there is nothing. As such, the triangles are not counted when looking at the area of a Pythagorean Tree. <br />
<br />
The specific trend is that, with every coming iteration, the areas of the squares will be much lower than that of the previous, but there will be twice as many, so the total sum of the areas of the newly iterated squares will become equivalent to the area of the original square. The total sum of the areas of every square in an iteration is equal to the area of the original square. In this case, for example, there was one square of ''s<sup>2</sup>'', and the new iteration had two squares. Since the triangle used to make the tree is a 45-45-90, the two smaller squares are congruent, but even if they weren't, the end result would be the same. The sum of their areas would be equal to the area of the original square. To confirm the formula, ''s<sup>2</sup>+(.5s<sup>2</sup>+.5s<sup>2</sup>)=2s<sup>2</sup>'' This being iteration 1, our formula would be ''A=s<sup>2</sup>*1+1=s<sup>2</sup>*2=2s<sup>2</sup>''. The formula would continue to increase at a similar rate indefinitely. It is a fractal, and can therefore go on to any value. As such, the formula can calculate it for any amount of iterations.<br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
[[Image:PTree02.JPG]]<br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38530Pythagorean Tree2013-07-26T11:40:04Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration "O") multiplied by the number of iterations plus one. Or ''A=s<sup>2</sup>*n+1'', where ''s'' of course is the length of one of the sides, and n is the number of iterations.<br />
<br />
[[Image:PTree01.JPG]]<br />
<br />
As you can see, for 0 iterations, A.K.A the original square, the area is ''s<sup>2</sup>''. Or, when using the formula, ''s<sup>2</sup>*0+1=s<sup>2</sup>''<br />
<br />
Now, on the first iteration, a trend that will become apparent for the every iteration onward appears. <br />
<br />
[[Image:PTree02.JPG]]<br />
<br />
NOTE:The triangles in a Pythagorean tree are NOT actually there, in the sense that there is no "interior". The sides are all there, but where the interior would be, there is nothing. As such, the triangles are not counted when looking at the area of a Pythagorean Tree. <br />
<br />
The specific trend is that, with every coming iteration, the areas of the squares will be much lower than that of the previous, but there will be twice as many, so the total sum of the areas of the newly iterated squares will become equivalent to the area of the original square. The total sum of the areas of every square in an iteration is equal to the area of the original square. In this case, for example, there was one square of ''s<sup>2</sup>'', and the new iteration had two squares. Since the triangle used to make the tree is a 45-45-90, the two smaller squares are congruent, but even if they weren't, the end result would be the same. The sum of their areas would be equal to the area of the original square. To confirm the formula, ''s<sup>2</sup>+(.5s<sup>2</sup>+.5s<sup>2</sup>)=2s<sup>2</sup>'' This being iteration 1, our formula would be ''A=s<sup>2</sup>*1+1=s<sup>2</sup>*2=2s<sup>2</sup>''. The formula would continue to increase at a similar rate indefinitely. It is a fractal, and can therefore go on to any value. As such, the formula can calculate it for any amount of iterations.<br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
[[Image:PTree02.JPG]]<br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38529Pythagorean Tree2013-07-26T11:39:27Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangle then become one of the sides of two brand new squares. The lengths of the legs are not changed during this process, so the area of the each new square is less than the area of the original square. The sum of the areas of the two smaller squares is equal to the area of the big square (shown in the More Mathematical Explanation). The interesting thing about the tree is that the other non-right angles of the right triangle can be any value. Side lengths correspond to angles, so change the angle will change the side length too. This relationship between side length and angle is what causes the tilt for most Pythagorean tress. <br />
<br />
|ImageDesc=[[Image:le pyhto.png|Example pythagorean tree|thumb|300px|right]]<br />
<br />
In this image, ''CDF'' is a right triangle. The original square ''ABCD'' has a side length of ''s'' and an area of ''s''<sup>2</sup>. We will derive the relationship between the area of the smaller squares and the area of the larger square. We can rewrite the area of ''CFHG'' and ''DFIJ'' in terms of ''s'' and ''θ''<sub>1</sub>:<br />
<br />
:Square ''CFHG'': <math> a^2 = (s \cos(\theta_1))^2 = s^2 \cos^2(\theta_1) </math><br />
<br />
:Square ''DFIJ'': <math> b^2 = (s \sin(\theta_1))^2 = s^2 \sin^2(\theta_1) </math><br />
<br />
We now have the relationship between the larger square and each of the smaller squares. However, note what happens when we add the areas of the smaller squares.<br />
<br />
:<math> \begin{align}<br />
a^2 + b^2 &= s^2 \cos^2(\theta_1) + s^2 \sin^2(\theta_1) \\<br />
&= s^2(\cos^2(\theta_1) + \sin^2(\theta_1)) = s^2 <br />
\end{align} </math><br />
<br />
We have just proved that the sum of the areas of the smaller squares always adds up to the area of the larger square. Another way of thinking about this property is the Pythagorean theorem. Right triangle ''CDF'' has side lengths ''a'', ''b'', and ''s'', with ''s'' as the hypotenuse. The Pythagorean theorem states that<br />
<br />
:<math> a^2 + b^2 = s^2 </math>.<br />
<br />
Since ''a''<sup>2</sup>, ''b''<sup>2</sup>, and ''s''<sup>2</sup> are the areas of each square, the Pythagorean also shows this interesting property of Pythagorean Trees.<br />
<br />
===The Area of the Tree for any number of iterations===<br />
<br />
The total area of a Pythagorean Tree is actually quite simple to find. Simply put, it is the area of the original square (Iteration "O") multiplied by the number of iterations plus one. Or ''A=s<sup>2</sup>*n+1'', where ''s'' of course is the length of one of the sides, and n is the number of iterations.<br />
<br />
[[Image:PTree01.jpeg]]<br />
<br />
As you can see, for 0 iterations, A.K.A the original square, the area is ''s<sup>2</sup>''. Or, when using the formula, ''s<sup>2</sup>*0+1=s<sup>2</sup>''<br />
<br />
Now, on the first iteration, a trend that will become apparent for the every iteration onward appears. <br />
<br />
[[Image:PTree02.jpeg]]<br />
<br />
NOTE:The triangles in a Pythagorean tree are NOT actually there, in the sense that there is no "interior". The sides are all there, but where the interior would be, there is nothing. As such, the triangles are not counted when looking at the area of a Pythagorean Tree. <br />
<br />
The specific trend is that, with every coming iteration, the areas of the squares will be much lower than that of the previous, but there will be twice as many, so the total sum of the areas of the newly iterated squares will become equivalent to the area of the original square. The total sum of the areas of every square in an iteration is equal to the area of the original square. In this case, for example, there was one square of ''s<sup>2</sup>'', and the new iteration had two squares. Since the triangle used to make the tree is a 45-45-90, the two smaller squares are congruent, but even if they weren't, the end result would be the same. The sum of their areas would be equal to the area of the original square. To confirm the formula, ''s<sup>2</sup>+(.5s<sup>2</sup>+.5s<sup>2</sup>)=2s<sup>2</sup>'' This being iteration 1, our formula would be ''A=s<sup>2</sup>*1+1=s<sup>2</sup>*2=2s<sup>2</sup>''. The formula would continue to increase at a similar rate indefinitely. It is a fractal, and can therefore go on to any value. As such, the formula can calculate it for any amount of iterations.<br />
<br />
A 45-45-90 tree will be used to explain the way the perimeter works, because such a tree shows the most basic way it changes. In a 45-45-90 tree, each and every square in an iteration is congruent. Not so much true for other types of trees, and therefore a bit more difficult to find the perimeter. Referring back to.. <br />
<br />
[[Image:PTree02.jpeg]]<br />
<br />
<br />
This image, we can see that the area of the smaller squares is ''s<sup>2</sup>/2''. Of course, the area of a square is one of the side lengths squared, so if we take ''s<sup>2</sup>/2'', and find the square root, we get one of the side lengths, which is ''s/√2'. Now, if we were to iterate further...<br />
<br />
We'd find that the area of the newly iterated squares is ''s<sup>2</sup>/4''.<br />
If you take the square root of that, you'd find that it comes out to a clean ''s/2.'' Also known as ''√2*√2''. Iterate further, the denominator in the area becomes 8. Square root of 8? 2√2. It goes like this indefinitely. For each iteration, you just multiply the denominator of the side length by √2. The numerator is always s. Of course, this only applies to 45-45-90. Although that's only for one side, the formula remains unchanged. All that happens is that you multiply the fraction by 4, since all four sides of a square are congruent. The perimeter of the squares changes wildly when different right triangles are used. <br />
<br />
----<br />
History of the Tree.<br />
<br />
Albert E. Bosman was the one who created the Pythagorean Tree. He did so in 1942. He was a Dutch Mathematician, who was born in 1891 and died in 1961. <br />
<br />
<br />
<br />
<br />
|other=Basic Algebra and Geometry, Trigonometry<br />
|AuthorName=Enri Kina and John Wallison<br />
|Field=Algebra<br />
|Field2=Fractals<br />
|InProgress=Yes<br />
}}</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=File:PTree02.JPG&diff=38528File:PTree02.JPG2013-07-26T11:38:07Z<p>Xtian1: </p>
<hr />
<div>Created by [[User:EKina|Enri]] and [[User:JWallison|John]].<br />
<br />
Edited by [[User:Xtian1|Xintong]].</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=File:PTree01.JPG&diff=38527File:PTree01.JPG2013-07-26T11:37:52Z<p>Xtian1: </p>
<hr />
<div>Created by [[User:EKina|Enri]] and [[User:JWallison|John]].<br />
<br />
Edited by [[User:Xtian1|Xintong]].</div>Xtian1https://mathimages.swarthmore.edu/index.php?title=File:PTree02.JPG&diff=38526File:PTree02.JPG2013-07-26T11:37:17Z<p>Xtian1: </p>
<hr />
<div></div>Xtian1https://mathimages.swarthmore.edu/index.php?title=File:PTree01.JPG&diff=38525File:PTree01.JPG2013-07-26T11:37:03Z<p>Xtian1: </p>
<hr />
<div></div>Xtian1https://mathimages.swarthmore.edu/index.php?title=Pythagorean_Tree&diff=38524Pythagorean Tree2013-07-26T11:35:20Z<p>Xtian1: </p>
<hr />
<div>{{Image Description<br />
|ImageName=Pythagorean Tree, in 2 Dimensions<br />
|Image=Le pytho.jpg<br />
|ImageIntro=A Pythagorean Tree is a fractal that is created out of squares. Starting from an initial square, two additional smaller squares are added to one side of the first square such that the space between all three squares is a right triangle. The side of the larger square becomes the hypotenuse of that right triangle.<br />
<br />
|ImageDescElem=[[Image:PTree2.gif|This animation shows how the angles of the triangle affect the shape of the tree.|thumb|300px|left]]<br />
<br />
The Pythagorean Tree begins with a square that has a right triangle branching off of it. The hypotenuse of the triangle must always be directly connected to the square. When the right triangle is created, the legs of that triangl