Project4 - First Order Linear Systems

advertisement
MA 282-Assignment #4: First–order Linear Systems
We restrict our discussion to systems of the form
𝑑𝑥
= 𝑎𝑥 + 𝑏𝑦
𝑑𝑡
𝑑𝑦
= 𝑐𝑥 + 𝑑𝑦
𝑑𝑡
where 𝑎, 𝑏, 𝑐, 𝑑 are constants.
We let = (
𝑎
𝑐
𝑥(𝑡)
𝑑𝑌
𝑏
) , 𝑌(𝑡) = (
), and we write the system in the form 𝑑𝑡 = 𝐴𝑌.
𝑦(𝑡)
𝑑
1. Strait –Line(Eigen-line) Solutions
𝑑𝑌
Recall, if the matrix 𝐴 has a real eigenvalue 𝜆 with associated eigenvector 𝑣, then the linear system 𝑑𝑡 =
𝐴𝑌 has the straight line solution 𝑌(𝑡) = 𝑒 𝜆𝑡 𝑣.
Example
𝑑𝑌
Consider the system 𝑑𝑡 = (
2 2
) 𝑌.
1 3
We use the MATLAB command eig to calculate the eigenvalues and their associated eigenvectors as
follows.
The eigenpairs of the system are: 𝜆1 = 1, 𝑣1 = [
−2
1
] and 𝜆2 = 4, 𝑣2 = [ ].
1
1
So the system has two straight- line solutions namely, 𝑌1 (𝑡) = 𝑒 𝑡 [
We can plot the direction field of the system.
𝑡
4𝑡
−2
] = [−2𝑒
] and 𝑌2 (𝑡) = [𝑒 4𝑡 ].
𝑡
1
𝑒
𝑒
To plot half of the straight line of eigenvectors, we type
Any multiple of the vector 𝑣1 is also an eigeinvector of 𝜆1 . In particular – 𝑣1 is an eigenvector and the
lower half of the line is obtained by plotting the solution – 𝑒 𝑡 𝑣1 .
Similarly we can plot the second straight line of eigenvectors as follows.
Please consult the textbook for detailed analysis of the importance of straight line solutions.
Next we use MATLAB to solve linear systems in two different ways. We will focus on the technical parts;
students should consult their textbooks to learn about the valuable information that eigenpairs contain.
2. Solving Systems in terms of Eigenpairs
Case I: two distinct real eigenvalues
Example
As an example we solve the system
𝑑𝑌
𝑑𝑡
−3 1
2
=(
) 𝑌, 𝑌(0) = [ ].
0 2
5
−3 1
We enter the coefficient matrix 𝐴 = (
) in MATLAB:
0 2
Next we use the command eig to calculate the eigenpairs of 𝐴:
1 1/5
) provides the eigenvectors associated to the distinct
0
1
eigenvalues 𝜆1 = −3 and 𝜆2 = 2 found along the diagonal of the matrix Evl.
Note that the columns of the matrix Evr = (
Therefore the general solution is
1
1/5
𝑌(𝑡) = 𝑐1 𝑒 −3𝑡 [ ] + 𝑐2 𝑒 2𝑡 [
].
0
1
2
Substituting for the initial condition 𝑌(0) = [ ]:
5
1
1/5
2
𝑐1 [ ] + 𝑐2 [
]=[ ]
0
5
1
which can be written in the form:
1 1/5 𝑐1
2
(
) [𝑐 ] = [ ]
5
2
0
1
1 1/5
), hence we obtain:
0
1
Observe that Evr = (
𝑐1
2
Evr [𝑐 ] = [ ].
5
2
Now we use MATLAB to solve for 𝑐1 and 𝑐2 as follows:
that is 𝑐1=1, 𝑐2 = 5, and the solution to our initial value problem is
1
1/5
𝑌(𝑡) = 𝑒 −3𝑡 [ ] + 5𝑒 2𝑡 [
]
0
1
or
1
1
𝑌(𝑡) = [ ] 𝑒 −3𝑡 + [ ] 𝑒 2𝑡
0
5
Case II: two complex eigenvalues
As an example we find the general solution of the system
So the eigenpairs are
𝑑𝑌
𝑑𝑡
=(
−2 −3
) 𝑌.
3 −2
−𝑖
𝜆1 = −2 − 3𝑖,
𝑣1 = [
]
1
and
𝜆2 = −2 + 3𝑖,
𝑖
𝑣2 = [ ].
1
Consider the second pair and let us calculate the real and imaginary parts of the complex solution:
𝑖
𝑌(𝑡) = [ ] 𝑒 (−2+3𝑖)𝑡
1
𝑖
𝑌(𝑡) = [ ] 𝑒
1
−2𝑡 (𝑐𝑜𝑠3𝑡
𝑖𝑒 −2𝑡 𝑐𝑜𝑠3𝑡 − 𝑒 −2𝑡 𝑠𝑖𝑛3𝑡
+ 𝑖𝑠𝑖𝑛3𝑡) = [
−𝑒 −2𝑡 𝑠𝑖𝑛3𝑡
]=[
𝑒
−2𝑡
𝑐𝑜𝑠3𝑡 + 𝑖𝑒
−2𝑡
𝑠𝑖𝑛3𝑡
𝑒 −2𝑡 𝑐𝑜𝑠3𝑡
]+[
𝑒
−2𝑡
𝑐𝑜𝑠3𝑡
Consequently the general solution of this system is
−𝑒 −2𝑡 𝑠𝑖𝑛3𝑡
𝑌(𝑡) = 𝐶1 [
𝑒 −2𝑡 𝑐𝑜𝑠3𝑡
] + 𝐶2 [
𝑒
−2𝑡
𝑐𝑜𝑠3𝑡
]
𝑒
−2𝑡
𝑠𝑖𝑛3𝑡
Case III: The eigenvalue 𝜆 has multiplicity 2
i.
𝑑𝑌
3 0
)𝑌
0 3
There are two independent eigenvectors associated with 𝜆 : 𝑑𝑡 = (
1
0
In this case the general solution is 𝑌(𝑡) = 𝑐1 𝑒 3𝑡 [ ] + 𝑐2 𝑒 3𝑡 [ ]
0
1
ii.
𝑑𝑌
3
1
There is only one linearly independent vector associated with 𝜆: 𝑑𝑡 = (
0
)𝑌
3
]𝑖
𝑒
−2𝑡
𝑠𝑖𝑛3𝑡
0
So there is one vector, 𝑣 = [ ], associated with 𝜆 = 3.
1
0
A particular solution is given by 𝑌1 = 𝑒 𝜆 𝑡 𝑣 = 𝑒 3𝑡 [ ].
1
A second solution is 𝑌2 = 𝑡𝑒 𝜆 𝑡 𝑣 + 𝑤𝑒 𝜆𝑡 , where (𝐴 − 𝜆𝐼)𝑤 = 𝑣.
Note that Evr is just the vector 𝑣 hence we can easily solve for 𝑤:
1
0
Therefore, 𝑌2 = 𝑡𝑒 𝜆 𝑡 𝑣 + 𝑤𝑒 𝜆𝑡 = 𝑡𝑒 3 𝑡 [ ] + [ ] 𝑒 3𝑡 and the general solution is 𝑇(𝑡) = 𝐶1 𝑌1 (𝑡) + 𝐶2 𝑌2 (𝑡).
0
1
3. Solving Systems using the command dsolve
Let us consider the system discussed in Case III (ii):
𝑑𝑌
𝑑𝑡
That is the system
𝑑𝑥
= 3𝑥
𝑑𝑡
𝑑𝑦
= 𝑥 + 3𝑦
𝑑𝑡
To find the general solution, we type
3
1
=(
0
) 𝑌.
3
To solve the same system but with the initial conditions 𝑥(0) = 2, 𝑦(0) = 5:
MA 282- MatLab Project #4: First–order Linear Systems
Due Thursday, April 16 @ 9:30AM
Total = 100 points
Important Reminder:

Project without Honesty Statement & Signature will NOT be acceptable .

Follow the format on the instruction file.

Submit at the beginning of the class. Late submission will not be accepted.
*************************************************************************************
Problem #1. Choose either (a) or (b) and do the following for the system:
1. Use the MATLAB to find the eigenvalues and associated eigenvectors.
2. Plot the direction field of the system and the straight-lines of eigenvectors(eigenlines)
on the same axes.
3. Observe the behavior of trajectories and determine the type(stable node, unstable node, saddle
point, degenerate stable node or degenerate unstable node) of the equilibrium point at the origin.
(a) Consider the system
−4 2
𝑑𝒀
=( 5
)𝒀
−
2
𝑑𝑡
2
(b) Consider the system
5
−
2
𝑑𝒀
2
=(
)𝒀
3
𝑑𝑡
−2
4
Problem #2. Let 𝑎 be a real number different from 0 and consider the system
𝑑𝑥
= 𝑎𝑥 + 4𝑦
𝑑𝑡
𝑑𝑦
= 𝑎𝑦
𝑑𝑡
1.
2.
3.
4.
Use MATLAB to verify that the system has a repeated eigenvalue 𝜆
Use MATLAB to verify that there is only one eigenvector associated with 𝜆
Find the general solution of the system.
Verify the result in 3 by using the command dsolve to solve the system
Download