Quick viewing(Text Mode)

The Calculus of Variations All You Need to Know in One Easy Lesson Putnam 2006: Problem B5

The Calculus of Variations All You Need to Know in One Easy Lesson Putnam 2006: Problem B5

Richard Taylor [email protected] TRU Math Seminar

The of Variations All You Need to Know in One Easy Lesson Putnam 2006: Problem B5

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

1 I(f) = x2f(x) − xf(x)2 dx. Z 0  Find the maximum value of I(f) over all such functions f. Putnam 2006: Problem B5

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

1 I(f) = x2f(x) − xf(x)2 dx. Z 0  Find the maximum value of I(f) over all such functions f.

f(x) = sin(πx) 0.0 0.4 0.8

0.0 0.2 0.4 0.6 0.8 1.0 x 4π2−π3−16 ≈ − I(f) = 4π3 0.061 Putnam 2006: Problem B5

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

1 I(f) = x2f(x) − xf(x)2 dx. Z 0  Find the maximum value of I(f) over all such functions f.

f(x) = sin(πx) g(x)= x2 0.0 0.4 0.8 0.0 0.4 0.8

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 x x 4π2−π3−16 ≈ − 1 ≈ I(f) = 4π3 0.061 I(g) = 30 0.033 Putnam 2006: Problem B5

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

f(x) = cx (c is a parameter). Putnam 2006: Problem B5

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

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

1 Then I(f) = x2(cx) − x(cx)2 dx Z 0  Putnam 2006: Problem B5

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

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

1 Then I(f) = x2(cx) − x(cx)2 dx = 1 (c − c2). Z 4 0 

I(f) So, restricted to this family, I(f) is 1 maximized with c = 2 . 0.00 0.02 0.04 0.06 0.0 0.2 0.4c 0.6 0.8 1.0 A Solution:

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

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

x Proof. Any f can be written f(x) = 2 + g(x). A Solution:

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

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

1 I(f) = x2[ x + g(x)] − x[ x + g(x)]2 dx. Z 2 2 0  A Solution:

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

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

1 2 x − x 2 I(f) = x [ 2 + g(x)] x[ 2 + g(x)] dx. Z0 1 1  1 3 − 2 = 4 x dx xg(x) dx Z0 Z0 A Solution:

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

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

1 I(f) = x2[ x + g(x)] − x[ x + g(x)]2 dx. Z 2 2 0  1 1 = − xg(x)2 dx 16 Z0 ≥0 | {z } A Solution:

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

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

1 I(f) = x2[ x + g(x)] − x[ x + g(x)]2 dx. Z 2 2 0  1 1 = − xg(x)2 dx 16 Z0 ≥0

| {z } 1 So the maximum of I(f), achieved with g(x) = 0, is 16 . Some Multivariable Calculus

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

That approach works only if you “guess” the right family of functions (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 at x, in the direction of a unit vector u, is

x u − x f( + h ) f( ) d u x x u D f( ) = lim = dh f( + h ) h→0 h h=0

Some Multivariable Calculus

That approach works only if you “guess” the right family of functions (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 at x, in the direction of a unit vector u, is

x u − x f( + h ) f( ) d u x x u D f( ) = lim = dh f( + h ) h→0 h h=0

Duf(x) gives the rate of change of f(x) as we move in the direction u at unit speed. (e.g. rate of change of temperature along a given direction). Some Multivariable Calculus

2 For f : IR → IR, the graph of y = f(x) is a , and Duf(x) is the of this surface along the direction u:

z = f(x, y)

x y x Some Multivariable Calculus

2 For f : IR → IR, the graph of y = f(x) is a surface, and Duf(x) is the slope of this surface along the direction u:

z = f(x, y)

x u y x Some Multivariable Calculus

2 For f : IR → IR, the graph of y = f(x) is a surface, and Duf(x) is the slope of this surface along the direction u:

z = f(x, y)

x u y x Some Multivariable Calculus

2 For f : IR → IR, the graph of y = f(x) is a surface, and Duf(x) is the slope of this surface along the direction u:

z = f(x, y)

slope = Duf(x)

x u y x Some Multivariable Calculus

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

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

y x Some Infinite-Dimensional Calculus

1 Problem: Find f to maximize I(f) = x2f(x) − xf(x)2 dx. Z 0  Some Infinite-Dimensional Calculus

1 Problem: Find f to maximize I(f) = x2f(x) − xf(x)2 dx. Z 0  y y = I(f) I(f) is a real-valued function on the space C of continuous C functions on the interval [0, 1]. f Some Infinite-Dimensional Calculus

1 Problem: Find f to maximize I(f) = x2f(x) − xf(x)2 dx. Z 0  y y = I(f) I(f) is a real-valued function on the space C of continuous C functions on the interval [0, 1]. f

C is an infinite-dimensional vector space (i.e. equipped with addition and scalar multiplication, hence a notion of “direction”). Some Infinite-Dimensional Calculus

1 Problem: Find f to maximize I(f) = x2f(x) − xf(x)2 dx. Z 0  y y = I(f) I(f) is a real-valued function on the space C of continuous C functions on the interval [0, 1]. f

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

I(f) depends continuously (even differentiably) on f ∈ C. Some Infinite-Dimensional Calculus

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

C

f 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 of the function g ∈ C.

C f + λg

f λg 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 of the function g ∈ C. How quickly does I(f) change as we move f in the direction of g?

C f + λg

f λg 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 of the function g ∈ C. How quickly does I(f) change as we move f in the direction of g?

C f + λg

f λg

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

− I(f + λg) I(f) d DgI(f) = lim = dλ I(f + λg) λ→0 λ λ=0

Application to the Putnam Problem:

1 For I(f) = x2f(x) − xf(x)2 dx this is an easy calculation: Z 0  Application to the Putnam Problem:

1 For I(f) = x2f(x) − xf(x)2 dx this is an easy calculation: Z 0  d DgI(f) = dλ I(f + λg) λ=0 1 d 2 = x2 f(x) + λg(x) − x f(x) + λg(x) dx dλ Z  0   λ=0 Application to the Putnam Problem:

1 For I(f) = x2f(x) − xf(x)2 dx this is an easy calculation: Z 0  d DgI(f) = dλ I(f + λg) λ=0 1 d 2 = x2 f(x) + λg(x) − x f(x) + λg(x) dx dλ Z  0   λ=0

d 1 1 1 = x2 f(x) − xf(x)2 dx + λ x2g(x) − 2xf(x)g(x) dx − λ2 xg(x)2 dx dλ » 0 0 0 – R ` ´ R ` ´ R λ=0 Application to the Putnam Problem:

1 For I(f) = x2f(x) − xf(x)2 dx this is an easy calculation: Z 0  d DgI(f) = dλ I(f + λg) λ=0 1 d 2 = x2 f(x) + λg(x) − x f(x) + λg(x) dx dλ Z  0   λ=0

d 1 1 1 = x2 f(x) − xf(x)2 dx + λ x2g(x) − 2xf(x)g(x) dx − λ2 xg(x)2 dx dλ » 0 0 0 – R ` ´ R ` ´ R λ=0 1 1 = x2g(x) − 2xf(x)g(x) − 2λ xg(x)2 dx  Z Z  0  0 λ=0 Application to the Putnam Problem:

1 For I(f) = x2f(x) − xf(x)2 dx this is an easy calculation: Z 0  d DgI(f) = dλ I(f + λg) λ=0 1 d 2 = x2 f(x) + λg(x) − x f(x) + λg(x) dx dλ Z  0   λ=0

d 1 1 1 = x2 f(x) − xf(x)2 dx + λ x2g(x) − 2xf(x)g(x) dx − λ2 xg(x)2 dx dλ » 0 0 0 – R ` ´ R ` ´ R λ=0 1 1 = x2g(x) − 2xf(x)g(x) − 2λ xg(x)2 dx  Z0 Z0 λ=0 1  = x2 − 2xf(x) g(x) dx. Z 0  Application to the Putnam Problem:

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

1 2 DgI(f) = x − 2xf(x) g(x) dx Z 0  Application to the Putnam Problem:

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

1 2 DgI(f) = x − 2xf(x) g(x) dx Z 0  If this derivative is to be zero for every direction g, then

x2 − 2xf(x) = 0 Application to the Putnam Problem:

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

1 2 DgI(f) = x − 2xf(x) g(x) dx Z 0  If this derivative is to be zero for every direction g, then x x2 − 2xf(x)=0 =⇒ f(x) = 2 PROCLAMATION:

“Since it is known with certainty that there is scarcely anything which more greatly excites noble and ingenious spirits to labors which lead to the increase of knowledge than to propose difficult and at the same time useful problems through the solution of which, as by no other means, they may attain to fame and build for themselves eternal monuments among prosperity; so I should expect to deserve the thanks of the mathematical world if . . . I should bring before the leading analysts of this age some problem up which as upon a touchstone they could test their methods, exert their powers, and, in case they brought anything to light, could communicate with us in order that everyone might publicly receive his deserved praise from us.” — Johann Bernoulli, Acta Eruditorum, June 1696 Brachistochrone Problem:

Problem: Bead falls from rest along frictionless wire. Find shape of wire to minimize transit time. t =0

t =? Brachistochrone Problem:

Problem: Bead falls from rest along frictionless wire. Find shape of wire to minimize transit time. y t =0 x

y = y(x) t =?

(x0,y0) Brachistochrone Problem:

y x y = y(x)

ds

dx

(x0,y0)

: ds = 1 + y′(x)2 dx speed: v = p−2gy(x) p Brachistochrone Problem:

y x y = y(x)

ds

dx

(x0,y0)

arc length: ds = 1 + y′(x)2 dx speed: v = p−2gy(x) p Minimize total transit time:

ds T (y) = Z v Brachistochrone Problem:

y x y = y(x)

ds

dx

(x0,y0)

arc length: ds = 1 + y′(x)2 dx speed: v = p−2gy(x) p Minimize total transit time:

ds x0 1 + y′(x)2 T (y) = = dx Z v Z0 p −2gy(x) p Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Find equilibrium shape of cable. Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Find equilibrium shape of cable. y

x y = y(x) Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Find equilibrium shape of cable. y x0 ds x dx y = y(x)

arc length: ds = 1 + y′(x)2 dx potential energy: dP = −y(x)pds = −y(x) 1 + y′(x)2 dx p Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Find equilibrium shape of cable. y x0 ds x dx y = y(x)

arc length: ds = 1 + y′(x)2 dx potential energy: dP = −y(x)pds = −y(x) 1 + y′(x)2 dx p Minimize total potential energy:

P (y) = dP Z Hanging Cable Problem:

Problem: Flexible cable is supported at endpoints. Find equilibrium shape of cable. y x0 ds x dx y = y(x)

arc length: ds = 1 + y′(x)2 dx potential energy: dP = −y(x)pds = −y(x) 1 + y′(x)2 dx p Minimize total potential energy:

x0 P (y) = dP = − y(x) 1 + y′(x)2 dx Z Z0 p Navigation Problem:

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

A

B Navigation Problem:

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

v(x) x

y = y(x) y (x0,y0) Navigation Problem:

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

v(x) x

y = y(x) y (x0,y0)

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

x0 T (y) = α(x)2 1 + α(x)2y′(x)2 − α(x)2v(x)y′(x) dx Z 0 h p i − where α(x) = 1 − v(x)2 1/2  Profit Maximization Problem:

Problem: A company uses a resource at a rate R(t) to produce widgets at a rate y R(t) . It sells the widgets for p dollars each.  Profit Maximization Problem:

Problem: A company uses a resource at a rate R(t) to produce widgets 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.  Profit Maximization Problem:

Problem: A company uses a resource at a rate R(t) to produce widgets 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 over some time interval:

b P (R) = p · y R(t) − w · R(t) − c R′(t) dt Za h i revenue  cost of resource adjustment cost | {z } | {z } | {z } (while perhaps also satisfying various constraints or targets). A Collection of Optimization Problems:

x0 1 + y′(x)2 brachistochrone: T (y) = dx Z0 p −2gy(x) xp0 hanging cable: P (y) = − y(x) 1 + y′(x)2 dx Z0 p x0 river navigation: T (y) = α(x)2 1 + α(x)2y′(x)2 Z0 h p − α(x)2v(x)y′(x) dx i b profit: P (R) = py R(t) − wR(t) − c R′(t) dt Z a   A Collection of Optimization Problems:

x0 1 + y′(x)2 brachistochrone: T (y) = dx Z0 p −2gy(x) xp0 hanging cable: P (y) = − y(x) 1 + y′(x)2 dx Z0 p x0 river navigation: T (y) = α(x)2 1 + α(x)2y′(x)2 Z0 h p − α(x)2v(x)y′(x) dx i b profit: P (R) = py R(t) − wR(t) − c R′(t) dt Z a  

b In general: I(y) = F x,y(x),y′(x) dx Z a  General Optimization Problem:

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

b I(y) = F x,y(x),y′(x) dx Z a  General Optimization Problem:

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

b I(y) = F x,y(x),y′(x) dx Z a  Solution: Consider the directional derivative of I(y) in the “direction” of the function g:

d D I(y) = I(y + λg) g dλ λ=0

General Optimization Problem:

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

b I(y) = F x,y(x),y′(x) dx Z a  Solution: Consider the directional derivative of I(y) in the “direction” of the function g:

d D I(y) = I(y + λg) g dλ λ=0

d b = F x,y + λg,y′ + λg′ dx dλ Z a  λ=0

General Optimization Problem:

b d ′ ′ DgI(y) = F x,y + λg,y + λg dx dλ Z a  λ=0

General Optimization Problem:

b d ′ ′ DgI(y) = F x,y + λg,y + λg dx dλ Z a  λ=0

b d = F x,y + λg,y′ + λg′ dx Z dλ a  λ=0

General Optimization Problem:

b d ′ ′ DgI(y) = F x,y + λg,y + λg dx dλ Z a  λ=0

b d = F x,y + λg,y′ + λg′ dx Z dλ a  λ=0

b ∂F ∂F = x,y + λg,y′ + λg′ g + x,y + λg,y′ + λg′ g′ dx Z ∂y ∂y′ a   λ=0

General Optimization Problem:

b d ′ ′ DgI(y) = F x,y + λg,y + λg dx dλ Z a  λ=0

b d = F x,y + λg,y′ + λg′ dx Z dλ a  λ=0

b ∂F ∂F = x,y + λg,y′ + λg′ g + x,y + λg,y′ + λg′ g′ dx Z ∂y ∂y′ a   λ=0

b ∂F ∂F = x,y,y′ g + x,y,y′ g′ dx Z ∂y ∂y′ a   General Optimization Problem:

b d ′ ′ DgI(y) = F x,y + λg,y + λg dx dλ Z a  λ=0

b d = F x,y + λg,y′ + λg′ dx Z dλ a  λ=0

b ∂F ∂F = x,y + λg,y′ + λg′ g + x,y + λg,y′ + λg′ g′ dx Z ∂y ∂y′ a   λ=0

b ∂F ∂F = x,y,y′ g + x,y,y′ g′ dx Z ∂y ∂y′ a   b ∂F ∂F b b d ∂F = x,y,y′ g dx+ x,y,y′ g − x,y,y′ g dx Z ∂y ∂y′ Z dx ∂y′  a   a a 

General Optimization Problem:

So finally. . .

b ∂F ′ d ∂F ′ DgI(y) = x,y,y − x,y,y g(x) dx Z  ∂y dx ∂y′  a   General Optimization Problem:

So finally. . .

b ∂F ′ d ∂F ′ DgI(y) = x,y,y − x,y,y g(x) dx Z  ∂y dx ∂y′  a  

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

∂F d ∂F x,y,y′ − x,y,y′ = 0 ∂y dx ∂y′   General Optimization Problem:

So finally. . .

b ∂F ′ d ∂F ′ DgI(y) = x,y,y − x,y,y g(x) dx Z  ∂y dx ∂y′  a  

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

∂F d ∂F x,y,y′ − x,y,y′ = 0 ∂y dx ∂y′  

. . . a for the unknown function y(x). Back to the Putnam Problem:

1 Problem: Find y to maximize I(y) = x2y(x) − xy(x)2 dx. Z 0  Back to the Putnam Problem:

1 Problem: Find y to maximize I(y) = x2y(x) − xy(x)2 dx. Z 0  b Solution: We have I(y) = F x,y(x),y′(x) dx with: Z a  F (x,y,y′) = x2y − xy2 Back to the Putnam Problem:

1 Problem: Find y to maximize I(y) = x2y(x) − xy(x)2 dx. Z 0  b Solution: We have I(y) = F x,y(x),y′(x) dx with: Z a  F (x,y,y′) = x2y − xy2

Apply the Euler-Lagrange equation:

∂F d ∂F − = 0 ∂y dx ∂y′ Back to the Putnam Problem:

1 Problem: Find y to maximize I(y) = x2y(x) − xy(x)2 dx. Z 0  b Solution: We have I(y) = F x,y(x),y′(x) dx with: Z a  F (x,y,y′) = x2y − xy2

Apply the Euler-Lagrange equation:

∂F d ∂F − = 0 =⇒ x2 − 2xy = 0 ∂y dx ∂y′ Back to the Putnam Problem:

1 Problem: Find y to maximize I(y) = x2y(x) − xy(x)2 dx. Z 0  b Solution: We have I(y) = F x,y(x),y′(x) dx with: Z a  F (x,y,y′) = x2y − xy2

Apply the Euler-Lagrange equation:

∂F d ∂F x − = 0 =⇒ x2 − 2xy = 0 =⇒ y = ∂y dx ∂y′ 2