-
Applied Differential CalculusLecture 2: Second-order ordinary
differential equations
Authors:Manuel Carretero, Luis L. Bonilla, Filippo Terragni,
Sergei Iakunin,
Roćıo Vega
Bachelor’s Degree in Computer Science and Engineering andDual
Bachelor in Computer Science and Engineering and Business
Administration.
Applied Differential Calculus (OCW-UC3M) Lecture 2 1 / 18
-
Outline
Outline
Linear second order ODEs.
Variation of parameters.
Method of undetermined coefficients.
Reduction of order.
Supplementary material: Resonance.
Applied Differential Calculus (OCW-UC3M) Lecture 2 2 / 18
-
Linear second order ODEs
General properties
Existence and uniqueness: a(t), b(t), f (t) continuous on
interval I .Then for each t0 in I and each set of values of y0, v0,
the IVP:
y ′′ + a(t)y ′ + b(t)y = f (t), y(t0) = y0, y′(t0) = v0,
has a unique solution y(t) for t ∈ I .Superposition principle
for undriven ODE: y1(t), y2(t) are solutions ofthe homogeneous ODE
with f (t) = 0. Then y(t) = c1y1(t) + c2y2(t)is also a solution (ci
are arbitrary constants).
For independent solutions yi (t), with Wronskian determinantW
(y1, y2) = y1y
′2 − y2y ′1 6= 0, y(t) = c1y1(t) + c2y2(t) is the general
solution. Abel formula: ddtW (y1, y2) = −a(t)W (y1, y2), f (t) =
0.Particular solution yp(t) of the driven ODE gives general
solution:y(t) = yp(t) + c1y1(t) + c2y2(t) if y1(t), y2(t) are
independentsolutions of the homogeneous ODE.
Applied Differential Calculus (OCW-UC3M) Lecture 2 3 / 18
-
Linear second order ODEs
Visualizing solutions: damped spring
10 5 0 5 10y
60
40
20
0
20
40
60
y′ 20 22 24 26 28 30 32 34
t
10
5
0
5
10
y
20 22 24 26 28 30 32 34t
604020
0204060
y′
y ′′ + 0. 4y ′ + 65 = 0, y(20) = 9, y ′(20) = 0
y
105
05
10
y ′
6040
20020
4060
t
05
10
15
20
25
30
35
y ′′ + 0. 4y ′ + 65 = 0, y(20) = 9, y ′(20) = 0
Applied Differential Calculus (OCW-UC3M) Lecture 2 4 / 18
-
Linear second order ODEs
Visualizing solutions: driven damped spring
0.2 0.1 0.0 0.1 0.2y
2
1
0
1
2
y′ 0 5 10 15 20
t
0.2
0.1
0.0
0.1
0.2
y
0 5 10 15 20t
2
1
0
1
2
y′
y ′′ + 0. 1y ′ + 64 = sin(8. 6t), y(0) = 0, y ′(0) = 0
y
0.20.1
0.00.1
0.2
y ′
2
1
01
2
t
0
5
10
15
20
y ′′ + 0. 1y ′ + 64 = sin(8. 6t), y(0) = 0, y ′(0) = 0
Applied Differential Calculus (OCW-UC3M) Lecture 2 5 / 18
-
Linear second order ODEs
Visualizing solutions: driven undamped spring
0.00 6.25 12.50 18.75 25.00t
0.250
0.125
0.000
0.125
0.250
y
0.00 6.25 12.50 18.75 25.00t
1.250
0.625
0.000
0.625
1.250
y′
y ′′ + 36y ′ = 3sin(4t), y(0) = 0, y ′(0) = 0
0.2 0.1 0.0 0.1 0.2y
1
0
1
y′
y ′′ + 36y ′ = 3sin(4t), y(0) = 0, y ′(0) = 0
Applied Differential Calculus (OCW-UC3M) Lecture 2 6 / 18
-
Linear second order ODEs
Visualizing solutions: vector field undamped spring
y ′′ + 4y = 0, equivalent to y ′ = v , v ′ = −4y .
4 2 0 2 4y
4
2
0
2
4
v
y ′ = v, v ′ = − 4y
4 2 0 2 4y
4
2
0
2
4
v
y ′ = v, v ′ = − 4y
Applied Differential Calculus (OCW-UC3M) Lecture 2 7 / 18
-
Linear second order ODEs
Visualizing solutions: vector field damped spring
y ′′ + 0.4y ′ + 65y = 0, equivalent to y ′ = v , v ′ = −65y −
0.4v .
10 5 0 5 10y
60
40
20
0
20
40
60
v
y ′ = v, v ′ = − 65y− 0. 4v
10 5 0 5 10y
60
40
20
0
20
40
60
v
y ′ = v, v ′ = − 65y− 0. 4v, y(0) = 8, v(0) = 0
Applied Differential Calculus (OCW-UC3M) Lecture 2 8 / 18
-
Linear second order ODEs
Visualizing solutions: saddle point
y ′′ + y ′ − 2y = 0, equivalent to y ′ = v , v ′ = 2y − v .
4 2 0 2 4y
4
2
0
2
4
v
y ′ = v, v ′ = 2y− v
4 2 0 2 4y
4
2
0
2
4
v
y ′ = v, v ′ = 2y− v
Applied Differential Calculus (OCW-UC3M) Lecture 2 9 / 18
-
Variation of parameters
Variation of parameters
Inhomogeneous ODE: au′′ + bu′ + cu = F (t).
u1(t), u2(t) are independent solutions of the homogeneous
ODE.
Particular solution of the inhomogeneous ODE:
up(t) = −u1(t)∫ tt0
u2(s)F (s)ds
a(s)W (u1, u2)(s)+ u2(t)
∫ tt0
u1(s)F (s)ds
a(s)W (u1, u2)(s),
where W (u1, u2) = u1u′2 − u2u′1 is the Wronskian
determinant.
General solution is u(t) = up(t) + c1u1(t) + c2u2(t).
Applied Differential Calculus (OCW-UC3M) Lecture 2 10 / 18
-
Undetermined coefficients
Method of undetermined coefficients
F (t) up(t)
Pn(t) = a0tn + a1t
n−1 + . . .+ an ts(A0t
n + A1tn−1 + . . .+ An)
Pn(t)eαt ts(A0t
n + A1tn−1 + . . .+ An)e
αt
Pn(t)
{cosβtsinβt
ts [(A0tn + A1t
n−1 + . . .+ An) cosβt
+(B0tn + B1t
n−1 + . . .+ Bn) sinβt]
Particular solutions of the ODE au′′ + bu′ + cu = F (t)
depending on theform of the source term F (t). Here s is the
smallest nonnegative integer(s = 0, 1, or 2) that will ensure that
no term in up(t) is a solution of thecorresponding homogeneous
equation. Equivalently, for the three cases, sis the number of
times 0 is a root of the characteristic equation, α is aroot of the
characteristic equation, and iβ is a root of the
characteristicequation, respectively.
Applied Differential Calculus (OCW-UC3M) Lecture 2 11 / 18
-
Reduction of order
Reduction of order
Let u1(t) be a solution of a(t)u′′ + b(t)u′ + c(t)u = 0. The
substitution
u(t) = u1(t)v(t) transform the ODE a(t)u′′ + b(t)u′ + c(t)u = F
(t) in a
first-order ODE for v ′:
a(t)v ′′ +
[b(t) + 2
u′1u1
]v ′ =
F (t)
u1(t).
Example. u′′ − 1+tt u′ + ut = 0 is solved by u1 = 1 + t. u = (1
+ t)v gives:
(1 + t)v ′′ + 2v ′ − (1 + t)2
tv ′ = 0 =⇒ v
′′
v ′= 1 +
1
t− 2
1 + t
or ln v ′ = t + ln t(1+t)2
=⇒ v ′ = tet(1+t)2
=⇒ v =∫
tetdt(1+t)2
=
− tet1+t +∫etdt = e
t
1+t . Thus u = et is the other independent solution.
Applied Differential Calculus (OCW-UC3M) Lecture 2 12 / 18
-
Reduction of order
Nonlinear autonomous ODE
u′′ + V ′(u) = 0 =⇒ 0 = u′[u′′ + V ′(u)] = ddt
[u′2
2+ V (u)].
Then u′2
2 + V (u) = C and
±∫
du√2[C − V (u)]
= t − t0.
Example: Pendulum : ml θ̈ = −mg sin θ =⇒ 12 θ̇2 + gl (1− cos θ)
= C .
θ
v
Applied Differential Calculus (OCW-UC3M) Lecture 2 13 / 18
-
Supplementary material: Resonance
Linear oscillations and resonance
Damped pendulum with force −γθ̇ −mgl sin θ:
θ̈ +γ
mlθ̇ +
g
lsin θ = 0.
Use sin θ ≈ θ and t = ω0t̃, with ω0 =√
gl ,
θ̈ + 2βθ̇ + θ = 0, β =γ
2m√gl.
λ2 + 2βλ+ 1 = 0 gives λ = −β ±√β2 − 1.
β > 1, overdamped pendulum: θ = e−βt(ae√β2−1t + be
√β2−1t).
0 ≤ β < 1, underdamped pendulum: θ(t) = ce−βt cos(Ωt + ϕ),Ω
=
√1− β2. Also θ = e−βt(a cos Ωt + b sin Ωt), a + ib = ce iϕ.
Applied Differential Calculus (OCW-UC3M) Lecture 2 14 / 18
-
Supplementary material: Resonance
Particular solution: transfer function
Add periodic forcing term (coefficient can be set equal to
1):
θ̈ + 2βθ̇ + θ = cosωt.
For a force e iωt
θ(t) = Re H(iω)e iωt = Re1
1− ω2 + 2iβωe iωt ,
where H(r) = 1/(r2 + 2βr + 1) is the transfer function.
Amplitude and phase shift of transfer function:
M(ω) =1√
(1− ω2)2 + 4β2ω2, ϕ(ω) = − arctan 2βω
1− ω2.
If ω < 1, −π < ϕ(ω) < 0. Steady solution is θ(t) = M(ω)
cos[ωt + ϕ(ω)].
Applied Differential Calculus (OCW-UC3M) Lecture 2 15 / 18
-
Supplementary material: Resonance
Gain and phase shift (Bodé plots)
Gain M(ω) (ratio of amplitude of response to force
amplitude):
10-1 100 101
ω
10-2
10-1
100
101
M(ω
)
10-1 100 101
ω
180
160
140
120
100
80
60
40
20
0
Phase
shift φ(ω
) (i
n d
egre
es)
Resonance:
max M(ω) =1
2β√
1− β2, ωmax =
√1− 2β2.
As β → 0+, M(ω)→ +∞.Applied Differential Calculus (OCW-UC3M)
Lecture 2 16 / 18
-
Supplementary material: Resonance
Resonance
Spring driven by a periodic forcing term:
θ̈ + 2βθ̇ + θ = cosωt.
General solution:
θ(t) = M(ω) cos[ωt + ϕ(ω)] + ce−βt cos[Ωt + ϕ0], Ω =√
1− β2
M(ω) =1√
(1− ω2)2 + 4β2ω2, ϕ(ω) = − arctan 2βω
1− ω2.
Undamped oscillator with θ(0) = θ̇(0) = 0:
θ(t) =cosωt − cos t
1− ω2=
2 sin (1−ω)t21− ω2
sin(1 + ω)t
2=⇒ θ ≈ t
2sin t (ω → 1).
Applied Differential Calculus (OCW-UC3M) Lecture 2 17 / 18
-
Soft and hard springs
Soft and hard springs
my ′′ = −ky ∓ αy3 − cy ′; +: soft spring; -: hard spring.
V (y) =k
2my2 ± α
4my4.
For c = 0, y′2
2 + V (y) = E and V (ytp) = E , ytp > 0, give the period
±∫ y du√
2[E − V (u)]= t − t0 =⇒ P = 4
∫ ytp0
du√2[E − V (u)]
.
10 5 0 5 10y
20
10
0
10
20
v
y ′ = v, v ′ = − 10y+ 0. 2y3 − 0. 2v− 9. 8
10 5 0 5 10y
20
10
0
10
20v
y ′ = v, v ′ = − 10y+ 0. 2y3 − 0. 2v− 9. 8
Applied Differential Calculus (OCW-UC3M) Lecture 2 18 / 18
OutlineLinear second order ODEs Variation of parameters
Undetermined coefficientsReduction of orderSupplementary material:
ResonanceSoft and hard springs