Professional Documents
Culture Documents
Lecture04 Notes
Lecture04 Notes
Lecture04 Notes
Variational Methods & Optimal Control: lecture 04 – p.1/40 Variational Methods & Optimal Control: lecture 04 – p.3/40
y
Fixed-end point problems
We’ll start with the simplest functional maximization problem, and show (x1,y1)
how to solve by finding the first variation and deriving the Euler-Lagrange
equations:
y = y(x)
(x0,y0)
∂f ∂f
d
− = 0
dx ∂y′ ∂y
Variational Methods & Optimal Control: lecture 04 – p.2/40 Variational Methods & Optimal Control: lecture 04 – p.4/40
Formulation The Catenary
Define the functional F : C2 [x0 , x1 ] → IR Z L
Wp {y} = mgy(s)ds
Z x1 0
F{y} = f (x, y, y′ ) dx, p
x0 Change of variables ds = 1 + y′2 dx. So the functional of interest (the
potential energy) is
where f is assumed to be function with (at least) continuous second-order
partial derivatives, WRT x, y, and y′ . Z x1 p
Wp {y} = mg y 1 + y′2 dx,
x0
Problem: determine y ∈ C2 [x0 , x1 ] such that y(x0 ) = y0 and y(x1 ) = y1 , such Z x1
that F has a local extrema. = mg f (x, y, y′) dx,
x0
where
p
f (x, y, y′ ) = y 1 + y′2
Variational Methods & Optimal Control: lecture 04 – p.5/40 Variational Methods & Optimal Control: lecture 04 – p.7/40
y=y(x) f (x + ε) ≤ f (x)
s
δy
2
= 1+ δx δs δy
δx
p δx
ds = 1 + y′2 dx
x x x
⇒ Conditions for extremals, i.e., f ′ (x) = 0
Variational Methods & Optimal Control: lecture 04 – p.6/40 Variational Methods & Optimal Control: lecture 04 – p.8/40
Perturbations of functions Perturbations of functions
y y
y = y +εη y = y + ε η2
(x1,y1) (x1,y1)
y = y(x) y = y(x)
(x0,y0) (x0,y0)
x x
Variational Methods & Optimal Control: lecture 04 – p.9/40 Variational Methods & Optimal Control: lecture 04 – p.11/40
Variational Methods & Optimal Control: lecture 04 – p.10/40 Variational Methods & Optimal Control: lecture 04 – p.12/40
Perturbation functions The first variation
The vector space of allowable perturbations is For small ε the quantity
H = η ∈ C2 [x0 , x1 ] η(x0 ) = 0, η(x1 ) = 0
Z
F{y + εη} − F{y} x1 ∂f ′ ∂f
δF(η, y) = lim = η + η ′ dx
ε→0 ε x0 ∂y ∂y
y
is called the First Variation.
For F{y} to be a minimum, for small ε, F{ŷ} ≥ F{y}, so the sign of
δF(η, y) is determined by ε.
η
As before, we can vary the sign of ε, so for F{y} to be a local minima it
must be the case that
x0 x1 δF(η, y) = 0, ∀η ∈ H
x
Variational Methods & Optimal Control: lecture 04 – p.13/40 Variational Methods & Optimal Control: lecture 04 – p.15/40
Variational Methods & Optimal Control: lecture 04 – p.14/40 Variational Methods & Optimal Control: lecture 04 – p.16/40
Simplification A useful lemma
Integrate the second term by parts Lemma 2.2.1: Let α, β ∈ IR, such that α < β. Then there is a function
Z x1 ν ∈ C2 (IR), such that ν(x) > 0 for all x ∈ (α, β) and ν(x) = 0 otherwise.
∂f ′ ∂f
δF(η, y) = η + η ′ dx Proof: by example
x0 ∂y ∂y
x1 Z x
∂f ∂f d ∂f
(
(x − α)3 (β − x)3 , if x ∈ (α, β)
1
= η ′ + η − dx ν(x) =
∂y x0 x0 ∂y dx ∂y′
0, otherwise.
But note that by the problem definition η ∈ H , and so η(x0 ) = η(x1 ) = 0,
and so the first term is zero.
The function inside the integral exists, and is continuous by our
assumption
h that f hasitwo continuous derivatives, so for
∂f d ∂f
E(x) = ∂y − dx ∂y′
Z x1
δF(η, y) = η(x)E(x)dx = hη, Ei2 = 0 α β
x0
Variational Methods & Optimal Control: lecture 04 – p.17/40 Variational Methods & Optimal Control: lecture 04 – p.19/40
where y0 and y1 are real numbers. If y ∈ S is an extremal for F, then for all
x ∈ [x0 , x1 ]
d ∂f ∂f
− = 0 ⇐ the Euler-Lagrange equation
dx ∂y′ ∂y
Variational Methods & Optimal Control: lecture 04 – p.18/40 Variational Methods & Optimal Control: lecture 04 – p.20/40
Proof of Euler-Lagrange equation Example: geodesics in a plane
As noted earlier, at an extremal the first variation The arclength of a curve described by y(x) will be
Z x1 Z 1p
δF(η, y) = hη(x), E(x)i2 = η(x)E(x)dx = 0 F{y} = 1 + y′2 dx
x0 0
for all η(x) ∈ H . From Lemma 2.2.2, we can therefore state that Then !
∂f ∂f y′
d d
∂f ∂f − = −0 = 0
d
∂y′ ∂y
p
E(x) = − = 0, dx dx 1 + y′2
∂y dx ∂y′
′
So √ y is a constant, implying y′ = const. Hence y(x) = c1 x + c2 , the
the Euler-Lagrange equation.✷ 1+y′2
equation of a straight line.
◮ Q: how do I know this is a minimum?
Variational Methods & Optimal Control: lecture 04 – p.21/40 Variational Methods & Optimal Control: lecture 04 – p.23/40
Variational Methods & Optimal Control: lecture 04 – p.22/40 Variational Methods & Optimal Control: lecture 04 – p.24/40
f depends only on y′
◮ If f ′′ (y′ ) = 0, then f (y′ ) = ay′ + b. We will later see that problems in
this form are “degenerate”, and solutions don’t depend on the
curve’s shape.
Special case 1 ◮ If y′′ = 0, then
y = c1 x + c2 .
When f depends only on y′ the E-L equations simplify to
So for non-degenerate problems with only y′ dependence the extremals
∂f are straight lines
= const
∂y′ ◮ e.g. geodesics in the plane
An example of this is calculating geodesics in the plane (which we all
know are straight lines).
Variational Methods & Optimal Control: lecture 04 – p.25/40 Variational Methods & Optimal Control: lecture 04 – p.27/40
Variational Methods & Optimal Control: lecture 04 – p.26/40 Variational Methods & Optimal Control: lecture 04 – p.28/40
Fermat’s principle Example
Fermat’s principle of geometrical optics: Consider c(x, y) = 1/g(x)
Light travels along a path between any two points such that Z x1 p
the time taken is minimized T {y} = g(x) 1 + y′2 dx
x0
p
Take the speed of light to be dependent on the media, e.g. c = c(x, y), the f (x, y, y′ ) = g(x) 1 + y′2
time taken by light along a path y(x) is
f has no explicit dependence on y so
Z p
x1 1 + y′2 ∂f
T {y} = dx = const
x0 c(x, y) ∂y′
Fermat’s principle says the actual path of light will be a minima of this y′
functional. g(x) p = const
1 + y′2
Variational Methods & Optimal Control: lecture 04 – p.29/40 Variational Methods & Optimal Control: lecture 04 – p.31/40
Variational Methods & Optimal Control: lecture 04 – p.30/40 Variational Methods & Optimal Control: lecture 04 – p.32/40
Example (iii) How we might solve
Break into two problems, with a boundary point (x∗ , y∗ ), which has a fixed
value of x∗ (the location of the boundary), but a movable value for y∗ .
s
c21
y′ =
g(x)2 − c21
Z
1
y = c1 p dx + c2 (x1,y1)
g(x)2 /c21 − 1
(x0,y0)
Variational Methods & Optimal Control: lecture 04 – p.33/40 Variational Methods & Optimal Control: lecture 04 – p.35/40
(x0,y0)
Variational Methods & Optimal Control: lecture 04 – p.34/40 Variational Methods & Optimal Control: lecture 04 – p.36/40
The total time taken More than one boundary
We can simplify the integrals by noting from Pythagoras that the lengths Snell’s law applies at each boundary
of the two lines are
p p (x1,y1)
(x∗ − x0 )2 + (y∗ − y0 )2 and (x∗ − x1 )2 + (y∗ − y1 )2
and that the time take to traverse the pair of line segments will be
p p
(x∗ − x0 )2 + (y∗ − y0 )2 (x∗ − x1 )2 + (y∗ − y1 )2 (x *,y *)
T {y} = + φ1
c0 c1 φ0
dT (y∗ − y0 ) (y1 − y∗ )
= − (x0,y0)
dy∗ c0 [(x∗ − x0 )2 + (y∗ − y0 )2 ]1/2 c1 [(x∗ − x1 )2 + (y∗ − y1 )2 ]1/2
Variational Methods & Optimal Control: lecture 04 – p.37/40 Variational Methods & Optimal Control: lecture 04 – p.39/40
Hence there are often ways around discontinuities, though it may involve
some pain
(e.g. what about internal reflection)
Variational Methods & Optimal Control: lecture 04 – p.38/40 Variational Methods & Optimal Control: lecture 04 – p.40/40