Controltheory PDF
Controltheory PDF
Controltheory PDF
THEORY
Terje Sund
August 9, 2012
CONTENTS
INTRODUCTION
1. FUNCTIONS OF SEVERAL VARIABLES
2. CALCULUS OF VARIATIONS
3. OPTIMAL CONTROL THEORY
INTRODUCTION
1
Rt
functions x(t) that make the integral t01 F (t, x(t), ẋ(t)) dt maximal or mini-
mal. Optimal control theory has since the 1960-s been applied in the study of
many different fields, such as economical growth, logistics, taxation, exhaus-
tion of natural resources, and rocket technology (in particular, interception
of missiles).
Before we start on the calculus of variations and control theory, we shall need
some basic results from the theory of functions of several variables. Let A ⊆
Rn , and let F : A → R be a real valued function defined p on the set A. We
let F (~x) = F (x1 , . . . , xn ), ~x = (x1 , . . . , xn ) ∈ A, ||~x|| = x21 + · · · + x2n . ||~x||
is called (the Euklidean) norm of ~x.
A vector ~x0 is called an inner point of the set A, if there exists a r > 0
such that
B(~x0 , r) = {~x ∈ Rn : ||~x − ~x0 || < r} ⊆ A.
We let
A0 = {~x0 ∈ A : ~x0 is an inner point of A}
The set A0 is called the interior of A. Let
hence ~ei has a 1 on the i-th entry, 0 on all the other entries.
Definition 1. let ~x0 ∈ A be an inner point. The first order partial
derivatives Fi0 (~x0 ) of F at the point ~x0 = (x01 , . . . , x0n ) with respect to the
i-th variable xi , is defined by
1
Fi0 (~x0 ) = lim [F (~x0 + h~ei ) − F (~x0 )]
h→0 h
1
= lim [F (x01 , . . . , x0i + h, x0i+1 , . . . , x0n ) − F (x01 , . . . , x0n )],
h→0 h
2
We also write
∂F
Fi0 (~x0 ) = (~x0 ) = Di F (~x0 ) (1 ≤ i ≤ n)
∂xi
for the i-th first order partial derivative of of F i ~x0 .
Second order partial derivatives are written
0 ∂ 2F
Fi,j (~x0 ) = (~x0 ) = Di,j F (~x0 ) (1 ≤ i ≤ n)
∂xj ∂xi
where we let
∂ 2F ∂ ∂F
(~x0 ) = (~x0 ) = Fj0 (Fi0 (~x0 )).
∂xj ∂xi ∂xj ∂xi
The gradient of the function F at ~x0 is the vector
∂F ∂F
∇F (~x0 ) = ( (~x0 ), . . . , ( (~x0 ))
∂x1 ∂xn
Mc = {~x : F (~x) = c}
3
Tangent the equation at the point (1, 2) for the level surface (the level curve)
x21 x2 = 2 is ∇F (1, 2) · (~x − (1, 2)) = 0, hence (4, 1) · (x1 − 1, x2 − 1) = 0,
4x1 − 4 + x2 − 2 = 0, that is 4x1 + x2 = 6.
Example 3. Let F (x1 , x2 , x3 ) = x21 + x22 + x23 , and consider the level
surface
x21 + x22 + x23 = 1,
the sphere with radius 1 and centre at the origin. (a) Then
∇F (x1 , x2 , x3 ) = 2(x1 , x2 , x3 )
1 1 1 2
∇F ( √ , √ , √ ) = √ (1, 1, 1).
3 3 3 3
2 1 1 1
√ (1, 1, 1) · (x1 − √ , x2 − √ , x3 − √ ) = 0,
3 3 3 3
2 2 3
√ (x1 + x2 + x3 ) = √ √ ,
3 3 3
√
x1 + x2 + x3 = 3.
(b) Here
3 4 3 4 2
∇F (0, , ) = 2(0, , ) = (0, 3, 4)
5 5 5 5 5
3 4
The tangent plane at (0, 5 , 5 ) has the equation
2 3 4
(0, 3, 4) · (x1 − 0, x2 − , x3 − ) = 0,
5 5 5
3 4
0 + 3(x2 − ) + 4(x3 − ) = 0,
5 5
3x2 + 4x3 = 5.
4
Remark 1. The average growth of F from ~x of ~x + h~a is
1
[F (~x + h~a) − F (~x)],
h
hence the above definition is natural if we think of the derivative as a rate of
change.
Definition 2. We say that F is continuously differentiable, or C 1 , if the
function F~a0 (~x) is continuous at ~x for all ~a ∈ Rn and all ~x ∈ A0 , that is if
if F is C 1 , then we can show that the map ~a 7→ F~a0 (~x) is linear, for all
~x ∈ A0 . We show first the following version of the Mean Value Theorem for
functions of several variables,
Proposition 1 (Mean Value Theorem). Assume that F is continuously
differentiable on an open set A ⊆ Rn and that the closed line segment
5
~ = θx + (1 − θ)~y lies on the open line segment (~x, ~y ). Hence we have
where w
proved the Mean Value Theorem.
Proposition 2. Let ~x ∈ A0 be given. If F is C 1 , then
that is, for each fixed ~x, the map ~a 7→ F~a0 (~x) is a linear map of Rn into R.
Proof. (1) if c = 0, it is clear that both sides of (1) are equal to 0.
Assume that c 6= 0. Then
1
Fc~0a (~x) = lim [F (~x + hc~a) − F (~x)]
h→0 h
1
= c · lim [F (~x + hc~a) − F (~x)]
h→0 hc
k=hc 1
= c lim [F (~x + k~a) − F (~x)] = cF~a0 (~x).
k→0 h
(2) F is C 1 hence F~a0 (~x) and F~b0 (~x) exist. Since x ∈ A0 , exists r > 0 such
that
||~x − ~y || < r ⇒ ~y ∈ A.
Choose h such that
Then
~x + h(~a + ~b) ∈ A and ~x + h~b ∈ A,
hence
We apply the Mean Value Theorem to the expression in the first bracket.
Thus there exists a θ ∈ (0, 1) such that
6
By part (1) we have
0
Fh~ x + h~a + θh~b) = hF~a0 (~x + h~a + θh~b)
a (~
n n
X X ∂F
F~a0 (~x) = ai F~e0i (~x) = ai (~x) = ∇F (~x) · ~a.
i=1 i=1
∂xi
As a consequence we have,
Corollary 1. If F is C 1 on A ⊆ Rn , then
for all ~x ∈ A0 .
If ||~a|| = 1, then F~a0 (~x) is often called the directional derivative of F at
the point ~x in the direction of ~a. From Corollary 1 it follows easily that
Corollary 2. F is continuously differentiable at the point ~x0 ⇔ ∇F is
continuous at the point ~x0 ⇔ all the first order partial derivatives of F are
continuous at ~x0 .
Proof. Let ~a = (a1 , . . . , an ) ∈ Rn , ||~a|| = 1. Then
This proves that F~a0 (~x) − F~a0 (~x0 ) −→ 0 ⇔ ∇F (~x) − ∇F (~x0 ) −→ 0. Hence
x→~
~ x0 x→~
~ x0
F is continuously differentiable at the point ~x0 ⇔ ∇F is continuous at ~x0 .
7
If we let ~a = ~ei , (1 ≤ i ≤ n), we find that ∂x ∂F
i
(~x) = F~e0i (~x) is continuous at
~x0 for i = 1, . . . , n if F is continuously differentiable i ~x0 . Conversely, if the
∂F
partial derivatives ∂x i
(~x0 ) are continuous for i = 1, . . . n, then
n n
X X ∂F
F~a0 (~x) = ai F~e0i (~x) = ai (~x)
i=1 i=1
∂xi
t~x + (1 − t)~y ∈ S
Using the triangle inequality and that ||t~u|| = |t| · ||~u||, ~u ∈ Rn , we find that
x21 x22
S = {(x1 , x2 ) : + 2 ≤ 1}
a2 b
er a convex subset of R2 .
Concave and convex functions. A C 2 −function (that is, a func-
tion possessing a continuous second derivative) f : [a, b] → R is concave if
f 00 (x) ≥ 0 for all x in the open interval (a, b). The function f is convex if
8
f 00 (x) ≥ 0 for all x ∈ (a, b). If f is convex, we see see geometrically that the
chord [(x, f (x))] always lies under or on the graph of f . Equivalently, the
inequality
(∗) tf (x) + (1 − t)f (y) ≤ f (tx + (1 − t)y),
holds for all x, y ∈ (a, b), and all t ∈ [0, 1]. The converse is also right: If
(∗) holds, then f is concave. For functions of several variables, the second
derivative at a vector ~x is no real number, but a bilinear function. As a
consequence, we will use the inequality (∗) when we define concavity for
functions of several variables.
Definition 3. Let S be a convex subset of Rn and let f be a real valued
function defined on S. We say that f is concave if f satisfies the inequality
for all ~x, ~y ∈ S and all t ∈ [0, 1]. A function f is called convex if the opposite
inequality holds. The function is strongly concave (respectively strongly
convex) if strict inequality holds in (∗∗).
Remark 2. That f is concave, means geometrically that the tangent
plane of the surface z = f (~x) lies over (or on) the surface at every point
(~y , f (~y )): the equation for the tangent plane through the point (~y , f (~y ))is
hence
f (~x) ≤ z = ∇f (~y ) · (~x − ~y ) + f (~y )
for all ~x on the tangent plane.
Proposition 3. Assume that the functions f and g are defined on a
convex set S ⊆ Rn . Then the following statements hold
(a) If f and g are concave and a ≥ 0, b ≥ 0, then the function af + bg is
concave.
(b) If f and g are convex and a ≥ 0 then the function af + bg is convex.
Proof. (b): Assume that f and g are convex, a ≥ 0, b ≥ 0. Set h(~x) =
af (~x) + bg(~x) (~x ∈ S), and let t ∈ (0, 1). For all ~x, ~y ∈ S then
9
Accordingly h convex.
Part (a) is shown in the same way.
The following useful ”2nd derivative test” holds:
Proposition. Let f : S ⊆ R2 → R, where S is open and convex. If all
the 2nd order partial derivatives of f are continuous (that is, f is C 2 on S),
then
∂ 2f ∂ 2f
(a) f is convex ⇔ (~
x ) ≥ 0, (~x) ≥ 0 and
∂x21 ∂x22
2
∂ 2f ∂ 2f ∂ 2 f (~x)
(~
x ) (~
x ) − ≥ 0 for all ~x ∈ S.
∂x21 ∂x22 ∂x1 ∂x2
∂ 2f ∂ 2f
(b) f is concave ⇔ (~
x ) ≤ 0, (~x) ≤ 0 and
∂x21 ∂x22
2
∂ 2f ∂ 2f ∂ 2 f (~x)
(~
x ) (~
x ) − ≥ 0 for all ~x ∈ S.
∂x2 ∂x22 ∂x1 ∂x2
We vil prove this proposition below (see Proposition 8). First we shall
need some results on symmetric 2 × 2 matrices Let
a b
Q=
b c
10
Proof. ⇐: assume that a ≥ 0, b ≥ 0 and ac − b2 ≥ 0. if a = 0, vil
ac − b2 = −b2 ≥ 0
then b = 0. Hence
x1 0 0 x1
(x1 , x2 )Q = (x1 , x2 )
x2 0 c x2
0
= (x1 , x2 ) = cx22 ≥ 0,
cx2
b ac − b2 2
= a[(x1 + x2 )2 + x2 ] ≥ 0
a a2
for all (x1 , x2 ) ∈ R2 . Hence is Q ≥ 0.
⇒: Assume that Q ≥ 0, then ~xt Q~x ≥ 0, ~x ∈ R2 . In particular,
a b 1
(1, 0) =a≥0
b c 0
and
a b 0
(0, 1) =c≥0
b c 1
Proof. consider
g(t + h) − g(t) f (~r(t + h)) − f (~r(t))
(∗) =
h h
Since S is open, there exists an open sphere Br with positive radius and centre
at ~r(t) which is contained in S. We choose h 6= 0 so small that ~r(t + h) ∈ Br .
Set ~u = ~r(t + h), ~v = ~r(t). Then the numerator on the right hand side of (∗)
is f (~u) − f (~v ). By applying the Mean Value Theorem to the last difference,
we obtain
f (~u) − f (~v ) = ∇f (~z) · (~u − ~v ),
where ~z = ~u + θ(~u − ~v ) for a θ ∈ (0, 1). Hence the difference quotient in (∗)
may be written
1 1
(∗∗) [g(t + h) − g(t)] = ∇f (~z) · [(~r(t + h)) − (~r(t))]
h h
12
As h → 0, we find ~u → ~v , so that ~z → ~u. Sincef is C 1 , is ∇f continuous,
∇f (~z) → ∇f (~u) = ∇f (~r(t)). Therefore the right side of (∗∗) converges to
∇f (~r(t)) ·~r 0 (t). This shows that g 0 (t) exists and is equal to the inner product
∇f (~r(t)) · ~r 0 (t).
If the function f is defined on an open subset S of R2 for which the partial
derivatives of 2nd order exist on S, then we may ask if the two mixed partial
2f 2f
derivative are equal. That is, if ∂x∂1 ∂x2
= ∂x∂2 ∂x 1
. This is not always the case
however, the following result which we state without proof, will be sufficient
for our needs.
Proposition 7. Assume that f is a real valued function defined on an
open subset S of R2 and that all the first and second order partial derivatives
of f are continuouse on S. Then
∂ 2f ∂ 2f
(~x) = (~x),
∂x1 ∂x2 ∂x2 ∂x1
for all ~x i S.
Proof. See for instance Tom M. Apostol, Calculus Vol. II, 4.25.
Next we will apply the last four propositions to prove
Proposition 8. Let f be a C 2 function defined on an open convex subset
S of R2 . Then the following statements hold,
2 2 2 2 2f
(a) f is convex ⇔ ∂∂xf2 ≥ 0, ∂∂xf2 ≥ 0 and ∆f = ∂∂xf2 ∂∂xf2 − ( ∂x∂1 ∂x 2
)2 ≥ 0
1 2 1 2
∂2f ∂2f
(b) f is concave ⇔ ∂x21
≤ 0, ∂x22
≤ 0 and ∆f ≥ 0
∂2f
(c) ∂x21
> 0 and ∆f > 0 ⇒ f is strictly convex.
∂2f
(d) ∂x21
< 0 and ∆f > 0 ⇒ f is strictly concave.
Alle the above inequalities are supposed to hold at each point of S.
Proof. (a) ⇐: Choose two arbitrary vectors ~a, ~b in S, and let t ∈ [0, 1].
We consider the function g given by
Put ~r(t) = ~b + t(~a − ~b), thus g(t) = f (~r(t)). Let ~a = (a1 , a2 ), ~b = (b1 , b2 ). The
13
Chain Rule yields
14
In order to see this, let λ ∈ [0, 1], t and s ∈ I. Then
f is concave ⇔
n
X ∂f
(1) f (~x) − f (~y ) ≤ ∇f (~y ) · (~x − ~y ) = (~y )(xi − yi )
i=1
∂xi
for all ~x, ~y ∈ S.
Proof. ⇒: Assume that f is concave, and let ~x, ~y ∈ S. For all t ∈ (0, 1) :
we know that
tf (~x) + (1 − t)f (~y ) ≤ f (t~x − (1 − t)~y ),
15
that is
t(f (~x) − f (~y )) ≤ f (t(~x − ~y ) + ~y ) − f (~y )
hence
1
f (~x) − f (~y ) ≤ [f (~y + t(~x − ~y )) − f (~y )]
t
If we let t → 0, we find that the expression to the right approaches the
derivative of f at ~y along ~x − ~y . Hence,
1
f (~x) − f (~y ) ≤ lim [f (~y + t(~x − ~y )) − f (~y )] = f~x0 −~y (~y )
t→0 t
= ∇f (~y ) · (~x − ~y )
⇐: Assume that the inequality (1) holds. Let ~x, ~y ∈ S, and let t ∈ (0, 1). We
put
~z = t~x + (1 − t)~y .
It is clear that ~z ∈ S, since S is convex. By (1),
16
Remark 3. We also have that f is strictly concave ⇔ proper inequality
holds in (1). Corresponding results with the opposite inequality (respectively
the opposite proper inequality) in (1), holds for convex (respectively strongly
convex) functions.
Definition 5. Let f : S ⊆ Rn → R, and let ~x∗ = (x∗1 , . . . , x∗n ) ∈ S.
A vector ~x∗ is called a (global) maximum point for f if f (~x∗ ) ≥ f (~x) for
all ~x ∈ S. Similarly we define global minimum point. ~x∗ is called a local
maximum point for f if there exists a positive r such that f (~x∗ ) ≥ f (~x) for
all ~x ∈ S that satisfies ||~x − ~x∗ || < r.
A stationary (or critical) point for f is a point ~y ∈ S such that ∇f (~y ) = ~0,
that is, all the first order partial derivatives of f at the point ~y are zero,
∂f
∂xi
(~y ) = 0 (1 ≤ i ≤ n).
If ~x∗ is a local maximum- or minimum point in the interior S 0 of S, then
∇f (~x∗ ) = ~0 :
∂f ∗ 1
(~x ) = lim+ [f (~x∗ ) − f (~x∗ + h~ei )] ≥ 0
∂xi h→0 h
and
∂f ∗ 1
(~x ) = lim− [f (~x∗ ) − f (~x∗ + h~ei )] ≤ 0,
∂xi h→0 h
∂f
and hence ∂x i
(~x∗ ) = 0, (1 ≤ i ≤ n). For arbitrary C 1 -functions f the
condition ∇f (~x∗ ) = ~0 is not sufficient to ensure that f has a loal maximum
or minimum at ~x∗ , however, if f is convex or concave, the following holds,
Proposition 10. Let f be a real valued C 1 function defined on a convex
subset S of Rn , and let ~x∗ ∈ S. The following holds
Proof. (a)
⇒: We have seen above that if ~x∗ is a local maximum point for f , then
∇f (~x∗ ) = ~0.
17
⇐: Assume that ~x∗ is a stationary point and that f is concave. For all ~x ∈ S
it follows from the gradient inequality in Proposition 9 that
hence U is concave.
(b) is proved as (a).
(c) and (d): Apply (a) and (b) to the function −G. (Notice that G is convex
and decreasing ⇔ −G is concave and increasing.)
2 CALCULUS OF VARIATIONS.
We may say that the basic problem of the calculus of variations is to deter-
mine the maximum or minimum of an integral of the form
Z t1
(1) J(x) = F (t, x(t), ẋ(t)) dt,
t0
18
where F is a given C 2 −function of three variables and x = x(t) is an unknown
C 2 function on the interval [t0 , t1 ], such that
(2) x(t0 ) = x0 , and x(t1 ) = x1 ,
where x0 and x1 are given numbers. Additional side conditions for the prob-
lem may also be included. Functions x that are C 2 and satisfy the endpoint
conditions (2) are called admissible functions.
Example 1. (Minimal surface of revolution.)
Consider curves x = x(t) in the tx−plane, t0 ≤ t ≤ t1 , all with the same
given, end points (t0 , x0 ), (t1 , x1 ). By revolving such curves around the t−axis,
we obtain a surface of rvolution S.
Problem. Which curve x gives the smallest surface of revolution?
If we assume that x(t) ≥ 0, the area of S is
Z t1 √
A(x) = 2πx 1 + ẋ2 dt
t0
Our problem is to determine the curve(s) x∗ for which min A(x) = A(x∗ ),
when x(t0 ) = x0 , x(t1 ) = x1 . This problem is of the same type as in (1)
above.
We shall next formulate the main result for problems of the type (1).
Theorem 1. (”Main Theorem of the Calculus of Variations”)
Assume that F is a C 2 −function defined on R3 . Consider the integral
Z t1
(∗) F (t, x, ẋ) dt
t0
19
A proof of Theorem 1 will be given below. First we consider
Example 2. Solve
Z 1
min (x2 + ẋ2 ) dt, x(0) = 0, x(1) = e2 − 1.
x 0
∂F d ∂F d
We let F (t, x, ẋ) = x2 + ẋ2 . Then ∂x
= 2x, dt ∂ ẋ
= dt
(2ẋ) = 2ẍ. Hence the
Euler equation of the problem is
ẍ − x = 0,
is the only possible solution, by the first part of Theorem 1. Here F (t, x, ẋ) =
x2 + ẋ2 is convex as a function of (x, ẋ), for each t. As a consequence of the
last part of Theorem 1, we conclude that x does in fact solve the problem.
The minimum is
Z 1 Z 1
2 2
(x + ẋ ) dt = [(et+1 − e1−t )2 + (et+1 + e1−t )2 ] dt = . . . = e4 − 1.
0 0
We notice that t does not occur explicitly in the formula for F in this example.
Next we shall take a closer look at this particular case.
The case F = F (x, ẋ) (that is, t does not occur explicitly in the formula
of the function F ).
If x(t) is a solution of the Euler equation, then the Chain Rule yields:
d ∂F ∂F ∂F ∂F d ∂F
[f (x, ẋ) − ẋ (x, ẋ)] = ẋ + ẍ − ẍ − ẋ
dt ∂ ẋ ∂x ∂ ẋ ∂ ẋ dt ∂ ẋ
∂F d ∂F
= ẋ[ − ( )] = ẋ · 0 = 0,
∂x dt ∂ ẋ
so that
∂F
F − ẋ =C (is constant).
∂ ẋ
20
This equation is called a first integral of the Euler equation.
In order to prove Theorem 1 we will need,
The Fundamental Lemma (of the Calculus of Variations). Assume
that f : [t0 , t1 ] → R is a continuous function, and at
Z t1
f (t)µ(t) dt = 0
t0
for all C 2 −functions µ that satisfies µ(t0 ) = µ(t1 ) = 0. Then f (t) = 0 for all
t in the interval [t0 , t1 ].
Proof. If there exists an s ∈ (t0 , t1 ) such that f (s) 6= 0, say f (s) > 0,
then f (t) > 0 for all t in some interval [s − , s + ] of s since f is continuous.
We choose a function µ such that µ is C 2 and
which is C 2 . Then
Z t1 Z s+
f (t)µ(t) dt = f (t)µ(t) dt > 0.
t0 s−
since µ(t)f (t) > 0 and µ(t)f (t) is continuous on the open interval (s−, s+).
Hence we hofe obtained a contradiction.
We shall also need to ”differentiate under the integral sign”:
Proposition 2. Let g be a C 2 −function defined on the rectangle R =
[a, b] × [c, d] i R2 .
Z b
G(u) = g(t, u) dt, u ∈ [c, d].
a
Then Z b
0 ∂g
G (u) = (t, u) dt.
a ∂u
21
∂g
Proof. Let > 0. Since ∂u is continuous, it is also uniformly continuous
on R (that is, closed and bounded, hence compact). Therefore there exists a
δ > 0 such that
∂g ∂g
| (s, u) − (t, v)| < ,
∂u ∂u b−a
for all (s, u), (t, v) in R such that ||(s, u) − (t, v)|| < δ. By the Mean value
Theorem there is a θ = θ(t, u, v) between u and v such that
∂g
g(t, v) − g(t, u) = (t, θ)(v − u).
∂u
Consequently,
b
g(t, v) − g(t, u) ∂g
Z
| [ − (t, u)] dt|
a v−u ∂u
Z b
∂g ∂g
≤ | (t, θ) − (t, u)| dt
a ∂u ∂u
Z b
≤ dt = , for |v − u| < δ.
a b−a
Hence
b
G(v) − G(u) g(t, v) − g(t, u)
Z
0
G (u) = lim = lim dt
v→u v−u v→u a v−u
Z b
∂g
= (t, u) dt.
a ∂u
Proof of Theorem 1. We will consider the maximum problem (the
minimum problem is similar)
Z t1
max F (t, x, ẋ) dt
(1) x t0
when x(t ) = x and x(t ) = x , x , x given numbers.
0 0 1 1 0 1
22
is an admissible function, that is, a C 2 −function satisfying the endpoint
conditions x(t0 ) = x0 and x(t1 ) = x1 . Then we must have
for all real . Let µ be fixed. We will study I() = J(x∗ + µ) as a function
of . The function I has a maximum for = 0. Hence
I 0 (0) = 0.
Now Z t1
I() = F (t, x∗ + µ, ẋ∗ + µ̇) dt
t0
Differentiating under the integral sign (see Proposition 2 above) with respect
to µ we find, Z t1
0
∂F ∗ ∂F ∗
0 = I (0) = µ+ µ̇ dt
t0 ∂x ∂ ẋ
∗ ∗ ∗
where we put ∂F ∂x
= ∂F
∂x
(t, x∗ , ẋ∗ ) and ∂F ∂ ẋ
= ∂F
∂ ẋ
(t, x∗ , ẋ∗ ). Hence
Z t1 Z t1
0 ∂F ∗ ∂F ∗
0 = I (0) = µ dt + µ̇ dt
t0 ∂x t0 ∂ ẋ
Z t1 ∗ t1 Z t1
∂F ∗ ∂F d ∂F ∗
= µ dt + µ − µ dt (ved delvis integrasjon)
t0 ∂x ∂x t0 t0 dt ∂ ẋ
Z t1
∂F ∗ d ∂F ∗
= − µ dt (since µ(t1 ) = µ(t0 ) = 0)
t0 ∂x dt ∂ ẋ
hence t1
∂F ∗ d ∂F ∗
Z
− µ dt = 0
t0 ∂x dt ∂ ẋ
2
for all such C −functions µ with µ(t1 ) = µ(t1 ) = 0. By the Fundamental
Lemma it follows that
∂F ∗ d ∂F ∗
(2) − = 0,
∂x dt ∂ ẋ
hence x∗ satisfies the Euler equation. Using a quite similar argument we find
that an optimal solution x∗ for the minimum problem also satisfies (2).
Sufficiency: assume that F (t, x, ẋ) is concave with respect to the last
two variables (x, ẋ), and let x∗ satisfy the Euler equation with the endpoint
23
conditions of (1). We shall prove that x∗ solves the the maximum problem.
Let x be an arbitrary admissible function for the problem. By concavity the
”Gradient inequality” yields,
∂F ∗ ∂F ∗
F (t, x, ẋ) − F (t, x∗ , ẋ∗ ) ≤ (x − x∗ ) + (ẋ − ẋ∗ )
∂x ∂ ẋ
d ∂F ∗ ∂F ∗ d ∂F ∗
( )(x − x∗ ) + (ẋ − ẋ∗ ) = ( (x − x∗ )),
dt ∂ ẋ ∂ ẋ dt ∂ ẋ
for all t ∈ [t0 , t1 ]. By integration it then follows that
Z t1
F (t, x, ẋ) − F (t, x∗ , ẋ∗ ) dt
t0
t1 t1
d ∂F ∗ ∂F ∗
Z
≤ (x − x∗ ) dt = ∗
(x − x ) = 0,
t0 dt ∂ ẋ ∂ ẋ t0
where we used the endpoint conditions for x and x∗ at the last step. Hence
Z t1 Z t1
F (t, x, ẋ) dt ≤ F (t, x∗ , ẋ∗ ) dt
t0 t0
as we wanted to prove.
Remark. In the above theorem, assume instead that F is concave with
respect to (x, ẋ) (for each t ∈ [t0 , t1 ]) only in a certain open and convex
subset R of R2 . The above sufficiency proof still applies to the set V of
all admissible functions x enjoying the property that (x(t), ẋ(t)) ∈ R for all
t ∈ [t0 , t1 ]. Hence any admissible solution x∗ of the
R t Euler equation that is
also an element of V will maximize the integral t01 F (t, x, ẋ) dt among all
members of V . Consequently, we obtain a maximum relative to the set V .
Note that the proof uses the ”Gradient Inequality” (Proposition 9 in Section
1) which requires the region to be open and convex.
Example 3. We will find a solution x = x(t) of the problem
Z 1
min F (t, x, ẋ) dt
−1
t2 ẍ + 2tẋ − 12x = 0.
x(−1) = −A + B = −1
x(1) = A + B = 1
∂ 2F 2 ∂ 2F ∂ 2F
= 2t ≥ 0, = 24 > 0, = 0,
∂ ẋ2 ∂x2 ∂x∂ ẋ
and the determinant of the Hesse matrix is 24 · 2t2 = 48t2 ≥ 0. It follows that
F is convex with respect to (x, ẋ). Hence, in view of Theorem 1, x(t) = t3
gives a minimum.
(b) Suppose next that x is a solution of the Euler equation to the problem
which in addition satisfies the given endpoint conditions. If z is an arbitrary
admissible function, then µ = z − x is a C 2 -function that satisfies µ(−1) =
µ(1) = 0. Let us show that
25
where
Z 1
I= [2t2 ẋµ̇ + 24xµ] dt
−1
1 Z 1 Z 1
2 2
= 2t ẋµ − (2t ẍµ + 4tẋµ) dt + 24xµ dt (using integration by parts)
−1 −1 −1
Z 1
2µ[t2 ẍ + 2tẋ − 12x] dt
=0− µ(−1) = µ(1) = 0
−1
= 0,
where the last inequality follows from the fact that x satisfies the Euler
equation
t2 ẍ + 2tẋ − 12x = 0.
Hence Z 1
J(x + µ) − J(x) = [t2 µ̇2 + 12µ2 ] dt > 0
−1
if µ 6= 0, hence every solution of the Euler equation that satisfies the endpoint
conditions, yields a minimum. We have seen in (a) that x(t) = t3 is the only
such solution.
Exercise 1. Consider the problem min J(x), where
Z 2
J(x) = ẋ(1 + t2 ẋ) dt, x(1) = 3, x(2) = 5.
1
(a) Find the Euler equation of the problem and show that it has exactly
one solution x that satisfies the given endpoint conditions.
(b) Apply Theorem 1 to prove that the solution from (a) really solves
the minimum problem.
(c) For an arbitrary C 2 -function µ that satisfies µ(1) = µ(2) = 0, show
that Z 2
J(x + µ) − J(x) = t2 µ̇2 dt,
1
where x is the solution from (a). Explain in light of this, that x minimizes
J.
Exercise 2. A function F is given by
F (x, y) = x2 (1 + y 2 ), (x, y) ∈ R2
26
(a) Show that F is convex in the region
1
R = {(x, y) : |y| ≤ √ }
3
(b) Show that the variation problem
Z 1
min x2 (1 + ẋ2 ) dt,
0
x(0) = x(1) = 1
(c) Find the only possible solution x∗ of the variation problem. Let
ẍ + x = 0
The extremals (that is, the solutions of the Euler equation) are
Among all extremals only the zero function x∗ , x∗ (t) = 0 for all t ∈ [0, 1],
satisfies the endpoint conditions. It is easy to see, using the second-derivative
2
This section is optional.
27
test, that F (t, x, ẋ) = ẋ2 − x2 is neither concave nor convex i (x, ẋ). Hence
we cannot use Theorem 1 to decide if x∗ gives a maximum or a minimum for
the problem.
Exercise 3. Show that the function F (t, x, ẋ) = ẋ2 − x2 of the last
Example is neither convex nor concave.
The sufficiency condition stated in Theorem 3 below, is often useful for
solving problems
(1) max or min J(x)
where Z t1
J(x) = F (t, x(t), ẋ(t)) dt.
t0
is a relative maximum if there exists an r > 0 such that J(x∗ ) ≥ J(x) for all
C 2 -functions x with x(t0 ) = x0 , x(t1 ) = x1 that satisfies |x∗ (t) − x(t)| < r
for all t ∈ [0, 1]. A relative minimum x∗ is defined similarly.
Theorem 3. (Weierstrass’ sufficiency condition). Assume that an ex-
tremal x∗ for the problem (1) satisfies the endpoint conditions (2) and that
28
there exists a parameter family x(·, α) 3 , − < α < , of extremals such that
(1) x(t, 0) = x∗ (t), t ∈ [t0 , t1 ],
∂x
(2) x(·, α) is differentiable with respect to α and (t, α)α=0 6= 0,
∂α
t0 ≤ t ≤ t1 ,
(3) if α1 6= α2 , then the two curves given by x(·, α1 ) and x(·, α2 )have no
common points,
∂ 2F
(4) (t, x, ẋ) < 0 for all t ∈ [t0 , t1 ] and all x = x(·, α), α ∈ (−, )
∂ ẋ2
Then x∗ is a relative maximum for J(x) with the given endpoint conditions.
If the condition
∂ 2F
(40 ) (t, x, ẋ) > 0 for all t ∈ [t0 , t1 ] and all x = x(·, α), α ∈ (−, ),
∂ ẋ2
holds instead of (4), then x∗ is a relative minimum.
3
For fixed α, x(·, α) denotes the function t 7→ x(t, α)
29
J(x) gives the arc length of the curve x(t) between the two given points
(t0 , x0 ) and (t1 , x1 ). We wish to determine the curve x∗ that yields the
minimal arc length.
(a) Show that the Euler equation of the problem may be written
ẋ
(E) √ = c, where c is a constant different from ± 1.
1 + ẋ
(b) Show that (E) has a unique solution x∗ that satisfies the given end-
point conditions.
(c) Show that among the solutions of (E) there exists a parameter family
given by x(t, α) = x∗ (t) + α, −1 < α < 1, where x∗ is as in (b), and that the
conditions of Theorem 3 are satified such that x∗ gives a (relative) minimum.
(d) Show that F (t, x, ẋ) is convex i (x, ẋ). Conclude by Theorem 1 that
x∗ solves the minimum problem.
Other endpoint conditions. Next we will consider optimation prob-
lems for which the left end point x(t0 ) of the admissible functions x is fixed,
whereas the right end point x(t1 ) is free. In this case we have the following
result:
Theorem 4. Assume that x0 is a given number. A necessary condition
for a C 2 -function4 x∗ to solve the problem
Z t1
max (min) F (t, x(t), ẋ(t)) dt, x(t0 ) = x0 , x(t1 ) is free,
t0
30
as x∗ at the right endpoint t = t1 , satisfy J(x) ≤ J(x∗ ), hence x∗ is optimal
among those functions. However, then x∗ satisfies the Euler equation. In the
proof of the Euler equation, see the proof of Theorem 1, we considered the
function Z t1
I(α) = F (t, x∗ + αµ, ẋ∗ + αµ̇) dt
t0
After integration by parts and differentiation under the integral, we con-
cluded that
Z t1
0 ∂F ∗ d ∂F ∗ ∂F ∗ t
0 = I (0) = [ − ( )] dt + µ(t) t10 ,
t0 ∂x dt ∂ ẋ ∂ ẋ
where
∂F ∗ ∂F ∂F ∗ ∂F
(∗) = (t, x∗ (t), ẋ∗ (t)) and = (t, x∗ (t), ẋ∗ (t))
∂x ∂x ∂ ẋ ∂ ẋ
Here, at this point, we let µ be a C 2 -function such that µ(t0 ) = 0 and µ(t1 ) is
free. Since x∗ satisfies the Euler equation, the integral in (∗) must be equal
to zero, hence
∂F ∗
µ(t1 ) = 0.
∂ ẋ t=t1
∗
If we choose a µ with µ(t1 ) 6= 0, it follows that ( ∂F )
∂ ẋ t=t1
= 0.
Sufficiency: Assume that F (t, x, ẋ) is concave in (x, ẋ), and that x∗ is
an admissible function which satisfies the Euler equation and the condition
(T ). The argument led to the inequality
Z t1
F (t, x, ẋ) − F (t, x∗ , ẋ∗ ) dt
t0
t1 t1
d ∂F ∗ ∂F ∗
Z
≤ (x − x∗ ) dt = (x − x∗ )
t0 dt ∂ ẋ ∂ ẋ t0
The last part of the proof of Theorem 1, goes through as before. Here we
find
∂F ∗
∗
(x − x ) =0
∂ ẋ t=t0
since x(t0 ) = x∗ (t0 ) = x0 . Finally the condition (T ) yields
∂F ∗
∗
(x − x ) = 0.
∂ ẋ t=t1
31
3 OPTIMAL CONTROL THEORY.
In the Calculus of Variations we studied problems of the type
Z t1
max/min f (t, x, ẋ) dt, x(t0 ) = x0 , x(t1 ) = x1 (or x(t1 ) free).
t0
We assumed that all the relevant functions were of class C 2 (twice continu-
ously differentiable). If we let
u = ẋ,
then the above problem may be reformulated as
Z t1
(0) max/min f (t, x, u) dt, ẋ = u, x(t0 ) = x0 , x(t1 ) = x1 (or x(t1 ) free).
t0
We shall next study a more general class of problems, problems of the type:
R t1
max/min t0 f (t, x(t), u(t)) dt, ẋ(t) = g(t, x(t), u(t)),
(1) x(t0 ) = x0 , x(t1 ) free,
u(t) ∈ R, t ∈ [t0 , t1 ], u piecewise continuous.
Later we shall also consider such problems with other endpoint conditions
and where the functions u can take values in more general subsets of R.
Such problems are called control problems, u is called a control vari-
able (or just a control). The control region is the common range of the
possible controls u.5 Pairs of functions (x, u) that satisfies the given end-
point conditions and, in addition, the equation of state ẋ = g(t, x, u), are
called admissible pairs.
We shall always assume that the controls u are piecewise continuous, that
is, u may possess a finite number of jump discontinuities. (In more advanced
texts measurable contols are considered.) In the calculus of variations we
always assumed that u = ẋ was of class C 1 .
In the optimal control theory it proves very useful to apply an auxiliary
function H of four variables defined by
32
Pontryagin’s Maximum principle gives conditions that are necessary for
an admissible pair (x∗ , u∗ ) to solve a given control problem:
Theorem (The Maximum Principle I)
Assume that (x∗ , u∗ ) is an optimal pair for the problem in (1). Then
there exist a continuous function p = p(t), such that for all t ∈ [t0 , t1 ], the
following conditions are satisfied:
(a) u∗ (t) maximizes H(t, x∗ (t), u, p(t)), u ∈ R, that is,
(b) The function p (called the adjoint function ) satisfies the differential
equation
∂H ∂H ∗
ṗ(t) = − (t, x∗ (t), u∗ (t), p(t)) (written − ),
∂x ∂x
except at the discontinuities of u∗ .
(c) The function p obeys the condition
Remark.
For the sake of simplicity we will frequently use the notations
∂H ∗ ∂H
= (t, x∗ (t), u∗ (t), p(t))
∂x ∂x
and similarly,
f ∗ = f (t, x∗ (t), u∗ (t)), g ∗ = g(t, x∗ (t), u∗ (t)), H ∗ = H(t, x∗ (t), u∗ (t), p(t))
Remark.
For the varition problem in (0), where ẋ = u, the Hamiltonian H will be
particularly simple,
∂H ∗ ∂f ∗
0= = + p(t).
∂u ∂u
or
∂f ∗ ∂f ∗
(ii) p(t) = −=− ,
∂u ∂ ẋ
in order that u = u∗ (t) shall maximize H. Equations (ii) and (i) now yield
d ∂f ∗ ∂f ∗
ṗ(t) = − ( )=− ,
dt ∂ ẋ ∂x
Hence we have deduced the Euler equation
∂f ∗ d ∂f ∗
(E) − ( )=0
∂x dt ∂ ẋ
∗
As p(t) = − ∂f ∂ ẋ
, the condition (T ) above yields the ”old” transversality
∂f ∗
condition ( ∂ ẋ )t=t1 = 0 from the Calculus of Variations. This shows that
The Maximum Principle implies our previous results from The Calculus of
Variations.
The following theorem of Mangasarian supplements the Maximum Prin-
ciple with sufficient conditions for optimality.
Mangasarian’s Theorem (First version)
Let the notation be as in the statement of the Maximum Principle. If the
map (x, u) 7→ H(t, x, u, p(t)) is concave for each t ∈ [t0 , t1 ], then each admis-
sible pair (x∗, u∗ ) that satisfies conditions (a), (b), and (c) of the Maximum
Principle, will give a maximum.
Example 1
We will solve the problem
Z T
max [1 − tx(t) − u(t)2 ] dt, ẋ = u(t), x(0) = x0 , x(T ) free,
0
H(t, x, u, p) = 1 − tx − u2 + pu
34
In order that u = u∗ (t) shall maximize H(t, x∗ (t), u, p(t)), it is necessary that
∂H
(t, x∗ (t), u, p(t)) = 0,
∂u
∂2H ∗
that is −2u + p(t) = 0, or u = 21 p(t). This yields a maximum since ∂u2
=
−2 < 0. Hence
u∗ (t) = p(t)/2, t ∈ [0, T ].
Furthermore,
∂H
= −t = −ṗ(t),
∂x
so that ṗ = t, and p(t) = 12 t2 + A. In addition, the condition (T ) gives
0 = p(T ) = 12 T 2 + A, hence A = − 12 T 2 . Thus
1
p(t) = (t2 − T 2 )
2
and
1 1
ẋ∗ (t) = u∗ (t) = p(t) = (t2 − T 2 ),
2 4
1 1
x∗ (t) = t3 − T 2 t + x0 .
12 4
Here H(t, x, u, p(t)) = 1 − tx − u2 + pu is concave in (x, u) for each t, being
the sum of the two concave functions (x, u) 7→ pu − tx (which is linear)
and (x, u) 7→ 1 − u2 , (which is constant in x and concave as a function
of u). As an alternative, we could have used the second derivative test.
Accordingly Mangasarian’s Theorem shows that (x∗ , u∗ ) is an optimal pair
for the problem.
Example 2
Z T
max (x − u2 ) dt, ẋ = x + u, x(0) = 0, x(T )free, u ∈ R.
0
Here
H(t, x, u, p) = x − u2 + p(x + u) = −u2 + pu + (1 + p)x,
which is concave in (x, u). Let us maximize H with respect to u: ∂H ∂u
=
1 ∂2H
−2u + p = 0 if and only if u = 2 p. This gives a maximum as ∂u2 = −2 < 0.
∗
As a consequence we find ẋ = x + 21 p, ṗ = − ∂H
∂x
= −(1 + p) Hence
Z Z
dp
= (−1) dt, log |1 + p| = −t + C, |1 + p| = Ae−t
1+p
35
From (T ) we find p(T ) = 0, thus 1 = Ae−T, A = eT . Accordingly, 1 + p =
±eT −t , p(t) = eT −t − 1 (p(T ) = 0 hence the plus sign must be used.) It
follows that ẋ − x = 21 p = 12 [eT −t − 1], dt
d
(e−t x) = 12 [eT −2t − e−t ],
1 1
x(t) = − eT −t + + Det
4 2
Now
1 1 1 1 1 1 1
x(0) = 0 = − eT + + D, D = (−1 + eT ) = eT ) = eT − ,
4 2 2 2 4 4 2
hence
1 1 1 1 1 1
x∗ (t) = − eT −t + eT +t − et + = [eT +t − eT −t ] + (1 − et )
4 4 2 2 4 2
Next we willl study control problems of the form
R t1
max/min t0
f (t, x(t), u(t)) dt, ẋ(t) = g(t, x(t), u(t)),
x(t ) = x , x(t ) free,
0 0 1
(2)
u(t) ∈ U, t ∈ [t0 , t1 ], u piecewise continuous,
U a given interval in R
We shall assume that f and g are C 1 −functions and that x(t1 ) satisfies
exactly one of the following three terminal conditions:
(i)
x(t1 ) = x1 , where x1 is given
(3) (ii) x(t1 ) ≥ x1 , where x1 is given
(iii) x(t1 ) is free
In the present situation it turns out that we must consider two different pos-
sibilities for the Hamilton function in order to obtain the correct Maximum
Principle.
or
(B) H(t, x, u, p) = pg(t, x, u) (degenerate problems)
36
Case (A) is by far the most interesting one. Consequently, we shall almost
always discuss normal problems in our applications. Note that in case (B)
the Hamiltonian does not depend on the integrand f .
Remark. If x(t1 ) is free (as in (iii)), then the problem will always be
normal. More general, if p(t) = 0 for some t ∈ [t0 , t1 ], then it can be shown
that the problem is normal.
Pontryagin’s Maximum Principle takes the following form.
Theorem (The Maximum Principle II) Assume that (x∗ , u∗ ) is an
optimal pair for the control problem in (2) and that one of the terminal
conditions (i), (ii), or (iii) is satisfied. Then there exists a continuous and
piecewise differentiable function p such that p(t1 ) satisfies exactly one of the
following transversality conditions:
0
(i )
no condition on p(t1 ), if x(t1 ) = x1
0
(ii ) p(t1 ) ≥ 0 if x(t1 ) ≥ x1 , (p(t1 ) = 0 if x(t1 ) > x1 )
0
(iii ) p(t1 ) = 0 if x(t1 ) is free.
(b) The function p (called the adjoint function) satisfies the differential
equation
∂H ∂H ∗
ṗ(t) = − (t, x∗ (t), u∗ (t), p(t)) (written − ),
∂x ∂x
except at the discontinuity points of u∗ .
(c) If p(t) = 0 for some t ∈ [t0 , t1 ], then the problem is normal.
Once again concavity of the Hamiltonian H in (x, u) yields sufficiency for
the existence of an optimal pair:
Mangasarian’s Theorem II. Assume that (x∗ , u∗ ) is an admissible
pair for the maximum problem given in (2) and (3) above. Assume further
that the problem is normal. If the map (x, u) 7→ H(t, x, u, p(t)) is concave for
each t ∈ [t0 , t1 ], then each admissible pair (x∗, u∗ ) that satisfies conditions
R(a),
t1
(b), and (c) of the Maximum Principle II, will maximize the integral
t0
f (t, x, ẋ) dt.
37
In contrast to the Maximum Principle, the proof of Mangasarian’s Theo-
rem is neither particularly long nor difficult. For the proof we shall need the
following
Lemma. If φ is a concave real-valued C 1 −function on an interval I,
then
φ has a maximum at x0 ∈ I ⇐⇒ φ0 (x0 )(x0 − x) ≥ 0, for all x ∈ I.
Proof. We let a < b be the endpoints of I.
=⇒: Assume that x : 0 is a max point for φ. Since the derivative φ0 exists
there are exactly three possibilities:
(1) x0 = a and φ0 (x0 ) ≤ 0,
(2) a < x0 < b and φ0 (x0 ) = 0, and
(3) x0 = b and φ0 (x0 ) ≥ 0,
In all three cases we have φ0 (x0 )(x0 − x) ≥ 0.
⇐=: Suppose that φ0 (x0 )(x0 − x) ≥ 0. Again there are three possibilities:
(1) x0 = a: Then x0 − x ≤ 0, hence φ0 (x0 ) ≤ 0. Since φ is concave, the
tangent lies above or on the graph of φ at each point. Hence φ0 decreases
(this may also be shown analytically) so that
φ0 (x) ≤ φ0 (a) = φ0 (x0 ) ≤ 0, for all x ∈ I.
Hence φ decreases and x0 = a is a maximum point.
(2) a < x0 < b: For any x ∈ I which satisfies x0 < x we have x0 − x < 0,
hence φ0 (x0 ) ≤ 0. On the other hand, if x0 > x, then x − x0 > 0, and hence
φ0 (x0 ) ≥ 0 too. It follows that φ(x0 ) = 0. As φ0 is decreasing, x0 must be a
max point for φ.
(3) x0 = b: Then x0 − x ≥ 0, hence φ0 (x0 ) ≥ 0. Since φ0 is decreasing,
0
φ (x) ≥ 0 for all x ∈ I. Therefore φ is increasing and x0 = b must be a
maximum point.
Proof of Mangasarian’s Theorem. Assume that (x∗ , u∗ ) is an admis-
sible pair and satisfies conditions (a), (b), and (c) in the hypothesis of the
Maximum Principle. Assume further that the map
(x, u) 7−→ H(t, x, u, p(t))
is concave for each t ∈ [t0 , t1 ]. Let (x, u) be any admissible pair for the control
problem. We must show that
Z t1 Z t1
∗ ∗
∆= f (t, x (t), u (t)) dt − f (t, x(t), u(t)) dt ≥ 0
t0 t0
38
Let us introduce the simplified notations
Then
H ∗ = f ∗ + pg ∗ ,
hence
and
f = H − pẋ.
It follows that
Z t1 Z t1
∗
∆= (f − f ) dt = (H ∗ − pẋ∗ − H + pẋ) dt
t t
Z 0t1 Z0 t1
= p(ẋ∗ − ẋ) dt − (H − H ∗ ) dt
t0 t0
Since H is concave with respect to (x, u) the ”gradient inequality” (see Propo-
sition 9 of Section 1) holds
∂H ∗ ∗ ∗ ∂H ∗
H −H ≤ (x − x ) + (u − u∗ )
∂x ∂u
∂H ∗
= −ṗ(x − ẋ) + (u − u∗ )
∂u
≤ −ṗ(x − ẋ) (by the last Lemma),
39
Z t1 Z t1
∗
∆≥ p(ẋ − ẋ ) dt + ṗ(x − x∗ ) dt
t t0
Z t1 0
d
[p(x − x∗ )] dt ( here we used that the problem is normal ).
t0 dt
= |tt10 p(x − x∗ )
= p(t1 )[x(t1 ) − x∗ (t1 )] − p(t0 )[x(t0 ) − x∗ (t0 )]
= p(t1 )[x(t1 ) − x∗ (t1 )] (since x(t0 ) = x0 = x∗ (t0 ))
By the terminal conditions,
(i) x(t1 ) = x1 = x∗ (t1 ) : ∆ ≥ 0 is clear.
(ii) x(t1 ) ≥ x1 : If x∗ (t1 ) = x1 , then
x(t1 ) ≥ x1 = x∗ (t1 ), and since p(t1 ) ≥ 0 we find that ∆ ≥ 0
(iii) x(t1 ) is free: p(t1 ) = 0, hence ∆ ≥ 0.
Hence we have shown that the pair (x∗ , u∗ ) is optimal.
Example 3 (SSS 12.4 Eksempel 1)
We shall solve the control problem
Z 1
max x(t) dt, ẋ = x+u, x(0) = 0, x(1) ≥ 1, u(t) ∈ [−1, 1] = U, for all t ∈ [0, 1].
0
We will assume (as usual) that the problem is normal. Hence the Hamiltonian
is
H(t, x, u, p) = x + p(x + u) = (1 + p)x + pu
which is linear in (x, u)m hence it is concave (for all t ∈ [0, 1]). Thus Man-
gasarian’s Theorem applies and any admissible pair (x∗ , u∗ ) that satisfies
the conditions of the Maximum Principle will solve the problem. Here the
transversality condition
(iii0 ) p(1) ≥ 0(p(1) = 0 if x(1) > 1)
applies. Since H is linear in u, the maximum is attained at one of the
endpoints u = 1 or u = −1, hence
1, if p(t) > 0
∗
u (t) = −1, if p(t) < 0
undetermined if p(t) = 0. We let u∗ (t) = 1 in this case.
40
Furthermore, for x = x∗ , u = u∗ ,
∂H
= 1 + p = −ṗ (from condition (b) in the Maximum Principle)
∂x
Hence ṗ + p = −1 which yields p(t) = Ae−t − 1, where p(1) = Ae−1 − 1 ≥ 0,
so that A ≥ e. Therefore
where
h0 (t) = −e1−t < 0, and h(1) = 0, h(0) = e − 1 > 0.
Hence h(t) ∈ [0, e − 1]. In particular,
Accordingly
u = u∗ (t) = 1, t ∈ [0, 1].
It follows that
ẋ∗ − x∗ = 1, x∗ (t) = Bet − 1.
Further,
x∗ (0) = 0 ⇒ B = 1 ⇒ x∗ (t) = et − 1.
Thus x∗ (1) = e − 1 > 0, so that p(1) = 0, and A = e. We have found
W = {(x, u) : (x, u) is admissible and (x(t), u(t)) ∈ V for all t ∈ [t0 , t1 ]}.
If for each t ∈ [t0 , t1 ] the map (x, u) 7→ H(t, x, u, p(t)) is concave on V , then
each admissible pair (x∗ , u∗ ) that satisfies conditions (a), (b), and (c) of the
41
R t1
Maximum Principle II, will maximize the integral t0
f (t, x, ẋ) dt among all
admissible pairs (x, u) in W .
Arrow’s condition.
Mangasarian’s Theorem requires that the Hamilton function is concave with
respect to (x, u). In many important applications this condition is not sat-
isfied. Consequently, we will consider a weaker but related condition that in
some cases is sufficient for optimality. Define
Ĥ(t, x, p) = max H(t, x, u, p)
u∈U
42
p = p(t) > 1 :
u = u∗ (t) = 0 yields a minimum for H. Further, u = u∗ (t) = 1 gives a
maximum, and for all such t the function x∗ must satisfy the equation
ẋ∗ − x∗ = 1, hence x∗ (t) = Aet − 1. Next, if
p = p(t) < 1 :
u = u∗ (t) = 0 maximizes H, so that ẋ∗ − x∗ = 0, x∗ (t) = Bet .
Furthermore,
∂H
−ṗ(t) = = t + p(t),
∂x
hence ṗ(t) + p(t) = −t, p(t) = 1 − t + Ce−t . Here p(1) = C = 0, since x(1)
is free. Therefore,
p(t) = 1 − t, t ∈ [−1, 1].
Thus p(t) > 1 ⇔ t < 0, so that p(t) > 1 on [−1, 0) and p(t) < 1 on (0, 1].
t ∈ [−1, 0) :
p(t) > 1, x∗ (t) = Aet − 1, where x(−1) = Ae−1 − 1 = −2e−1 − 1, A = −2.
Hence x∗ (t) = −2et − 1, u∗ (t) = 1.
t ∈ (0, 1] :
p(t) < 1, x∗ (t) = Bet . Continuity of x∗ at t = 0 gives x∗ (0) = B = −2 − 1 =
−3. Therefore,
x∗ (t) = −3et , u∗ (t) = 0
t=1:
∗
u (1) can be assigned any value in [0, 1], since H is constant in u. Let us
choose the value u∗ (1) = 1.
Then the pair (x∗ , u∗ ) is the only possible candidate for a solution.
It remains to prove that (x∗ , u∗ ) is in fact optimal. We see that H(t, x, u, p(t))
is concave in (x, u) ⇔ p(t) ≤ 1 ⇔ t ∈ [0, 1]. Hence Mangasarian’s Theorem
does not apply. However, we observe that
Ĥ(t, x, p(t)) = max H(t, x, u, p(t)) = (t + p(t)x) + p(t) − 1 if p(t) > 1
u∈[0,1]
and
Ĥ(t, x, p(t)) = (t + p(t))x, if p(t) ≤ 1,
whence Ĥ is linear and is therefore concave in x. Accordingly, Arrow’s The-
orem implies that the pair (x∗ , u∗ ) solves the problem.
Exercise. Solve the control problem in the last example if the end point
conditions instead are
1
x(−1) = 0, x(1) = e2 − e1+ e .
43
Hint: Try with p(t) < 1 on an interval (t0 , 1] (p denotes the adjoint function).
44
REFERENCES
[EP] Edwards & Penney, Elementary Differential Equations, 2009. Upper
Saddle River, N.J. : Pearson Prentice Hall. ISBN: 978-0-13-235881-1.
[GF] Gelfand, I. M., Fomin, S. V., Calculus of variations, Prentice-Hall,
1963.
[O] Osgood, W. F., Sufficient Conditions in the Calculus of Variations,
The Annals of Mathematics, 2nd Series, Vol. 2, No. 1/4, 1900-1901 (105-129)
(Online at: www.jstor.org/stable/2007189)
[PBGM] Pontryagin, Boltyanskii, Gamkrelidze, Mischchenko, The Math-
ematical Theory of Optimal Processes, Interscience Publishers (Wiley), 1962.
[SSS] Sydsæter K., Seierstad A., Strøm, A., Matematisk Analyse, Bind
2, Gyldendal Akademisk 2004.
[SS] Seierstad, A., Sydster, K., Optimal Control Theory with Economic
Applications, North-Holland 1987. ISBN: 0-444-87923-4.
45