The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in...

73
The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor [email protected] TRU Math Seminar

Transcript of The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in...

Page 1: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

The Calculus of VariationsAll You Need to Know in One Easy Lesson

Richard Taylor

[email protected]

TRU Math Seminar

Page 2: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Putnam 2006: Problem B5

For each continuous function f : [0, 1] → IR let

I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx.

Find the maximum value of I(f) over all such functions f .

Page 3: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Putnam 2006: Problem B5

For each continuous function f : [0, 1] → IR let

I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx.

Find the maximum value of I(f) over all such functions f .

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.4

0.8

x

f(x) = sin(πx)

I(f) = 4π2−π3−164π3 ≈ −0.061

Page 4: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Putnam 2006: Problem B5

For each continuous function f : [0, 1] → IR let

I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx.

Find the maximum value of I(f) over all such functions f .

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.4

0.8

x

f(x) = sin(πx)

I(f) = 4π2−π3−164π3 ≈ −0.061

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.4

0.8

x

g(x) = x2

I(g) = 130 ≈ 0.033

Page 5: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Putnam 2006: Problem B5

Could try maximizing I(f) over a family of functions, e.g.

f(x) = cx (c is a parameter).

Page 6: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Putnam 2006: Problem B5

Could try maximizing I(f) over a family of functions, e.g.

f(x) = cx (c is a parameter).

Then I(f) =

∫ 1

0

(x2(cx) − x(cx)2

)dx

Page 7: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Putnam 2006: Problem B5

Could try maximizing I(f) over a family of functions, e.g.

f(x) = cx (c is a parameter).

Then I(f) =

∫ 1

0

(x2(cx) − x(cx)2

)dx = 1

4(c − c2).

So, restricted to this family, I(f) ismaximized with c = 1

2 .

0.0 0.2 0.4 0.6 0.8 1.0

0.00

0.02

0.04

0.06

c

I(f)

Page 8: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

A Solution:

Claim: The maximum of I(f) is achieved for f(x) = x/2.

Page 9: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

A Solution:

Claim: The maximum of I(f) is achieved for f(x) = x/2.

Proof. Any f can be written f(x) = x2 + g(x).

Page 10: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

A Solution:

Claim: The maximum of I(f) is achieved for f(x) = x/2.

Proof. Any f can be written f(x) = x2 + g(x). Then

I(f) =

∫ 1

0

(x2[x2 + g(x)] − x[x2 + g(x)]2

)dx.

Page 11: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

A Solution:

Claim: The maximum of I(f) is achieved for f(x) = x/2.

Proof. Any f can be written f(x) = x2 + g(x). Then

I(f) =

∫ 1

0

(x2[x2 + g(x)] − x[x2 + g(x)]2

)dx.

=

∫ 1

0

14x3 dx −

∫ 1

0xg(x)2 dx

Page 12: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

A Solution:

Claim: The maximum of I(f) is achieved for f(x) = x/2.

Proof. Any f can be written f(x) = x2 + g(x). Then

I(f) =

∫ 1

0

(x2[x2 + g(x)] − x[x2 + g(x)]2

)dx.

=1

16−

∫ 1

0xg(x)2 dx

︸ ︷︷ ︸

≥0

Page 13: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

A Solution:

Claim: The maximum of I(f) is achieved for f(x) = x/2.

Proof. Any f can be written f(x) = x2 + g(x). Then

I(f) =

∫ 1

0

(x2[x2 + g(x)] − x[x2 + g(x)]2

)dx.

=1

16−

∫ 1

0xg(x)2 dx

︸ ︷︷ ︸

≥0

So the maximum of I(f), achieved with g(x) = 0, is 116 .

Page 14: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Multivariable Calculus

That approach works only if you “guess” the right family offunctions (i.e., containing the optimal f(x)) . . . how to tell?

Page 15: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Multivariable Calculus

That approach works only if you “guess” the right family offunctions (i.e., containing the optimal f(x)) . . . how to tell?

A more reliable method uses ideas from multivariable calculus:

Definition. Given a function f : IRn→ IR, the directional derivative at x,

in the direction of a unit vector u, is

Duf(x) = limh→0

f(x + hu) − f(x)

h= d

dhf(x + hu)∣∣∣h=0

Page 16: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Multivariable Calculus

That approach works only if you “guess” the right family offunctions (i.e., containing the optimal f(x)) . . . how to tell?

A more reliable method uses ideas from multivariable calculus:

Definition. Given a function f : IRn→ IR, the directional derivative at x,

in the direction of a unit vector u, is

Duf(x) = limh→0

f(x + hu) − f(x)

h= d

dhf(x + hu)∣∣∣h=0

Duf(x) gives the rate of change of f(x) as we move in thedirection u at unit speed. (e.g. rate of change of temperaturealong a given direction).

Page 17: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Multivariable Calculus

For f : IR2→ IR, the graph of y = f(x) is a surface, and Duf(x)

is the slope of this surface along the direction u:

xy

z = f(x, y)

x

Page 18: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Multivariable Calculus

For f : IR2→ IR, the graph of y = f(x) is a surface, and Duf(x)

is the slope of this surface along the direction u:

xy

z = f(x, y)

xu

Page 19: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Multivariable Calculus

For f : IR2→ IR, the graph of y = f(x) is a surface, and Duf(x)

is the slope of this surface along the direction u:

xy

z = f(x, y)

xu

Page 20: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Multivariable Calculus

For f : IR2→ IR, the graph of y = f(x) is a surface, and Duf(x)

is the slope of this surface along the direction u:

xy

z = f(x, y)

xu

slope = Duf(x)

Page 21: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Multivariable Calculus

The directional derivative helps find extreme values of f(x):

Page 22: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Multivariable Calculus

The directional derivative helps find extreme values of f(x):Theorem. If f : IR → IRn has a local extremum at x, then Duf(x) = 0 forevery direction u.

xy

z = f(x, y)

Page 23: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Infinite-Dimensional Calculus

Problem: Find f to maximize I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx.

Page 24: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Infinite-Dimensional Calculus

Problem: Find f to maximize I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx.

I(f) is a real-valued functionon the space C of continuousfunctions on the interval [0, 1]. f

y

C

y = I(f)

Page 25: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Infinite-Dimensional Calculus

Problem: Find f to maximize I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx.

I(f) is a real-valued functionon the space C of continuousfunctions on the interval [0, 1]. f

y

C

y = I(f)

C is an infinite-dimensional vector space (i.e. equipped withaddition and scalar multiplication, hence a notion of “direction”).

Page 26: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Infinite-Dimensional Calculus

Problem: Find f to maximize I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx.

I(f) is a real-valued functionon the space C of continuousfunctions on the interval [0, 1]. f

y

C

y = I(f)

C is an infinite-dimensional vector space (i.e. equipped withaddition and scalar multiplication, hence a notion of “direction”).

I(f) depends continuously (even differentiably) on f ∈ C.

Page 27: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Infinite-Dimensional Calculus

Directional derivative of I(f) on the function space C:

Pick a function f ∈ C

f

C

Page 28: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Infinite-Dimensional Calculus

Directional derivative of I(f) on the function space C:

Pick a function f ∈ C and a “direction” — say, the direction ofthe function g ∈ C.

f λg

f + λgC

Page 29: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Infinite-Dimensional Calculus

Directional derivative of I(f) on the function space C:

Pick a function f ∈ C and a “direction” — say, the direction ofthe function g ∈ C. How quickly does I(f) change as we move fin the direction of g?

f λg

f + λgC

Page 30: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Some Infinite-Dimensional Calculus

Directional derivative of I(f) on the function space C:

Pick a function f ∈ C and a “direction” — say, the direction ofthe function g ∈ C. How quickly does I(f) change as we move fin the direction of g?

f λg

f + λgC

The rate of change of I(f) in the g-direction is the directional orGâteaux derivative :

DgI(f) = limλ→0

I(f + λg) − I(f)

λ= d

dλI(f + λg)∣∣∣λ=0

Page 31: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Application to the Putnam Problem:

For I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx this is an easy calculation:

Page 32: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Application to the Putnam Problem:

For I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx this is an easy calculation:

DgI(f) = ddλI(f + λg)

∣∣∣λ=0

=d

[ ∫ 1

0x2

(f(x) + λg(x)

)− x

(f(x) + λg(x)

)2dx

]

λ=0

Page 33: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Application to the Putnam Problem:

For I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx this is an easy calculation:

DgI(f) = ddλI(f + λg)

∣∣∣λ=0

=d

[ ∫ 1

0x2

(f(x) + λg(x)

)− x

(f(x) + λg(x)

)2dx

]

λ=0

= d

»

R

1

0x2

`

f(x) − xf(x)2´

dx + λR

1

0

`

x2g(x) − 2xf(x)g(x)´

dx − λ2R

1

0xg(x)2 dx

λ=0

Page 34: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Application to the Putnam Problem:

For I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx this is an easy calculation:

DgI(f) = ddλI(f + λg)

∣∣∣λ=0

=d

[ ∫ 1

0x2

(f(x) + λg(x)

)− x

(f(x) + λg(x)

)2dx

]

λ=0

= d

»

R

1

0x2

`

f(x) − xf(x)2´

dx + λR

1

0

`

x2g(x) − 2xf(x)g(x)´

dx − λ2R

1

0xg(x)2 dx

λ=0

=

[ ∫ 1

0

(x2g(x) − 2xf(x)g(x)

)− 2λ

∫ 1

0

xg(x)2 dx

]

λ=0

Page 35: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Application to the Putnam Problem:

For I(f) =

∫ 1

0

(x2f(x) − xf(x)2

)dx this is an easy calculation:

DgI(f) = ddλI(f + λg)

∣∣∣λ=0

=d

[ ∫ 1

0x2

(f(x) + λg(x)

)− x

(f(x) + λg(x)

)2dx

]

λ=0

= d

»

R

1

0x2

`

f(x) − xf(x)2´

dx + λR

1

0

`

x2g(x) − 2xf(x)g(x)´

dx − λ2R

1

0xg(x)2 dx

λ=0

=

[ ∫ 1

0

(x2g(x) − 2xf(x)g(x)

)− 2λ

∫ 1

0

xg(x)2 dx

]

λ=0

=

∫ 1

0

(x2

− 2xf(x))g(x) dx.

Page 36: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Application to the Putnam Problem:

So the directional derivative of I(f) in the “direction” of thefunction g is:

DgI(f) =

∫ 1

0

(x2

− 2xf(x))g(x) dx

Page 37: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Application to the Putnam Problem:

So the directional derivative of I(f) in the “direction” of thefunction g is:

DgI(f) =

∫ 1

0

(x2

− 2xf(x))g(x) dx

If this derivative is to be zero for every direction g, then

x2− 2xf(x) = 0

Page 38: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Application to the Putnam Problem:

So the directional derivative of I(f) in the “direction” of thefunction g is:

DgI(f) =

∫ 1

0

(x2

− 2xf(x))g(x) dx

If this derivative is to be zero for every direction g, then

x2− 2xf(x) = 0 =⇒ f(x) =

x

2

Page 39: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

PROCLAMATION:

“Since it is known with certainty that there is scarcely anythingwhich more greatly excites noble and ingenious spirits to laborswhich lead to the increase of knowledge than to propose difficultand at the same time useful problems through the solution ofwhich, as by no other means, they may attain to fame and buildfor themselves eternal monuments among prosperity; so Ishould expect to deserve the thanks of the mathematical world if. . . I should bring before the leading analysts of this age someproblem up which as upon a touchstone they could test theirmethods, exert their powers, and, in case they brought anythingto light, could communicate with us in order that everyone mightpublicly receive his deserved praise from us.”

— Johann Bernoulli, Acta Eruditorum, June 1696

Page 40: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Brachistochrone Problem:

Problem: Bead falls from rest along frictionless wire. Find shapeof wire to minimize transit time.

t = 0

t =?

Page 41: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Brachistochrone Problem:

Problem: Bead falls from rest along frictionless wire. Find shapeof wire to minimize transit time.

t = 0

t =?

x

y

y = y(x)

(x0, y0)

Page 42: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Brachistochrone Problem:

x

y

y = y(x)

(x0, y0)

dx

ds

arc length: ds =√

1 + y′(x)2 dx

speed: v =√

−2gy(x)

Page 43: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Brachistochrone Problem:

x

y

y = y(x)

(x0, y0)

dx

ds

arc length: ds =√

1 + y′(x)2 dx

speed: v =√

−2gy(x)

Minimize total transit time:

T (y) =

∫ds

v

Page 44: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Brachistochrone Problem:

x

y

y = y(x)

(x0, y0)

dx

ds

arc length: ds =√

1 + y′(x)2 dx

speed: v =√

−2gy(x)

Minimize total transit time:

T (y) =

∫ds

v=

∫ x0

0

1 + y′(x)2√

−2gy(x)dx

Page 45: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Findequilibrium shape of cable.

Page 46: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Findequilibrium shape of cable.

y

x

y = y(x)

Page 47: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Findequilibrium shape of cable.

y

x

y = y(x)

ds

dx

x0

arc length: ds =√

1 + y′(x)2 dx

potential energy: dP = −y(x) ds = −y(x)√

1 + y′(x)2 dx

Page 48: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Findequilibrium shape of cable.

y

x

y = y(x)

ds

dx

x0

arc length: ds =√

1 + y′(x)2 dx

potential energy: dP = −y(x) ds = −y(x)√

1 + y′(x)2 dx

Minimize total potential energy:

P (y) =

dP

Page 49: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Findequilibrium shape of cable.

y

x

y = y(x)

ds

dx

x0

arc length: ds =√

1 + y′(x)2 dx

potential energy: dP = −y(x) ds = −y(x)√

1 + y′(x)2 dx

Minimize total potential energy:

P (y) =

dP = −

∫ x0

0y(x)

1 + y′(x)2 dx

Page 50: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Navigation Problem:

Problem: Boat cross river at constant speed relative to water.Find route to minimize transit time from A to B.

B

A

Page 51: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Navigation Problem:

Problem: Boat cross river at constant speed relative to water.Find route to minimize transit time from A to B.

y = y(x)

x

y

v(x)

(x0, y0)

Page 52: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Navigation Problem:

Problem: Boat cross river at constant speed relative to water.Find route to minimize transit time from A to B.

y = y(x)

x

y

v(x)

(x0, y0)

Total transit time along route y = y(x):

T (y) =

∫ x0

0

[

α(x)2√

1 + α(x)2y′(x)2 −(α(x)2v(x)y′(x)

]

dx

where α(x) =(1 − v(x)2

)−1/2

Page 53: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Profit Maximization Problem:

Problem: A company uses a resource at a rate R(t) to producewidgets at a rate y

(R(t)

). It sells the widgets for p dollars each.

Page 54: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Profit Maximization Problem:

Problem: A company uses a resource at a rate R(t) to producewidgets at a rate y

(R(t)

). It sells the widgets for p dollars each.

The resource costs w per unit; a cost c(R′(t)

)is associated with

adjusting the use of the resource.

Page 55: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Profit Maximization Problem:

Problem: A company uses a resource at a rate R(t) to producewidgets at a rate y

(R(t)

). It sells the widgets for p dollars each.

The resource costs w per unit; a cost c(R′(t)

)is associated with

adjusting the use of the resource.

The company wants to find R(t) to maximize the total profit oversome time interval:

P (R) =

∫ b

a

[

p · y(R(t)

)

︸ ︷︷ ︸

revenue

− w · R(t)︸ ︷︷ ︸

cost of resource

− c(R′(t)

)

︸ ︷︷ ︸

adjustment cost

]

dt

(while perhaps also satisfying various constraints or targets).

Page 56: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

A Collection of Optimization Problems:

brachistochrone: T (y) =

∫ x0

0

1 + y′(x)2√

−2gy(x)dx

hanging cable: P (y) = −

∫ x0

0y(x)

1 + y′(x)2 dx

river navigation: T (y) =

∫ x0

0

[

α(x)2√

1 + α(x)2y′(x)2

(α(x)2v(x)y′(x)

]

dx

profit: P (R) =

∫ b

apy

(R(t)

)− wR(t) − c

(R′(t)

)dt

Page 57: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

A Collection of Optimization Problems:

brachistochrone: T (y) =

∫ x0

0

1 + y′(x)2√

−2gy(x)dx

hanging cable: P (y) = −

∫ x0

0y(x)

1 + y′(x)2 dx

river navigation: T (y) =

∫ x0

0

[

α(x)2√

1 + α(x)2y′(x)2

(α(x)2v(x)y′(x)

]

dx

profit: P (R) =

∫ b

apy

(R(t)

)− wR(t) − c

(R′(t)

)dt

In general: I(y) =

∫ b

aF

(x, y(x), y′(x)

)dx

Page 58: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

Problem: Find a function y(x) than gives an extreme value of

I(y) =

∫ b

aF

(x, y(x), y′(x)

)dx

Page 59: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

Problem: Find a function y(x) than gives an extreme value of

I(y) =

∫ b

aF

(x, y(x), y′(x)

)dx

Solution: Consider the directional derivative of I(y) in the“direction” of the function g:

DgI(y) =d

dλI(y + λg)

∣∣∣∣λ=0

Page 60: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

Problem: Find a function y(x) than gives an extreme value of

I(y) =

∫ b

aF

(x, y(x), y′(x)

)dx

Solution: Consider the directional derivative of I(y) in the“direction” of the function g:

DgI(y) =d

dλI(y + λg)

∣∣∣∣λ=0

=d

∫ b

aF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

Page 61: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

DgI(y) =d

∫ b

aF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

Page 62: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

DgI(y) =d

∫ b

aF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

=

∫ b

a

d

dλF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

Page 63: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

DgI(y) =d

∫ b

aF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

=

∫ b

a

d

dλF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

=

∫ b

a

∂F

∂y

(x, y + λg, y′ + λg′

)g +

∂F

∂y′(x, y + λg, y′ + λg′

)g′ dx

∣∣∣∣λ=0

Page 64: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

DgI(y) =d

∫ b

aF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

=

∫ b

a

d

dλF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

=

∫ b

a

∂F

∂y

(x, y + λg, y′ + λg′

)g +

∂F

∂y′(x, y + λg, y′ + λg′

)g′ dx

∣∣∣∣λ=0

=

∫ b

a

∂F

∂y

(x, y, y′

)g +

∂F

∂y′(x, y, y′

)g′ dx

Page 65: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

DgI(y) =d

∫ b

aF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

=

∫ b

a

d

dλF

(x, y + λg, y′ + λg′

)dx

∣∣∣∣λ=0

=

∫ b

a

∂F

∂y

(x, y + λg, y′ + λg′

)g +

∂F

∂y′(x, y + λg, y′ + λg′

)g′ dx

∣∣∣∣λ=0

=

∫ b

a

∂F

∂y

(x, y, y′

)g +

∂F

∂y′(x, y, y′

)g′ dx

=

∫ b

a

∂F

∂y

(x, y, y′

)g dx+

∂F

∂y′(x, y, y′

)g

∣∣∣∣

b

a

∫ b

a

[d

dx

∂F

∂y′(x, y, y′

)]

g dx

Page 66: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

So finally. . .

DgI(y) =

∫ b

a

[∂F

∂y

(x, y, y′

)−

d

dx

∂F

∂y′(x, y, y′

)]

g(x) dx

Page 67: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

So finally. . .

DgI(y) =

∫ b

a

[∂F

∂y

(x, y, y′

)−

d

dx

∂F

∂y′(x, y, y′

)]

g(x) dx

Setting DgI(y) = 0 for every direction g, we get theEuler-Lagrange equation (ca. 1750):

∂F

∂y

(x, y, y′

)−

d

dx

∂F

∂y′(x, y, y′

)= 0

Page 68: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

General Optimization Problem:

So finally. . .

DgI(y) =

∫ b

a

[∂F

∂y

(x, y, y′

)−

d

dx

∂F

∂y′(x, y, y′

)]

g(x) dx

Setting DgI(y) = 0 for every direction g, we get theEuler-Lagrange equation (ca. 1750):

∂F

∂y

(x, y, y′

)−

d

dx

∂F

∂y′(x, y, y′

)= 0

. . . a differential equation for the unknown function y(x).

Page 69: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Back to the Putnam Problem:

Problem: Find y to maximize I(y) =

∫ 1

0

(x2y(x) − xy(x)2

)dx.

Page 70: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Back to the Putnam Problem:

Problem: Find y to maximize I(y) =

∫ 1

0

(x2y(x) − xy(x)2

)dx.

Solution: We have I(y) =

∫ b

aF

(x, y(x), y′(x)

)dx with:

F (x, y, y′) = x2y − xy2

Page 71: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Back to the Putnam Problem:

Problem: Find y to maximize I(y) =

∫ 1

0

(x2y(x) − xy(x)2

)dx.

Solution: We have I(y) =

∫ b

aF

(x, y(x), y′(x)

)dx with:

F (x, y, y′) = x2y − xy2

Apply the Euler-Lagrange equation:

∂F

∂y−

d

dx

∂F

∂y′= 0

Page 72: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Back to the Putnam Problem:

Problem: Find y to maximize I(y) =

∫ 1

0

(x2y(x) − xy(x)2

)dx.

Solution: We have I(y) =

∫ b

aF

(x, y(x), y′(x)

)dx with:

F (x, y, y′) = x2y − xy2

Apply the Euler-Lagrange equation:

∂F

∂y−

d

dx

∂F

∂y′= 0 =⇒ x2

− 2xy = 0

Page 73: The Calculus of Variations - Thompson Rivers …The Calculus of Variations All You Need to Know in One Easy Lesson Richard Taylor rtaylor@tru.ca TRU Math Seminar Putnam 2006: Problem

Back to the Putnam Problem:

Problem: Find y to maximize I(y) =

∫ 1

0

(x2y(x) − xy(x)2

)dx.

Solution: We have I(y) =

∫ b

aF

(x, y(x), y′(x)

)dx with:

F (x, y, y′) = x2y − xy2

Apply the Euler-Lagrange equation:

∂F

∂y−

d

dx

∂F

∂y′= 0 =⇒ x2

− 2xy = 0 =⇒ y =x

2