2.1.76 problem 76
Internal
problem
ID
[8214]
Book
:
Own
collection
of
miscellaneous
problems
Section
:
section
1.0
Problem
number
:
76
Date
solved
:
Sunday, November 10, 2024 at 03:22:06 AM
CAS
classification
:
system_of_ODEs
\begin{align*} \frac {d}{d t}x \left (t \right )&=2 x \left (t \right )+y \left (t \right )-z \left (t \right )\\ \frac {d}{d t}y \left (t \right )&=-x \left (t \right )+2 z \left (t \right )\\ \frac {d}{d t}z \left (t \right )&=-x \left (t \right )-2 y \left (t \right )+4 z \left (t \right ) \end{align*}
Solution using Matrix exponential method
In this method, we will assume we have found the matrix exponential \(e^{A t}\) allready. There are
different methods to determine this but will not be shown here. This is a system of linear
ODE’s given as
\begin{align*} \vec {x}'(t) &= A\, \vec {x}(t) \end{align*}
Or
\begin{align*} \left [\begin {array}{c} \frac {d}{d t}x \left (t \right ) \\ \frac {d}{d t}y \left (t \right ) \\ \frac {d}{d t}z \left (t \right ) \end {array}\right ] &= \left [\begin {array}{ccc} 2 & 1 & -1 \\ -1 & 0 & 2 \\ -1 & -2 & 4 \end {array}\right ]\, \left [\begin {array}{c} x \left (t \right ) \\ y \left (t \right ) \\ z \left (t \right ) \end {array}\right ] \end{align*}
For the above matrix \(A\) , the matrix exponential can be found to be
\begin{align*} e^{A t} &= \left [\begin {array}{ccc} {\mathrm e}^{2 t} & t \,{\mathrm e}^{2 t} & -t \,{\mathrm e}^{2 t} \\ -t \,{\mathrm e}^{2 t} & {\mathrm e}^{2 t} \left (1-\frac {1}{2} t^{2}-2 t \right ) & \frac {{\mathrm e}^{2 t} t \left (t +4\right )}{2} \\ -t \,{\mathrm e}^{2 t} & -\frac {{\mathrm e}^{2 t} t \left (t +4\right )}{2} & {\mathrm e}^{2 t} \left (1+\frac {1}{2} t^{2}+2 t \right ) \end {array}\right ] \end{align*}
Therefore the homogeneous solution is
\begin{align*} \vec {x}_h(t) &= e^{A t} \vec {c} \\ &= \left [\begin {array}{ccc} {\mathrm e}^{2 t} & t \,{\mathrm e}^{2 t} & -t \,{\mathrm e}^{2 t} \\ -t \,{\mathrm e}^{2 t} & {\mathrm e}^{2 t} \left (1-\frac {1}{2} t^{2}-2 t \right ) & \frac {{\mathrm e}^{2 t} t \left (t +4\right )}{2} \\ -t \,{\mathrm e}^{2 t} & -\frac {{\mathrm e}^{2 t} t \left (t +4\right )}{2} & {\mathrm e}^{2 t} \left (1+\frac {1}{2} t^{2}+2 t \right ) \end {array}\right ] \left [\begin {array}{c} c_{1} \\ c_{2} \\ c_{3} \end {array}\right ] \\ &= \left [\begin {array}{c} {\mathrm e}^{2 t} c_{1}+t \,{\mathrm e}^{2 t} c_{2}-t \,{\mathrm e}^{2 t} c_{3} \\ -t \,{\mathrm e}^{2 t} c_{1}+{\mathrm e}^{2 t} \left (1-\frac {1}{2} t^{2}-2 t \right ) c_{2}+\frac {{\mathrm e}^{2 t} t \left (t +4\right ) c_{3}}{2} \\ -t \,{\mathrm e}^{2 t} c_{1}-\frac {{\mathrm e}^{2 t} t \left (t +4\right ) c_{2}}{2}+{\mathrm e}^{2 t} \left (1+\frac {1}{2} t^{2}+2 t \right ) c_{3} \end {array}\right ]\\ &= \left [\begin {array}{c} {\mathrm e}^{2 t} \left (\left (c_{2}-c_{3}\right ) t +c_{1}\right ) \\ -\frac {{\mathrm e}^{2 t} \left (\left (c_{2}-c_{3}\right ) t^{2}+\left (2 c_{1}+4 c_{2}-4 c_{3}\right ) t -2 c_{2}\right )}{2} \\ -\frac {{\mathrm e}^{2 t} \left (\left (c_{2}-c_{3}\right ) t^{2}+\left (2 c_{1}+4 c_{2}-4 c_{3}\right ) t -2 c_{3}\right )}{2} \end {array}\right ] \end{align*}
Since no forcing function is given, then the final solution is \(\vec {x}_h(t)\) above.
Solution using explicit Eigenvalue and Eigenvector method
This is a system of linear ODE’s given as
\begin{align*} \vec {x}'(t) &= A\, \vec {x}(t) \end{align*}
Or
\begin{align*} \left [\begin {array}{c} \frac {d}{d t}x \left (t \right ) \\ \frac {d}{d t}y \left (t \right ) \\ \frac {d}{d t}z \left (t \right ) \end {array}\right ] &= \left [\begin {array}{ccc} 2 & 1 & -1 \\ -1 & 0 & 2 \\ -1 & -2 & 4 \end {array}\right ]\, \left [\begin {array}{c} x \left (t \right ) \\ y \left (t \right ) \\ z \left (t \right ) \end {array}\right ] \end{align*}
The first step is find the homogeneous solution. We start by finding the eigenvalues of \(A\) . This
is done by solving the following equation for the eigenvalues \(\lambda \)
\begin{align*} \operatorname {det} \left ( A- \lambda I \right ) &= 0 \end{align*}
Expanding gives
\begin{align*} \operatorname {det} \left (\left [\begin {array}{ccc} 2 & 1 & -1 \\ -1 & 0 & 2 \\ -1 & -2 & 4 \end {array}\right ]-\lambda \left [\begin {array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end {array}\right ]\right ) &= 0 \end{align*}
Therefore
\begin{align*} \operatorname {det} \left (\left [\begin {array}{ccc} 2-\lambda & 1 & -1 \\ -1 & -\lambda & 2 \\ -1 & -2 & 4-\lambda \end {array}\right ]\right ) &= 0 \end{align*}
Which gives the characteristic equation
\begin{align*} \lambda ^{3}-6 \lambda ^{2}+12 \lambda -8&=0 \end{align*}
The roots of the above are the eigenvalues.
\begin{align*} \lambda _1 &= 2 \end{align*}
This table summarises the above result
eigenvalue
algebraic multiplicity
type of eigenvalue
\(2\) \(1\) real eigenvalue
Now the eigenvector for each eigenvalue are found.
Considering the eigenvalue \(\lambda _{1} = 2\)
We need to solve \(A \vec {v} = \lambda \vec {v}\) or \((A-\lambda I) \vec {v} = \vec {0}\) which becomes
\begin{align*} \left (\left [\begin {array}{ccc} 2 & 1 & -1 \\ -1 & 0 & 2 \\ -1 & -2 & 4 \end {array}\right ] - \left (2\right ) \left [\begin {array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end {array}\right ]\right ) \left [\begin {array}{c} v_{1} \\ v_{2} \\ v_{3} \end {array}\right ]&=\left [\begin {array}{c} 0 \\ 0 \\ 0 \end {array}\right ]\\ \left [\begin {array}{ccc} 0 & 1 & -1 \\ -1 & -2 & 2 \\ -1 & -2 & 2 \end {array}\right ] \left [\begin {array}{c} v_{1} \\ v_{2} \\ v_{3} \end {array}\right ]&=\left [\begin {array}{c} 0 \\ 0 \\ 0 \end {array}\right ] \end{align*}
Now forward elimination is applied to solve for the eigenvector \(\vec {v}\) . The augmented matrix is
\[ \left [\begin {array}{@{}ccc!{\ifdefined \HCode |\else \color {red}\vline width 0.6pt\fi }c@{}} 0&1&-1&0\\ -1&-2&2&0\\ -1&-2&2&0 \end {array} \right ] \]
Since the current pivot \(A(1,1)\) is zero, then the current pivot row is replaced with a row with a
non-zero pivot. Swapping row \(1\) and row \(2\) gives
\[ \left [\begin {array}{@{}ccc!{\ifdefined \HCode |\else \color {red}\vline width 0.6pt\fi }c@{}} -1&-2&2&0\\ 0&1&-1&0\\ -1&-2&2&0 \end {array} \right ] \]
\begin{align*} R_{3} = R_{3}-R_{1} &\Longrightarrow \hspace {5pt}\left [\begin {array}{@{}ccc!{\ifdefined \HCode |\else \color {red}\vline width 0.6pt\fi }c@{}} -1&-2&2&0\\ 0&1&-1&0\\ 0&0&0&0 \end {array} \right ] \end{align*}
Therefore the system in Echelon form is
\[ \left [\begin {array}{ccc} -1 & -2 & 2 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end {array}\right ] \left [\begin {array}{c} v_{1} \\ v_{2} \\ v_{3} \end {array}\right ] = \left [\begin {array}{c} 0 \\ 0 \\ 0 \end {array}\right ] \]
The free variables are \(\{v_{3}\}\) and the leading variables are
\(\{v_{1}, v_{2}\}\) . Let \(v_{3} = t\) . Now we start back substitution. Solving the above equation for the leading variables
in terms of free variables gives equation \(\{v_{1} = 0, v_{2} = t\}\)
Hence the solution is
\[ \left [\begin {array}{c} v_{1} \\ v_{2} \\ t \end {array}\right ] = \left [\begin {array}{c} 0 \\ t \\ t \end {array}\right ] \]
Since there is one free Variable, we have found one eigenvector
associated with this eigenvalue. The above can be written as
\[ \left [\begin {array}{c} v_{1} \\ v_{2} \\ t \end {array}\right ] = t \left [\begin {array}{c} 0 \\ 1 \\ 1 \end {array}\right ] \]
Let \(t = 1\) the eigenvector becomes
\[ \left [\begin {array}{c} v_{1} \\ v_{2} \\ t \end {array}\right ] = \left [\begin {array}{c} 0 \\ 1 \\ 1 \end {array}\right ] \]
The following table gives a summary of this result. It shows for each eigenvalue the algebraic
multiplicity \(m\) , and its geometric multiplicity \(k\) and the eigenvectors associated with the
eigenvalue. If \(m>k\) then the eigenvalue is defective which means the number of normal linearly
independent eigenvectors associated with this eigenvalue (called the geometric multiplicity \(k\) )
does not equal the algebraic multiplicity \(m\) , and we need to determine an additional \(m-k\)
generalized eigenvectors for this eigenvalue.
multiplicity
eigenvalue algebraic \(m\) geometric \(k\) defective? eigenvectors
\(2\) \(3\) \(1\) Yes \(\left [\begin {array}{c} 0 \\ 1 \\ 1 \end {array}\right ]\)
Now that we found the eigenvalues and associated eigenvectors, we will go over each
eigenvalue and generate the solution basis. The only problem we need to take care of is if the
eigenvalue is defective. eigenvalue \(2\) is real and repated eigenvalue of multiplicity
\(3\) .There are three possible cases that can happen. This is illustrated in this diagram
This eigenvalue has algebraic multiplicity of \(3\) , and geometric multiplicity \(1\) , therefore this is
defective eigenvalue. The defect is \(2\) . This falls into case \(3\) shown above. First we find
generalized eigenvector \(\vec {v}_2\) of rank 2 and then use this to find generalized eigenvector \(\vec {v}_3\) of rank \(3\) .\(\vec {v}_2\)
is found by solving
\[ \left ( A-\lambda I \right ) \vec {v}_2 = \vec {v}_1 \]
Where \( \vec {v}_1\) is the normal (rank 1) eigenvector found above. Hence
\begin{align*} \left (\left [\begin {array}{ccc} 2 & 1 & -1 \\ -1 & 0 & 2 \\ -1 & -2 & 4 \end {array}\right ]- \left (2\right )\left [\begin {array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end {array}\right ]\right )\left [\begin {array}{c} v_{1} \\ v_{2} \\ v_{3} \end {array}\right ] &= \left [\begin {array}{c} 0 \\ 1 \\ 1 \end {array}\right ]\\ \left [\begin {array}{ccc} 0 & 1 & -1 \\ -1 & -2 & 2 \\ -1 & -2 & 2 \end {array}\right ] \left [\begin {array}{c} v_{1} \\ v_{2} \\ v_{3} \end {array}\right ] &= \left [\begin {array}{c} 0 \\ 1 \\ 1 \end {array}\right ] \end{align*}
Solving for \(\vec {v}_2\) gives
\[ \vec {v}_2 = \left [\begin {array}{c} -1 \\ 1 \\ 1 \end {array}\right ] \]
Now \(\vec {v}_3\) is found by solving
\[ \left ( A-\lambda I \right ) \vec {v}_3 = \vec {v}_2 \]
Where \( \vec {v}_2\) is the (rank 2) generalized eigenvector
found above. Hence
\begin{align*} \left (\left [\begin {array}{ccc} 2 & 1 & -1 \\ -1 & 0 & 2 \\ -1 & -2 & 4 \end {array}\right ]- \left (2\right )\left [\begin {array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end {array}\right ]\right )\left [\begin {array}{c} v_{1} \\ v_{2} \\ v_{3} \end {array}\right ] &= \left [\begin {array}{c} -1 \\ 1 \\ 1 \end {array}\right ]\\ \left [\begin {array}{ccc} 0 & 1 & -1 \\ -1 & -2 & 2 \\ -1 & -2 & 2 \end {array}\right ] \left [\begin {array}{c} v_{1} \\ v_{2} \\ v_{3} \end {array}\right ] &= \left [\begin {array}{c} -1 \\ 1 \\ 1 \end {array}\right ] \end{align*}
Solving for \(\vec {v}_3\) gives
\[ \vec {v}_3 = \left [\begin {array}{c} 1 \\ 0 \\ 1 \end {array}\right ] \]
We have found three generalized eigenvectors for eigenvalue \(2\) . Therefore
the three basis solutions associated with this eigenvalue are
\begin{align*} \vec {x}_1(t) &= \vec {v}_1 e^{\lambda t}\\ &= \left [\begin {array}{c} 0 \\ 1 \\ 1 \end {array}\right ] {\mathrm e}^{2 t}\\ &= \left [\begin {array}{c} 0 \\ {\mathrm e}^{2 t} \\ {\mathrm e}^{2 t} \end {array}\right ] \end{align*}
And
\begin{align*} \vec {x}_2(t) &= e^{\lambda t} \left (\vec {v}_1 t + \vec {v}_2\right ) \\ &= {\mathrm e}^{2 t}\left (\left [\begin {array}{c} 0 \\ 1 \\ 1 \end {array}\right ] t + \left [\begin {array}{c} -1 \\ 1 \\ 1 \end {array}\right ]\right ) \\ &= \left [\begin {array}{c} -{\mathrm e}^{2 t} \\ {\mathrm e}^{2 t} \left (t +1\right ) \\ {\mathrm e}^{2 t} \left (t +1\right ) \end {array}\right ] \end{align*}
And
\begin{align*} \vec {x}_3(t) &=\left ( \vec {v}_1 \frac {t^{2}}{2} + \vec {v}_2 t + \vec {v}_3 \right ) e^{\lambda t} \\ &= \left (\left [\begin {array}{c} 0 \\ 1 \\ 1 \end {array}\right ] \frac {t^{2}}{2} + \left [\begin {array}{c} -1 \\ 1 \\ 1 \end {array}\right ] t + \left [\begin {array}{c} 1 \\ 0 \\ 1 \end {array}\right ] \right ) {\mathrm e}^{2 t} \\ &=\left [\begin {array}{c} -{\mathrm e}^{2 t} \left (t -1\right ) \\ \frac {{\mathrm e}^{2 t} t \left (t +2\right )}{2} \\ \frac {{\mathrm e}^{2 t} \left (t^{2}+2 t +2\right )}{2} \end {array}\right ] \end{align*}
Therefore the final solution is
\begin{align*} \vec {x}_h(t) &= c_{1} \vec {x}_{1}(t) + c_{2} \vec {x}_{2}(t) + c_{3} \vec {x}_{3}(t) \end{align*}
Which is written as
\begin{align*} \left [\begin {array}{c} x \left (t \right ) \\ y \left (t \right ) \\ z \left (t \right ) \end {array}\right ] &= c_{1} \left [\begin {array}{c} 0 \\ {\mathrm e}^{2 t} \\ {\mathrm e}^{2 t} \end {array}\right ] + c_{2} \left [\begin {array}{c} -{\mathrm e}^{2 t} \\ {\mathrm e}^{2 t} \left (t +1\right ) \\ {\mathrm e}^{2 t} \left (t +1\right ) \end {array}\right ] + c_{3} \left [\begin {array}{c} {\mathrm e}^{2 t} \left (-t +1\right ) \\ {\mathrm e}^{2 t} \left (\frac {1}{2} t^{2}+t \right ) \\ {\mathrm e}^{2 t} \left (\frac {1}{2} t^{2}+t +1\right ) \end {array}\right ] \end{align*}
Which becomes
\begin{align*} \left [\begin {array}{c} x \left (t \right ) \\ y \left (t \right ) \\ z \left (t \right ) \end {array}\right ] = \left [\begin {array}{c} -\left (\left (t -1\right ) c_3 +c_2 \right ) {\mathrm e}^{2 t} \\ \frac {\left (c_3 \,t^{2}+\left (2 c_2 +2 c_3 \right ) t +2 c_1 +2 c_2 \right ) {\mathrm e}^{2 t}}{2} \\ \frac {{\mathrm e}^{2 t} \left (\left (t^{2}+2 t +2\right ) c_3 +2 c_2 t +2 c_1 +2 c_2 \right )}{2} \end {array}\right ] \end{align*}
Maple step by step solution
Maple dsolve solution
Solving time : 0.068
(sec)
Leaf size : 58
dsolve ([ diff ( x ( t ), t ) = 2*x(t)+y(t)-z(t), diff ( y ( t ), t ) = -x(t)+2*z(t), diff ( z ( t ), t ) = -x(t)-2*y(t)+4*z(t)]
,{ op ([ x ( t ), y(t), z(t)])})
\begin{align*}
x \left (t \right ) &= -{\mathrm e}^{2 t} \left (2 t c_3 -4 c_3 +c_{2} \right ) \\
y \left (t \right ) &= {\mathrm e}^{2 t} \left (c_3 \,t^{2}+c_{2} t +c_{1} \right ) \\
z \left (t \right ) &= {\mathrm e}^{2 t} \left (c_3 \,t^{2}+c_{2} t +2 c_3 +c_{1} \right ) \\
\end{align*}
Mathematica DSolve solution
Solving time : 0.004
(sec)
Leaf size : 107
DSolve [{{ D [ x [ t ], t ]== 2*x[t]+y[t]-z[t], D [y[t],t] == -x[t]+2*z[t], D [z[t],t]==-x[t]-2*y[t]+4*z[t]},{}},
{x[t],y[t],z[t]},t,IncludeSingularSolutions-> True ]
\begin{align*}
x(t)\to e^{2 t} ((c_2-c_3) t+c_1) \\
y(t)\to -\frac {1}{2} e^{2 t} \left ((c_2-c_3) t^2+2 (c_1+2 c_2-2 c_3) t-2 c_2\right ) \\
z(t)\to -\frac {1}{2} e^{2 t} \left ((c_2-c_3) t^2+2 (c_1+2 c_2-2 c_3) t-2 c_3\right ) \\
\end{align*}