Calculus of Variations Introduction to...

18

Click here to load reader

Transcript of Calculus of Variations Introduction to...

Page 1: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

236861 Numerical Geometry of Images

Tutorial 1

Introduction to the

Calculus of Variations

Alex Bronstein

c©2005

1

Page 2: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

Calculus Calculus of variations

1. Function Functional

f : Rn → R f : F → R, in particular

f(u) =∫Ω

F (x, u(x), u′(x), ...) dx

Example: Example:

f(x, y) = x2 + y2 f (u) =∫Ω‖∇u(x, y)‖2 dxdy

2. Derivative Variationdf(x)dx

= lim∆x→0

f(x + ∆x) − f(x)∆x

δf(u)δu

= limε→0

f(u + ε δu) − f(u)ε

df = ∂∂εf(x + ε ∆x)

∣∣ε=0

δf = ∂∂εf(u + ε δu)

∣∣ε=0

2

Page 3: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

Calculus Calculus of variations

3. Local (relative) minimum

f(x∗) ≤ f(x) f(u∗) ≤ f(u)

∀x : ‖x − x∗‖ ≤ α ∀u : maxx∈Ω

|u(x) − u∗(x)| ≤ α

4. Necessary condition for local extremumdf(x)dx

= 0δf(u)

δu= 0

5. Sufficient condition for local extremumd2f(x)

dx2≥ 0 More complex theory

3

Page 4: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

Calculus Calculus of variations

3. Constrained local minimum

minx

f(x) minu(x)

∫Ω

F (x, u(x), u′(x))dx

s.t. g(x) = 0 s.t. G(x, u(x), u′(x)) = 0

4. Lagrangian

(x) = f(x) + λg(x) (u) =∫

Ω

(F + λ(x)G) dx

5. Method of Lagrange multipliers

d(x∗)dx

= 0δ(u∗)

δu= 0

g(x) = 0 G(x, u∗(x), u∗′(x)) = 0

4

Page 5: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

Examples of functionals

1. Curve length L(y) =

∫ x1

x0

√1 + y′2dx

The length of a non-parametric curve y(x).

2. Curve length L(x, y) =

∫ 1

0

√x′2 + y′2dt

The length of a parametric curve (x(t), y(t)).

3. Surface area A(z) =

∫S

√1 + z2

x + z2ydxdy

The area of a non-parametric surface S = (x, y, z(x, y)).

4. Total variation TV (y) =

∫ x1

x0

|y′|dx

The “oscillation strength” of a non-parametric curve y(x).

5

Page 6: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

The Euler-Lagrange equation

Let us be given the functional

f(u) =

∫ x1

x0

F (x, u(x), u′(x)) dx

with F ∈ C3 and all admissible u(x) having fixed boundary values

u(x0) = u0 and u(x1) = u1.

An extremum of f(u) satisfies the differential equation

Fu − d

dxFu′ = 0

with the boundary conditions u(x0) = u0 and u(x1) = u1.

6

Page 7: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

The second Euler-Lagrange equation

A second, less known Euler-Lagrange equation is

d

dx(F − u′Fu′)− Fx = 0

satisfied along u∗(x).

7

Page 8: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

The E-L equation (independent on x)

If the integrand does not depend on the independent variable x,

f(u) =

∫ x1

x0

F (u(x), u′(x)) dx,

the second E-L equation becomes a first-order differential equation

d

dx(F − u′Fu′) = 0

or

F − u′Fu′ = const.

8

Page 9: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

The E-L equation (independent on u(x))

If the integrand does not depend on u(x),

f(u) =

∫ x1

x0

F (u(x), u′(x)) dx,

the E-L equation becomes a first-order differential equation

d

dxFu′ = 0

or

Fu′ = const.

9

Page 10: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

The E-L equation (independent on u′(x))

If the integrand does not depend on u′(x),

f(u) =

∫ x1

x0

F (u(x), u′(x)) dx,

the E-L equation becomes an algebraic equation

Fu(x, u(x)) = 0.

10

Page 11: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

The E-L equation (high-order functionals)

Given the functional

f(u) =

∫ x1

x0

F(x, u(x), u′(x), ..., u(n)(x)

)dx

with F ∈ Cn+2 and fixed boundary values u(i)(x0) = u(i)0 and

u(i)(x1) = u(i)1 for i = 0, ..., n − 1.

The Euler-Lagrange equation (also known as the Euler-Poisson

equation) is

Fu − d

dxFu′ +

d2

dx2Fu′′ + (−1)n dn

dxnFu(n) = 0.

11

Page 12: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

The E-L equation (multiple independent variables)

Given the functional

f(u) =

∫Ω

F (x, u(x), ux1(x), ..., uxn(x)) dx

with x ∈ Rn and u(∂Ω) = u∂Ω.

An extremum of f(u) satisfies the differential equation

∂F

∂u− ∂

∂x1

∂F

∂ux1

− ... − ∂

∂xn

∂F

∂uxn

= 0

with the boundary condition u(∂Ω) = u∂Ω.

12

Page 13: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

The E-L equation (multiple functions)

Given the functional

f(u) =

∫ x1

x0

F (x, u1(x), ..., un(x), u′1(x), ..., u

′n(x)) dx

with F ∈ C3 and all admissible u(x) having fixed boundary values

ui(x0) = u0i and ui(x1) = u1

i .

An extremum of f(u) satisfies the system of differential equations

Fui− d

dxFu′

i= 0

with the boundary conditions u(x0) = u0 and u(x1) = u1.

13

Page 14: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

Problem 1: Minimum distance on a plane

Prove that the family of curves minimizing the distance

L =

∫ −1

−1

√1 + y′2dx,

in the plane are straight lines.

Solution

The Euler-Lagrange equation

0 =d

dxFy′ − Fy =

d

dx

(y′√

1 + y′2

).

Integration w.r.t. x yields

y′√1 + y′2

= γ = const.

14

Page 15: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

Problem 1: Minimum distance on a plane (cont.)

Substitute y′ = tan θ:

y′√1 + y′2

=sin θcos θ√

1 + sin2 θcos2 θ

=sin θcos θ√

sin2 + cos2 θcos2 θ

=sin θ

cos θ

√cos2

1= sin θ,

from where sin θ = γ. Substituting again yields

y′ = tan θ =sin θ

cos θ=

± sin θ√1 − sin2 θ

=±γ√1 − γ

= α = const,

from where

y = αx + β,

β = const. The solution describes a line in the plane; the exact values of α, β are

determined from the endpoint values.

15

Page 16: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

Problem 2: Constrained maximum

Find a curve y(x) with fixed endpoints y(±1) = 0 and perimeter

S =

∫ −1

−1

√1 + y′2dx,

which maximizes the area

A(y) =

∫ −1

−1

ydx.

Solution

Construct the Lagrangian

L(y) =

∫ −1

−1

(y + λ

√1 + y′2

)dx + const,

and denote

F (x, y, y′) = y + λ√

1 + y′2.

16

Page 17: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

Problem 2: Constrained maximum (cont.)

The Euler-Lagrange equation

0 =d

dxFy′ − Fy =

d

dx

(λy′√1 + y′2

)− 1.

Integration w.r.t. x yields

λy′√1 + y′2

= x − α,

where α = const. Substitute y′ = tan θ:

λy′√

1 + y′2= λ

sin θcos θ√

1 + sin2 θcos2 θ

= λsin θcos θ√

sin2 + cos2 θcos2 θ

= λsin θ

cos θ

√cos2

1= λ sin θ,

from where

sin θ =x − α

λ.

17

Page 18: Calculus of Variations Introduction to thewebcourse.cs.technion.ac.il/236861/Winter2005-2006/ho...236861 Numerical Geometry of Images Tutorial 1 Introduction to the Calculus of Variations

Problem 2: Constrained maximum (cont.)

Substituting again

y′ = tan θ =sin θ

cos θ=

± sin θ√1 − sin2 θ

=±(x − α)

λ√

1 − (x−α)2

λ2

=±(x − α)√

λ2 − (x − α)2.

Integration w.r.t. x yields (table of integrals or Mathematica)

y =√

λ2 − (x − α)2 + β2,

or

(x − α)2 + (y − β)2 = λ2

where β = const. The latter equation describes a part of a circle with radius λ centered

at (α, β). The exact values of the constants are determined by demanding the endpoint

conditions and the perimeter constraint.

18