Professional Documents
Culture Documents
Differential Equations
Differential Equations
Differential Equations
Version: 2.0
Contents
1 Functions 3
1.1 The Exponential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Ramp, Step, and Dirac Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Complex Numbers 8
2.1 Principal Argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Rectangular and Polar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3 Sinusoidal Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4 Complex Exponential Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.5 Complex Powers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.6 Complex Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5 Systems 54
5.1 First Order Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.2 Elimination [Null Solution Method 1] . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.3 Eigenvalues and Eigenvectors [Null Solution Method 2] . . . . . . . . . . . . . . . 58
5.4 Fundamental Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.5 Variation of Parameters [Particular Solution] . . . . . . . . . . . . . . . . . . . . . 61
5.6 Matrix Exponential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.7 Decoupling Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
1
6 Graphical and Numerical Methods 65
6.1 System Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
6.2 Direction/Slope Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.2.1 Autonomous ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
6.2.2 Critical/Equilibrium Points . . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.3 Phase Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2
1 Functions
3
1.1 The Exponential
Exponential Intuition
dy
= y(t)
dt
A first attempt for y, with its derivative, is as follows:
1 2
y1 = 1 + t + t
2
dy1
= 0 + 1 + t
dt
dy
is missing a term, the second attempt for y could ensure the derivative captures this term:
dt
1 2 1 3
y2 = 1 + t + t + t
2 6
dy2 1 2
= 0 + 1 + t + t
dt 2
dy
To fix to capture the missing term:
dt
• A new term needs to be introduced in y
dy
• The new term will be absent from
dt
dy
= y(t)
dt
infinitely many terms are needed.
Taylor Series
1 1 1
y(1) = e = 1 + 1 + + + + . . . ≈ 2.718
2 6 24
4
Exponential as a Limit
y = ln(a · x) a∈R
y(x + m) − y(x) 1
y0 = lim =
m→0 m ax
1 ln(ax + m) − ln(ax)
= lim
ax m→0 m
ax + m 1/m
= lim ln
m→0 ax
m 1/m
= lim ln 1 +
m→0 ax
1/m
m
ln 1+ ax
= lim e
m→0
m 1/m
= lim 1+
m→0 ax
3. With:
1 1 1
b = , n = , t =
a m x
Substitution produces:
bt n
ebt = lim 1+
n→∞ n
5
1.2 Ramp, Step, and Dirac Functions
• The graphs of the three functions are as follows:
6
• The relationship between the functions are as follows:
d d
dt dt
r(t) −
−
)R*
−− s(t) −
−
)R*
−− δ(t)
• Integration is a smoothing operator, producing a function with less noise (i.e. cancels noise).
Example:
Given: Z ∞
δ(t)2 dt
−∞
For this case, x(t) = δ(t) and T = 0 therefore the integral is:
Z ∞
δ(t) · δ(t) dt = δ(0) = ∞
−∞
7
2 Complex Numbers
8
2.1 Principal Argument
• For z ∈ C:
z = x + iy
Re(z) = x
Im(z) = y
z can be expressed as a vector in the complex plane:
" #
x
~z =
y
The principal argument of z is the angle θ between the R+ axis and ~z such that θ ∈ (−π, π].
• Denoted as:
Arg(z) = atan2(y, x)
Re > 0
𝕀𝕞
ℝ𝕖
Im
atan2(Im, Re) = arctan
Re
9
Re < 0 , Im ≥ 0
𝕀𝕞
ℝ𝕖
Im
atan2(Im, Re) = arctan + π
Re
For a vector in quadrant 2, arctan finds the angle of the vector as though it was in quadrant
4 therefore adding π to the output rectifies the discrepancy.
Re < 0 , Im < 0
𝕀𝕞
ℝ𝕖
Im
atan2(Im, Re) = arctan − π
Re
For a vector in quadrant 3, arctan finds the angle of the vector as though it was in quadrant
1 therefore subtracting π to the output rectifies the discrepancy.
10
Re = 0 , Im > 0
𝕀𝕞
ℝ𝕖
π
atan2(Im, Re) =
2
Re = 0 , Im < 0
𝕀𝕞
ℝ𝕖
π
atan2(Im, Re) = −
2
11
Re = 0 , Im = 0
𝕀𝕞
ℝ𝕖
12
2.2 Rectangular and Polar
• Complex numbers can be represented in two forms:
1. Rectangular
2. Polar
Imaginary
(r, θ ) or (x, y)
y = r sin θ
θ
Real
O
x = r cos θ polar
axis
θ = atan2(y, x)
r 2 = x2 + y 2
p
∴ r = x2 + y 2
∴ x = r · cos θ
y = r · sin θ
13
• Rectangular form is useful for:
r i(θ−α)
Division : reiθ / Reiα = e
R
• With r = R = 1, multiplication and division rotates complex number about the unit circle
due to the addition/subtraction of angles.
• For z ∈ C:
z · z = |z|2 = r2
1 1 1 x − iy x − iy
= = · =
z x + iy x + iy x − iy x2 + y 2
14
2.3 Sinusoidal Identity
• A linear combination of sin and cos terms produces a cos wave with a phase shift:
φ = atan2(B, A)
Proof:
A cos ωt + B sin ωt = R cos(ωt − φ)
B = R sin φ
The produced equations are identical to the Polar ↔ Rectangular conversion formulas.
• When the input of a system is a sinusoid, it is useful to “complexify” the problem in order to:
2. Find the solution with one term, a complex exponential, instead of two, cos and sin.
15
2.4 Complex Exponential Identity
• A linear combination of sin and cos terms is equivalent to a linear combination of a complex
exponential and its conjugate:
1 iωt 1 −iωt
sin ωt = ·e − ·e
2i 2i
a b
α = +
2 2i
a b
β = −
2 2i
a = α + β
b = i · (α − β)
De Moivre’s Formula
Example:
(5eiπ )2 = 25ei2π
16
2.6 Complex Roots
• With complex numbers:
z = reiθ
w = ρeiφ
Given z n = w, then:
rn eiθn = ρeiφ+2πk
By equating coefficients:
rn = ρ
eiθn = eiφ+2πk
The relationship between the complex exponential angles is:
θn = φ + 2πk
1
= (ρeiφ+2πk ) n
√ φ+2πk
= n ρ · ei n k ∈ {0, 1, 2, . . . , n − 1}
Therefore:
√
r = n ρ
φ + 2πk
θk = k ∈ {0, 1, 2, . . . , n − 1}
n
There is only one value corresponding to the Principal Nth Root of a complex number.
17
Example:
Given:
1 − aM +1 z −M −1 = 0
1 − aM +1 z −(M +1) = 0
z M +1 − aM +1 = 0
z M +1 = aM +1
z M +1 = aM +1 · 1
z M +1 = aM +1 · e2πk
1
M +1
z = aM +1 · e2πk
2π
z = a · exp k k ∈ {0, 1, 2, . . . , M }
M +1
Im
z-plane
M+1 = 8
a Re
18
3 First Order Equations (Analytic)
19
3.1 System Model
• First order differential equations take form:
dy
= ay + x(t)
dx
– a , Growth rate.
– y(t) , Output of the system.
– x(t) , Input of the system, aka the forcing term.
1. Describes the relationship between the input and output, using their derivatives.
2. Is an alternative to an explicit expression for a system’s output, i.e y = f (x)
dy
= ay + x(t) , Linear, Constant Coefficent
dt
dy
= 2ty + x(t) , Linear (in terms of y), Dynamic Coefficent (with respect to t)
dt
dy
= y2 + x(t) , Nonlinear, Constant Coefficent
dt
dy
= ay
dt
20
• For linear equations, the general (complete) solution is:
y = yn + yp
Solving:
dyn
− ayn = 0
dt
• Component of the general response that is produced by the system, due to a release of
the energy stored within the system itself.
Particular Solution yp
dyp
− ayp = x(t)
dt
• Depends on the input signal and the internal structure of the system.
21
• Given:
Complete Solution : u + v = 6
Null Solution : u + v = 0
Adding all null solutions yn to any particular solution yp forms the complete line:
v
Complete Line
u+v=6
u+v=0
{(u, v) : (u, v) ∈ Complete Line} can be defined in multiple ways:
y1 = (3 + c1 , 3 − c1 )
y2 = (6 + c2 , 0 − c2 )
• Input sources that usually arise in science and engineering problems are:
22
System Model
For any given continuous input x(t), the first order differential equation:
dy
= ay + x(t)
dt
the general solution is:
Z s=t
y(t) = y(0)eat + ea(t−s) x(s) ds
s=0
Z s=t
• ea(t−s) x(s) ds — the continuous accumulation of shifted exponentials.
s=0
t = 0 : y(t) = y(0)
Then:
y(0)eat t < s0
y(t) =
y(0)eat + x(s0 )ea(t−s0 ) t ≥ s0
23
3.2 System Responses to Inputs x(t)
• To take an educated guess for the general solution y, assume:
To find K:
(a) Take the derivative of yp .
(b) Set equal to the differential equation.
(c) Solve for K
y(0) = C + yp (0)
∴ C = y(0) − yp (0)
4. Substitute the value of C into the partial general solution to form the general solution:
Such that:
y(0)eat = yc
n , Initial Condition Growth — a special case yn as y
cn (0) = y(0)
(yp (t) − yp (0)eat ) = ybp , Input Growth — a special case yp as ybp (0) = 0
24
x(t) = Constant
Given:
dy
= ay + b
dt
The input x(t) is a constant, b, therefore guess yp also as a constant:
yp = K
0 = aK + b
b
K = − = yp
a
b
y(t) = Ceat −
a
Using the initial condition:
b
y(0) = C −
a
b
∴ C = y(0) +
a
The general solution is therefore:
b at b
y(t) = y(0) + e −
a a
b at
= y(0)eat + (e − 1)
a
Intuition:
25
x(t) = Step Function
Given:
dy
= ay + b · s(t − T )
dt
t≤T
dy
= ay
dt
In this case, the general solution is simply:
y(t) = y(0)eat
t>T
dy
= ay + b
dt
In this case, the general solution is simply:
b a(t−T )
y(t) = y(0)eat + e −1
a
Intuition:
t≤T
Growth comes only from the initial condition. At t = T , the source has commenced but not
had time to affect the general solution (i.e instantaneous effect from source does not occur)
t>T
Continuous deposits of $b are made, growth in the general solution accounts for the delay in
deposits by shifting the exponential function by T .
26
x(t) = Dirac Function
t<T
y(t) = y(0)eat
t≥T
y(t) = y(0)eat + bea(t−T )
Intuition:
• For t > T , the general solution is a linear combination of the initial condition and $b
growing exponentially with:
1. Rate = a
2. Exponential start times t = 0 and t = T respectively
With −a (e.g. to represent inflation), step and dirac inputs differ with lim :
t→∞
Dirac : lim y(0)e−at + be−a(t−T ) = 0
t→∞
b −a(t−T ) b
Step : lim y(0)e−at − e −1 =
t→∞ a a
Continual deposits from a Step input balances the loss from inflation whereas with a Dirac
input this does not occur therefore bank balance goes to zero.
27
x(t) = Exponential
Given:
dy
= ay + est
dt
The input x(t) is an exponential, est , therefore guess yp also as an exponential:
yp = Kest
With yp and its derivative, substitution into the differential equation produces:
1
K = , Transfer Function
s−a
1
y(t) = Ceat + · est
s−a
1
y(0) = C +
s−a
1
∴ C = y(0) −
s−a
1
= y(0)eat + · (est − eat )
s−a
Intuition:
28
x(t) = Exponential Contd.
Resonance:
• When s = a resonance occurs, i.e. the input growth rate equals the natural growth
rate, and ybp results in an indeterminate form.
eat − eat 0
ybp = =
s−a 0
d
ds (est − eat ) test
⇒ lim d
= lim = teat
s→a
ds (s − a) s→a 1
29
x(t) = Sinusoid
Given:
dy
= ay + A cos ωt + B sin ωt
dt
Guess yp to have the same form as x(t), i.e:
yp = M cos ωt + N sin ωt
Taking yp and its derivative then substituting them into the differential equation produces:
sin terms : −M ω = aN + B
cos terms : N ω = aM + A
aA + Bω
M = −
ω 2 + a2
Aω − aB
N =
ω 2 + a2
aA + Bω Aω − aB
yp = − cos ωt + sin ωt
ω 2 + a2 ω 2 + a2
yp = M cos ωt + N sin ωt
dy
= ay + A cos ωt
dt
30
x(t) = Sinusoid Contd.
aA + Bω Aω − aB
y(t) = Ceat − cos ωt + sin ωt
ω 2 + a2 ω 2 + a2
aA + Bω
y(0) = C −
ω 2 + a2
aA + Bω
∴ C = y(0) +
ω 2 + a2
With constants:
Ψ = aA + Bω
η = Aω − aB
The general solution is:
Ψ 1
y(t) = y(0) + eat + − Ψ cos ωt + η sin ωt
ω 2 + a2 ω 2 + a2
1
= y(0)eat + at
Ψ(e − cos ωt) + η sin ωt
ω 2 + a2
Intuition:
31
x(t) = Complex Exponential
Given:
dz
= az + R · ei(ωt−φ)
dt
The input x(t) is a complex exponential therefore guess zp also as a complex exponential:
zp = Kei(ωt−φ)
With zp and its derivative, substitution into the differential equation produces:
R
K =
iω − a
R
z(t) = Ceat + · ei(ωt−φ)
iω − a
R
z(0) = C + · e−iφ
iω − a
R
∴ C = z(0) − · e−iφ
iω − a
R
= z(0)eat + · ei(ωt−φ) − e−iφ eat
iω − a
32
3.2.1 Sinusoidal/Complexify Example
Given:
dy
= 3y + 3 cos 2t + 4 sin 2t
dt
Then:
a=3 , ω=2 , A=3 , B=4
Solving the differential equation using the sinusoidal method produces the solution:
1
y(t) = y(0)e3t + 3t
· 17e − 17 cos 2t − 6 sin 2t
13
Alternatively, the differential equation can be expressed with one cos term:
√
R = 32 + 4 2 = 5
4
φ = atan2(4, 3) = arctan
3
dy 4
= 3y + 5 cos 2t − arctan
dt 3
dz
4
= 3z + 5ei 2t−arctan 3
dt
The complex solution is therefore:
5
4 4
z(t) = z(0)e3t + · ei 2t−arctan 3 −e −i arctan 3 · e3t
−3 + 2i
Re{z(t)} = y(t)
1
= y(0)e3t + · 17e3t − 17 cos 2t − 6 sin 2t
13
33
3.3 Integrating Factor Method
Integrating Factor µ(t)
dy
Applies to constant rates a and dynamic rates a(t): = a(t)y + x(t)
dt
When rearranging the equation to express the input in terms of the output and derivatives:
dy
− a(t)y = x(t)
dt
The LHS multiplied by µ(t) resembles the derivative of µ(t) · y(t), using the product rule:
dy ? d
µ(t) − a(t)y = µ(t) · y
dt dt
dy ? dy dµ
⇒ µ(t) · − a(t)µ(t) · y = µ(t) · + ·y
dt dt dt
By matching coefficients:
dµ
= −a(t) · µ(t)
dt
Hence: Z t
µ(t) = exp − a(τ ) dτ
0
R
A constant c precedes e− a(t) dt but only one integrating factor is needed so c = 1.
As the LHS was multiplied by µ(t), multiplying the RHS by µ(t) produces the identity:
d
µ(t) · y = µ(t) · x(t)
dt
With: Z t
1
= exp a(τ ) dτ , µ(0) = 1
µ(t) 0
The general solution is found by integrating both sides and solving for y:
Z t
µ(t) · y(t) − µ(0) · y(0) = µ(s) · x(s) ds
0
Z t
1
y(t) = y(0) + µ(s) · x(s) ds
µ(t) 0
Z t Z t Z t
y(t) = exp a(τ ) dτ · y(0) + exp a(τ ) dτ · x(s) ds
0 0 s
34
Example:
Given:
dy 4
= − · y + t2
dt 3 + 4t
The integrating factor is:
4
−a(t) =
3 + 4t
Z t Z t
1
−a(τ ) dτ = du = ln |3 + 4t| − ln |3|
0 0 u
|3 + 4t| 4
µ(t) = exp ln = t+1 t ∈ [0, ∞) ∴ abs omitted
3 3
t Z t
4 4 2
τ + 1 · y(τ ) = τ + 1 · τ dτ
3 0 0 3
4 1 4
t + 1 · y(t) − y(0) = (t + t3 ) − 0
3 3
y(0) t4 + t3
y(t) = 4 +
3t +1 4t + 3
35
3.4 Separable Equations
• First order differential equations can be expressed as:
dy
= f (t, y)
dt
This expression represents both linear and non-linear differential equation:
dy
Linear : = a(t)y
dt
dy
Non-linear : = ay − by 2
dt
Separable Equations
dy
= f (t, y) = g(t) · h(y)
dt
Rearrange the ODE and integrate, with initial conditions as limits, then solve for y:
Z γ=y Z τ =t
h(γ) dγ = g(τ ) dτ
γ=y(0) τ =0
dy
Separable : = −2ty 2
dt
dy
Non Separable : = y 3 + t2
dt
Example:
dy
= −2ty 2
dt
Z y Z t
1
dγ = −2τ dτ
y(0) γ2 0
1 1
− + = −t2
y y(0)
1 y(0)
y(t) = 1 =
t2 + y(0)
y(0)t2 + 1
36
3.5 Exact Equations
• A linear or non-linear ODE of the form:
dy g(t, y)
=
dt h(t, y)
Exact Condition
δ δ
h(t, y) = − g(t, y)
δt δy
• All separable equations are exact but not all exact equations are separable.
Solution Procedure
1. Assert the Exact condition holds
2. Rearrange the equation then calculate the indefinite integral of the LHS:
h(t, y) dy = g(t, y) dt
Z
h(t, y) dy = H(t, y) + c(t)
δ
[H(t, y) + c(t)] = −g(t, y)
δt
Let t = 0 to find constant y(0), the solution for the defined ODE is then:
37
Example:
dy 2yt − 1
=
dt y 2 − t2
g(t, y) = 2yt − 1
h(t, y) = y 2 − t2
δ
[y 2 − t2 ] = −2t
δt
δ
− [2yt − 1] = −2t
δy
3. Take the derivative w.r.t t on the indefinite integral result and equate coefficients:
d 1 3 2
y − yt + c(t) = −2yt + 1
dt 3
d
⇒ −2yt + c(t) = −2yt + 1
dt
∴ c(t) = t
1 3 1
y − yt2 + t = y(0)3
3 3
38
4 Second Order Equations (Analytic)
39
4.1 System Model
• Second order ODEs involve the second derivative, as well as the first:
dy
, Velocity
dt
d2 y
, Acceleration
dt2
d2 y dy
m· + b· + k · y = x(t)
dt2 dt
Such that:
b , Damping coefficient
y , Amount the free end of the system was displaced from its “relaxed” position
y 00 (0), the initial acceleration, is derived from the second order ODE.
40
4.2 Homogeneous/Null Solution [No Input/Forcing term x(t)]
• Given:
d2 y dy
m· + b· + k·y = 0
dt2 dt
Let:
yn = est
(m · s2 + b · s + k) · est = 0
• est is never zero therefore the bracketed term must equal zero:
Characteristic Equation
m · s2 + b · s + k = 0
• Due to the ± symbol in the quadratic equation, there are two solutions: sn1 and sn2
b2 − 4mk
41
Undamped Solution (b = 0)
Intuition:
The system oscillates forever with frequency ωn
Damping Ratio
b
p =
2m
The Damping Ratio is:
p
ζ =
ωn
42
Underdamped (b2 < 4mk , 0 < ζ < 1)
p
ωd = ωn2 − p2 , Damped Frequnecy
Intuition:
The system oscillates with frequency ωd and exponentially decays to zero with rate −p
• Two roots ∈ C
43
Critically Damped (b2 = 4mk , ζ = 1)
√
−b ± 0 b
sj = ∴ sn1 = sn2 = − = −p
2m 2m
Intuition:
The system returns to equilibrium as quickly as possible without oscillating.
• A repeated root ∈ R.
44
Overdamped (b2 > 4mk , ζ > 1)
sn1 , sn2 ∈ R
Intuition:
The system returns to equilibrium without oscillating.
2 1
s
• Two roots ∈ R.
• The sj closest to zero decays the slowest, in this case the exponential with rate sn2
decays faster to zero than rate sn1
45
4.3 System Responses to Inputs x(t)
x(t) = Sinusoid
With:
ωf , Forcing Frequency
Given:
d2 y dy
m· + b· + k · y = α cos ωf t + β sin ωf t
dt2 dt
Guess yp to have the same form as x(t), i.e:
yp = c1 cos ωf t + c2 sin ωf t
After:
= m · (ωn2 − ωf2 )
α·Λ − b·β
c1 =
Λ2 + b2 · ωf
β·Λ − b·α
c2 =
Λ2 + b2 · ωf
The particular solution is thus:
α cos ωf t β sin ωf t
yp = lim +
ωf →ωn Λ Λ
α · t sin ωn t β · t cos ωn t
= − N.B: L’Hospital’s Rule w.r.t ωf
2m · ωn 2m · ωn
46
x(t) = Complex Exponential
Given:
d2 y dy
m· + b· + k · y = e sf t
dt2 dt
The input x(t) is a complex exponential therefore guess yp also as a complex exponential:
yp = Cesf t
With yp and its derivative, substitution into the differential equation produces:
1
C =
m· s2f + b · sf + k
1
yp = · esf t
m· s2f + b · sf + k
1
C(s) = , Transfer Function
m · s2 + b · s + k
– The phase plot reveals how a signal with frequency s is phase shifted.
– The magnitude plot reveals how a signal with frequency s is amplified.
If sf is equal to any of the null exponents sn1 and sn2 then C(sf ) has an indeterminate form:
1
C(sf ) = C(sn1 ) = C(sn2 ) =
0
This occurs because sn1 and sn2 are roots of the Characteristic equation (i.e. make zero)
Therefore:
esf t
yp = lim
sf →sn1 m · s2f + b · sf + k
tesn1 t
= N.B: L’Hospital’s Rule w.r.t sf
2m · sn1 + b
47
x(t) = Dirac Function
Given:
d2 y dy
m· + b· + k · y = δ(t) , y(0) = 0 , y 0 (0) = 0
dt2 dt
The particular solution is equal to the solution that solves:
d2 y dy 1
m· + b· + k · y = 0 , y(0) = 0 , y 0 (0) =
dt2 dt m
esn1 t , esn2 t
The derivative is
yp0 = sn1 esn1 t − sn2 esn2 t
1
For t = 0, to satisfy yp0 (0) = , yp can be revised:
m
esn1 t − esn2 t
yp = , Impulse Response
m(sn1 − sn2 )
esn1 t − esn2 t
yp = lim
sn1 →sn2 m(sn1 − sn2 )
tesn2 t
= N.B: L’Hospital’s Rule w.r.t sn1
m
Given:
d2 y dy
m· + b· + k · y = C · s(t)
dt2 dt
Then:
yp = C
48
x(t) = Polynomial Function
Given:
d2 y dy
m· + b· + k · y = tn
dt2 dt
The particular solution is a linear combination of polynomials of order n and lower:
yp = c0 · t0 + ... + cn · tn
= c0 + c1 · t + ... + cn · tn
When yp is substituted into the ODE, the coefficients are calculated by forming linear equa-
tions via equating coefficients.
Given:
d2 y dy
m· + b· + k · y = t · cos ωt
dt2 dt
The particular solution is a multiplication of the respective yp forms:
49
4.4 The General Solution with Initial conditions
1. Choose an appropriate yn and yp for the ODE given such that:
y(t) = yn + yp
Example:
Given:
d2 y dy
2· + 5· + 2 · y = e5t
dt2 dt
1. The general solution is:
1
yn = α · e− 2 t + β · e−2t
1
yp = · e5t
77
1 1
y(t) = α · e− 2 t + β · e−2t + · e5t
77
2. When t = 0:
1
α = y(0) − β −
77
3. Substitute and take the derivative:
1 1 1
y(t) = y(0) − β − · e− 2 t + β · e−2t + · e5t
77 77
1 1 1 5
y 0 (t) = − y(0) − β − · e− 2 t + −2β · e−2t + · e5t
2 77 77
4. When t = 0:
1 1 2 0
β = − · y(0) − · y (0)
21 3 3
2 4 2 0
∴ α = − + · y(0) + · y (0)
33 3 3
50
4.5 Alternative Notation
• The input is often expressed as:
x(t) = k · X(t)
Such that:
d2 y dy
m· + b· + k · y = k · X(t)
dt2 dt
– The input X(t) has the same units as the output y
– The gain, of the signal passed through the system, becomes dimensionless.
d2 y b dy k k
+ · + ·y = · X(t)
dt2 m dt m m
k
• = ωn2 , therefore:
m
d2 y b dy
+ · + ωn2 · y = ωn2 · X(t)
dt2 m dt
• With: r
b 2b k
= √ · = 2ζωn
m 4mk m
The ODE can be expressed as:
d2 y dy
+ 2ζωn · + ωn2 · y = ωn2 · X(t)
dt2 dt
51
4.6 Variation of Parameters
• Applies to ODEs, including those with constants varying with time, with form:
d2 y dy
+ b(t) · + k(t) · y = x(t)
dt2 dt
The constants cj (t) are responsible for adapting the null solutions to equal the input x(t)
Therefore:
0 0 0
yp (t) = c1 (t) · yn1 (t) + c2 (t) · yn2 (t)
52
• Substituting yp and its derivatives into the ODE produces:
00 0
c1 (t) · yn1 (t) + b(t) · yn1 (t) + k(t) · yn1 (t)
00 0
+ c2 (t) · yn2 (t) + b(t) · yn2 (t) + k(t) · yn2 (t)
0 0 0 0
+ c1 (t) · yn1 (t) + c2 (t) · yn2 (t) = x(t)
0 0
• Two linear equations for c1 (t) and c2 (t) have been produced:
0 0
c1 (t) · yn1 (t) + c2 (t) · yn2 (t) = 0
0 0 0 0
c1 (t) · yn1 (t) + c2 (t) · yn2 (t) = x(t)
The system:
0
yn1 (t) c1 (t) yn2 (t)
0
=
0 0 0
yn1 (t) yn2 (t) c2 (t) x(t)
t t
yn2 (τ ) · x(τ ) yn1 (τ ) · x(τ )
Z Z
yp = −yn1 (t) · dτ + yn2 (t) · dτ
0 det W (t) 0 det W (t)
53
5 Systems
54
5.1 First Order Systems
• A system of differential equations is a model such that the rate of change of variables are
dependent on the output of other variable — along with an input, e.g:
x0 = ax + by + cxy + r1 (t)
y 0 = dx + ey + f xy + r2 (t)
cxy , The output of x(t) multiplied by y(t) with a growth rate of c symbolizes their interaction
• Order of all terms on the LHS accumulated is known as the total order of the system, e.g:
x0 = . . . x0 = ...
⇒ Total Order = 2 ⇒ Total Order = 3
y0 = . . . y 00 = . . .
• Total order of the system determines the amount initial conditions needed.
• The solutions x(t) and y(t) define the solution curve parametrically.
⇒ ~z 0 = A~z + ~r(t)
55
• Higher order ODEs can be converted to first order systems, given an ODE with form:
y (4) + a · y (3) + m · y 00 + b · y 0 + k · y = 0
y (4) = −k · y − b · y 0 − m · y 00 − a · y (3)
0
x1 = x2 0
x1 0 1 0 0 x1
0 0
x2 = x3 x 0 0 1 0
x2
2
⇒ 0 =
0 x 0
x3 = x4 3 0 0 1
x3
0
0 x4 −k −b −m −a x4
x4 = −k · x1 −b · x2 −m · x3 −a · x4
• The order of the ODE is equivalent to the total order of the system.
56
5.2 Elimination [Null Solution Method 1]
1. Rearrange an ODE to express a variable in terms of the other variable and its derivatives.
2. Substitute the rearranged equation into the other ODE and simplify, producing a new ODE.
4. Use the rearranged expression to derive the solution for the other variable.
Example:
Given:
x0 = −5x + 2y x(0) , y(0)
y0 = 2x − 2y
1. Rearrange:
x0 + 5x
y =
2
2. Substitute and simplify:
0
x0 + 5x x0 + 5x
= 2x − 2·
2 2
⇒ x00 + 7x0 + 6x = 0
1 −6t
= 2αe−t − βe
2
57
5.3 Eigenvalues and Eigenvectors [Null Solution Method 2]
Given the system:
~z 0 = A~z
2. Eigenvectors ~vi of A
Eigenvalues ∈ R
Eigenvalues ∈ C
• One eigenvalue produces two linearly independent real solutions therefore conjugates
are omitted.
Zero Eigenvalues
Given:
λ1 = 0 , λ2 = −2
58
Repeated Eigenvalues (Complete)
λ1 = −3 , λ2 = −3 , ... , λj = −3
Given a λ that is repeated j times, it’s defective if only k linearly independent eigenvectors
can be found, such that a further m = j − k solution vectors are needed:
(A − λI)m+1 p~m = 0
~x1 p1 + t · p~0 )
= (~
1 2
~x2 = p~2 + t · p~1 + · t · p~0
2!
..
.
1 2 1
~xm = p~m + t · p~m−1 + · t · p~m−2 + . . . + · tm · p~0
2! m!
59
5.4 Fundamental Matrices
• Given the system:
~z 0 = A~z
Letting:
~zj (t) , Null Solution j e.g: ~vj · eλj t p1 + t · p~0 ) ·
, (~ eλj t , etc
Fundamental Matrix
A fundamental matrix is formed by gathering all null solutions into a single matrix:
. ..
.. .
Ξ(t) = ~z1 (t) · · · ~zn (t)
.. ..
. .
Properties of Ξ:
1. det Ξ(t) 6= 0 ∀t
0
2. Ξ (t) = AΞ(t) (i.e. Ξ(t) solves the system equation)
• Due to the infinitely many ways of choosing eigenvectors, it infers that Ξ is one of infinitely
many fundamental matrices of A.
Φ = Ξ(t) C
60
5.5 Variation of Parameters [Particular Solution]
• Given the system:
~z 0 = A~z + ~r(t)
= Ξ(t) ~c(t)
• Plugging ~zp into the system equation produces the formula for ~c(t):
0 0
Ξ (t) ~c(t) + Ξ(t) ~c (t) = AΞ(t) ~c(t) + ~r(t)
0
Ξ(t) ~c (t) = ~r(t)
0
~c (t) = Ξ−1 (t) ~r(t)
Z t
~c(t) = Ξ−1 (τ ) ~r(τ ) dτ + ~k
0
• ~k is often omitted as only one particular solution is needed therefore it’s easier to let ~k = ~0.
61
5.6 Matrix Exponential
• While methods for solving the homogeneous solution include:
– Elimination; and
– Eigenvalue and Eigenvectors
1 2 2
eAt = I + At + A t + ...
2!
A does not need to have a full set of n independent eigenvalues/eigenvectors, but if it did:
A = V ΛV −1
1
∴ eAt = I + V ΛV −1 t + V Λ2 V −1 t2 + . . .
2!
1 2 2
= V (I + Λt + Λ t + . . . )V −1
2!
= V eΛt V −1
λt
e 1
= V .. −1
V
.
eλn t
• eAt produces a matrix, which happens to be fundamental, with the same dimension as A.
2. The infinite series infers eAt is the fundamental matrix that equals I when t = 0.
62
• Given a homogeneous system:
" #
x(0)
~z0 = A~z ~z(0) =
y(0)
~zn = eAt~z(0)
With:
~ei , Column vector i of eAt
63
5.7 Decoupling Systems
• A change in coordinate system such that the differential equations are decoupled.
• Given:
~z 0 = A~z + ~r(t)
~z 0 = V ΛV −1~z + ~r(t)
2. Let:
ϕ
~ = V −1~z ~ (t) = V −1~r(t)
µ
∴ ϕ
~ 0 = V −1~z 0 ∴ Vµ
~ (t) = ~r(t)
ϕ
~ 0 = ΛV −1 ϕ
~ + µ
~ (t)
E.g:
ϕ01 = λ1 ϕ1 + µ1 (t)
4. Once ϕ
~ has be calculated, the solution to the original system is:
~z = V ϕ
~
64
6 Graphical and Numerical Methods
65
6.1 System Model
• For most non-linear ODEs with form:
dy
= f (t, y)
dt
solutions exist yet there are no explicit formulas.
Existence Theorem
Solutions for ODEs exists when f (t, y) is a continuous function for t near 0 and y near y(0)
Uniqueness Theorem
δ
There’s only one solution per y(0) if f (t, y) is continuous.
δy
• Given:
f (t, y) = b(t)y + x(t)
dy
⇒ = b(t)y + x(t)
dt
If x(t) is continuous for all time and:
δ
δy f (t, y) = |b(t)| ≤ L
Then the solution curve for the ODE passing through y(0) is in the domain t ∈ (−∞, ∞).
With:
dy
= f (t, y)
dt
dz
= f (t, z)
dt
Then:
|y(t) − z(t)| ≤ eLt · |y(0) − z(0)|
If y(t) and z(t) solutions curves start close, they stay close.
66
6.2 Direction/Slope Field
dy
• The Direction/Slope Field is the vector field of on the ty-plane where:
dt
• Given:
t0 , Initial Time
y0 , Initial y Value
• Solution curves are often superimposed over the vector field produced by the y 0 (t) equation.
Example:
Given:
dy
= t · sin(t + y 2 )
dt
t0 = 0
y0 = 0
The solution curve and vector field is:
67
6.2.1 Autonomous ODEs
dy
= y3 − y
dt
• A solution curve with initial value y0 starting at time t1 is identical to the solution curve with
initial value y0 starting at time t2 except translated left or right.
dy
= y2
dt
t0 = 0
y0 = −2
68
6.2.2 Critical/Equilibrium Points
• Equilibrium points give information regarding how curves in the field behave.
Source
δ
f (t, y) > 0
δy y = yej
Sink
δ
f (t, y) < 0
δy y = yej
Node (Saddle)
69
• In the event:
δ
f (t, y) = 0
δy y = yej
• Solutions that stay at an equilibrium point satisfy the Existence and Uniqueness theorem.
• If the Existence and Uniqueness theorem is violated, i.e f (y)’s differential is not continuous,
then solutions can escape, e.g:
1
f (t, y) = t · y 2
δ t
∴ f (t, y) = 1
δy 2y 2
There’s a discontinuity in the derivative when y = 0 hence there are infinitely many solutions.
70
6.3 Phase Plane
• Phase planes consists of curves of systems, i.e:
x0 = f (x, y, t)
y 0 = g(x, y, t)
– Is defined parametrically, i.e x0 (t) and y 0 (t), therefore there is no time axis. Instead
traversing the curve represents the progression of time.
• The Phase plane of an ODE converted into a system reveals the long term behavior of solutions.
• Limit cycles are closed trajectories that are stable, i.e. all other solutions go towards:
– Physically represents periodic motion that if disturbed returns to its periodic state.
– There are no analytic methods to determine if a system has a Limit Cycle.
71