EE263 Homework 5 Solutions
EE263 Homework 5 Solutions
Boyd
(a) Find the eigenvalues, resolvent, and state transition matrix for the harmonic
oscillator. Express x(t) in terms of x(0).
(b) Sketch the vector field of the harmonic oscillator.
(c) The state trajectories describe circular orbits, i.e., kx(t)k is constant. Verify this
fact using the solution from part (a).
(d) You may remember that circular motion (in a plane) is characterized by the
velocity vector being orthogonal to the position vector. Verify that this holds for
any trajectory of the harmonic oscillator. Use only the differential equation; do
not use the explicit solution you found in part (a).
Solution:
(a) We have
1 s ω
(sI − A) −1
= 2 .
s + ω −ω
2 s
From this result it follows that the eigenvalues of A are given by {±jω}. The
inverse Laplace transform gives
cos ωt sin ωt
Φ(t) =
− sin ωt cos ωt
0 −ω x
T
ẋ x = x T
x = [ −ωx2 ωx1 ] 1 = 0
ω 0 x2
This shows that the velocity vector is always orthogonal to the position vector,
as claimed.
1
10
−2
−4
−6
−8
−10
−10 −8 −6 −4 −2 0 2 4 6 8 10
d At
(b) Carefully show that dt
e = AeAt = eAt A.
Solution:
(a) We will show that if A and B commute then eA eB = eA+B . We begin by writing
the expressions for eA and eB
A2 A3
eA = I + A ++ + ···
2! 3!
B2 B3
eB = I + B + + + ···
2! 3!
Now we multiply both expressions and get
A2 B 2 A3 A2 B AB 2 B 3
eA eB = I + A + B + AB + + + + + + + ···
2! 2! 3! 2! 2! 3!
A2 + 2AB + B 2 A3 + 3A2 B + 3AB 2 + B 3
= I +A+B+ + + ···
2! 3!
Now we note that, if A and B commute, we are able to write things such as
(A + B)2 = A2 + 2AB + B 2 . So, if A and B commute we can finally write
(A + B)2 (A + B)3
eA eB = I + (A + B) + + + · · · = eA+B
2! 3!
2
(b) It suffices to note that A commute with itself. Then one can write
deAt A3 t2
= A + A2 t + + ···
dt 2!
(At)2
= A(I + At + + · · ·)
2!
(At)2
= (I + At + + · · ·)A
2!
= AeAt = eAt A
10.4 Two-point
" boundary
# value problem. Consider the system described by ẋ = Ax, where
−1 1
A= .
−1 1
(a) Find eA .
(b) Suppose x1 (0) = 1 and x2 (1) = 2. Find x(2). (This is called a two-point boundary
value problem, since we are given conditions on the state at two time points instead
of the usual single initial point.)
Solution:
(a) Many methods can be used to find eA . In this case, power series expansion may
be the easiest, since Ak = A2 = 0 for all k ≥ 2:
0 1
A
e =I +A= .
−1 2
x1 (2) 0 1 x1 (1)
=
x2 (2) −1 2 2
2
0 1 1
=
−1 2 x2 (0)
−1 2 1
=
−2 3 x2 (0)
2x2 (0) − 1
= .
3x2 (0) − 2
Examining the first line yields x1 (2) = 2 and so x2 (0) = 1.5; substituting into the
last yields x(2) = [ 2 2.5 ]T .
3
Solutions to additional exercises
1. Scalar time-varying linear dynamical system. Show that the solution of ẋ(t) = a(t)x(t),
where x(t) ∈ R, is given by
Z t
x(t) = exp a(τ ) dτ x(0).
0
(You can just differentiate this expression, and show that it satisfies ẋ(t) = a(t)x(t).)
Find a specific example showing that the analogous formula does not hold when x(t) ∈
Rn , with n > 1.
Solution. Differentiating the given expression, we obtain
!
d Zt t
Z
ẋ(t) = a(τ ) dτ exp a(τ ) dτ x(0)
dt 0 0
Z t
= a(t) exp a(τ ) dτ x(0)
0
= a(t)x(t).
For the second part, we look for a counterexample with x(t) ∈ R2 . We let
(
A1 0 ≤ t < 1
A(t) =
A2 t ≥ 1,