In order to understand these systems, we must first understand coupled linear systems.
Recap of eigenvalues
A=(1210)
import sympy as sp
A = sp.Matrix([[1,1],[2,0]])A.eigenvals()
{−1:1,2:1}
Recap of eigenvectors
A=(1210)
A.eigenvects()
[(−1,1,[[−211]]),(2,1,[[11]])]
Recap of diagonalisation
Recall that, for a matrix A with eigenvectorsv1 and v2, and eigenvaluesλ1 and λ2, we can write a matrix of eigenvectors: P=(v1v2). Then:
A=P(λ100λ2)P−1
(This is also true for general n×n matrices.)
In our example,
P=(−21111),λ1=−1,λ2=2.
Coupled ODEs
For coupled system of first order linear differential equations of the form
dtdxdtdy=ax+by,=cx+dy.
we have three methods of analysing them mathematically:
Turn them into one second order equation (if we can solve second order!)
Divide one by other, to get one equation independent of t
Perform matrix diagonalisation (extends to n×n problems)
Example
Solve
dtdxdtdy=x+y,=2x.
Subject to
x(0)y(0)=0,=3.
Method 1: Second order
We start with:
dtdxdtdy=x+y,=2x.
We can convert that into a second order equation:
dt2d2x=dtdx+dtdy=dtdx+2x⟹dt2d2x=dtdx+2x
Method 2: eliminate t
We start with:
dtdxdtdy==x+y,2x.
Then, dividing:
dxdy=dtdxdtdy⟹dxdy=x+y2x
Method 3: diagonalisation
Let v=(xy),
then
dtdx=x+y,dtdy=2x,⟹dtdv=Av,
where A=(1210).
Substitute
A=P(λ100λ2)P−1.
then
dtdv=P(λ100λ2)(P−1v)
or
dtd(P−1v)=(λ100λ2)(P−1v)
We can now introduce a new variable z=(z1z2)=P−1v so that:
dtdz=(λ100λ2)z.
But now, because the matrix is diagonal, the system is no longer coupled.
The first equation only involves z1 and the second only involves z2, so we can solve each one individually:
Rearranging, we now have two equations relating x and y:
−2x+2y=Ceλ1t > 2x+y=Deλ2t
where C=3A and D=3B. Using our initial conditions, x(0)=0 and y(0)=3 we find C=6 and D=3.
Finally, solving the simultaneous equations, we have a solution:
x(t)=−eλ1t+eλ2t > y(t)=2eλ1t+eλ2t
Summary
Three methods to analytically solve systems of linear first
order ODEs
Best method depends on the system and what you need to ask about it
Introductory problems
Introductory problems 1
Find the general solution to the following system of ODEs:
dtdx=x,anddtdy=y.
Sketch the form of the solution in the x,y plane, using arrows to indicate where the solution moves over time.
Introductory problems 2
Take the general decoupled linear system
dtdx=ax,anddtdy=by.
Integrate the two equations separately to solve for x and y in terms of t.
If you start at t=0, x(0)=0, y(0)=0 what happens to the solution over time?
If you start at a general position x(0)=x0, y(0)=y0 what happens to the solution as t→∞?
What if a and b are both negative?
What if only one of a or b is negative? What if either x0 or y0 is negative?
Either by eliminating t from the original equations or by eliminating t from your solutions to part 1., find a general solution of the system. (Why not try both methods?)
Sketch this solution for
a>0,b>0,a=b
a>0,b<0,a=−b.
Main problems
Main problems 1
By reformulating the following system as one first order equation (i.e eliminating t), find the general solution to:
dtdx=−y,anddtdy=x.
Sketch the form of the solutions in the x,y plane.
Main problems 2
Again by eliminating t and reformulating the system as one first order equation, find the general solution to the following system of ODEs:
dtdx=y,anddtdy=x.
Sketch the form of the solutions in the x,y plane.
Main problems 3
Find the eigenvalues and two independent eigenvectors v1 and v2 of the matrix
A=(1141).
Put the vectors v1 and v2 as the columns of a 2×2 matrix P. Find P−1 and show (by calculation) that P−1AP is diagonal. What are the entries of this matrix? What do they correspond to?
Find the general solution of the system dtdx=x+4y,anddtdy=x+y.
Find the particular solution subject to x(0)=0 and y(0)=2.
Sketch the trajectory (the x(t),y(t) coordinates over time) in the x,y plane.
Draw the eigenvectors v1 and v2 on the same figure.
What happens as t→∞?
What about t→−∞?
What is dxdy at a general point on the y-axis?
Extension problems
Extension problems 1
The force on a damped harmonic oscillator is f=−kx−mνdtdx, where x is a displacement, k>0 is a spring force constant, m>0 is the mass and ν>0 is the strength of the damping.
Use Newton's 2nd law of motion to write down an equation for the acceleration dt2d2x.
Make the substitution y=dtdx(and hence dtdy=dt2d2x) to obtain a system of two first-order linear ODEs.