VariationalProblems - Department of Computer...

10
Variational Problems (Com S 477/577 Notes) Yan-Bin Jia Dec 7, 2017 The variational derivative of a functional J [y] can be defined as δJ/δy = F y (x,y,y )d dx F y (x,y,y ) [1, pp. 27–29]. Euler’s equation essentially states that the variational derivative of the functional must vanish at an extremum. This is analogous to the well-known result from calculus that the derivative of a function must vanish at an extremum. 1 Variable End Point Problem In this section, we consider a simple case of the variable end point problem, which is stated as follows: Among all curves whose end points lie on two vertical lines x = a and x = b, find the curve for which the functional J [y]= b a F (x,y,y ) dx (1) has an extremum. We determine the variation of the functional (1), which is the linear component of the increment ΔJ = J [y + h] J [y]= b a F (x, y + h, y + h ) F (x,y,y ) dx, due to an increment of h in y. The Taylor expansion immediately leads to δJ = b a (F y h + F y h ) dx. Unlike the fixed end point problem, the function h(x) no longer vanishes at the points x = a and x = b. Integration by parts now yields δJ = b a F y d dx F y dx + F y h(x)| x=b x=a = b a F y d dx F y dx + F y | x=b h(b) F y | x=a h(a). (2) Consider all functions h(x) with h(a)= h(b) = 0 first. The condition δJ = 0 implies that F y d dx F y =0. The material is adapted from the book Calculus of Variations by I. M. Gelfand and S. V. Fomin, Prentice Hall Inc., 1963; Dover, 2000. 1

Transcript of VariationalProblems - Department of Computer...

Page 1: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

Variational Problems∗

(Com S 477/577 Notes)

Yan-Bin Jia

Dec 7, 2017

The variational derivative of a functional J [y] can be defined as δJ/δy = Fy(x, y, y′)− d

dxFy′(x, y, y

′)[1, pp. 27–29]. Euler’s equation essentially states that the variational derivative of the functional

must vanish at an extremum. This is analogous to the well-known result from calculus that thederivative of a function must vanish at an extremum.

1 Variable End Point Problem

In this section, we consider a simple case of the variable end point problem, which is stated asfollows: Among all curves whose end points lie on two vertical lines x = a and x = b, find the curvefor which the functional

J [y] =

∫ b

a

F (x, y, y′) dx (1)

has an extremum.We determine the variation of the functional (1), which is the linear component of the increment

∆J = J [y + h]− J [y] =

∫ b

a

(

F (x, y + h, y′ + h′)− F (x, y, y′))

dx,

due to an increment of h in y. The Taylor expansion immediately leads to

δJ =

∫ b

a

(Fyh+ Fy′h′) dx.

Unlike the fixed end point problem, the function h(x) no longer vanishes at the points x = a andx = b. Integration by parts now yields

δJ =

∫ b

a

(

Fy −d

dxFy′

)

dx+ Fy′h(x)|x=bx=a

=

∫ b

a

(

Fy −d

dxFy′

)

dx+ Fy′ |x=b h(b)− Fy′ |x=a h(a). (2)

Consider all functions h(x) with h(a) = h(b) = 0 first. The condition δJ = 0 implies that

Fy −d

dxFy′ = 0.

∗The material is adapted from the book Calculus of Variations by I. M. Gelfand and S. V. Fomin, Prentice HallInc., 1963; Dover, 2000.

1

Page 2: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

This means that the solution y of the end point problem must be a solution of Euler’s equation.Suppose y is a solution. The integral in (2) must therefore vanish, reducing δJ = 0 to

Fy′ |x=b h(b) − Fy′ |x=a h(a) = 0.

Since h is arbitrary, it follows from the above equation that

Fy′ |x=a = 0 and Fy′ |x=b = 0. (3)

In summary, to solve the variable end point problem, we first find a general solution to Euler’sequation (2), and then use the conditions (3) to determine the constants in the general solution.

Example 1. Starting at the origin, a particle slides down a curve in the vertical plane. Find the curve suchthat the particle reaches the vertical line x = b, where b 6= 0, in the shortest time.

The velocity v of motion equals√2gy from the conservation of the total energy, where g < 0 is the

gravitational acceleration. Meanwhile, it is also determined along the curve as

v =ds

dt=

1 + y′2dx

dt,

from which we immediately have

dt =

1 + y′2

vdx =

√1 + y′2√2gy

dx.

The above gives us the transit time as a functional

J =

∫ b

0

1 + y′2√2gy

dx.

The integrand F =√

1 + y′2/√2gy does not depend on x. So this is Case 2 where Euler’s equation can be

reduced toF − y′Fy′ = C. (4)

Since

Fy′ =1√2gy

· y′√

1 + y′2,

several steps from Euler’s equation (4) lead to

y′2 =a− y

y, for some a < 0.

Given the downward sliding motion, we have that y′ ≤ 0, thus

y′ = −√

a− y

y,

which leads to

dx = −√

y

a− ydy.

Next, make the substitution y = a sin2 θ2over [0, π] with

dy

dθ= 2a sin

θ

2cos

θ

2· 12= a sin

θ

2cos

θ

2.

2

Page 3: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

Under the above and the substitution,

dx = −√

a sin2 θ2

a cos2 θ2

· a sin θ

2cos

θ

2dθ

= −a sin2θ

2dθ

= −a

(

1− cos θ

2

)

= r(1 − cos θ) dθ,

where a constant r = −a/2 is introduced in the last step. The solution to Euler’s equation (4) is a family ofcycloids

x = r(θ − sin θ) + c, y = −r(1− cos θ).

Since the curve passes through the origin, the constant c = 0. The first boundary condition F ′y |x=0 = 0

in (3), which is essentially y′(0) = 0, is thus satisfied. To determine the value of r, we apply the secondboundary condition Fy′ |x=b = 0, which reduces to y′ = 0 at x = b, i.e.,

0 =dy

dx=

dy/dθ

dx/dθ=

r sin θ

r − r cos θ=

sin θ

1− cos θ.

The above condition states that the tangent to the curve at its right end point must be horizontal. Henceθ = π. Substituting this value into r(θ − sin θ) = b, we obtain r = b

π . Hence the curve trajectory is

(x, y) =b

π(θ − sin θ, cos θ − 1).

Figure 1 shows the optimal trajectory of the sliding particle to reach the line x = 2π, represented by thecycloid 2(θ − sin θ, cos θ − 1) over [0, π].

Figure 1: The cycloid 2(θ − sin θ, cos θ − 1) with 0 ≤ θ ≤ π is the minimum time trajectory along which aparticle starting at the origin slides pass the vertical line x = 2π under gravity.

2 The Case of Several Variables

Many problems involve functionals that depend on functions of several independent variables, forexample, surfaces in 3D depending on two parameters. Here we only look at how the solution to the

3

Page 4: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

case of single-variable variational problems would carry over to the case of functionals dependingon surfaces. We focus on the case of two independent variables but refer to [1] for the case of morethan two variables.

Let F (x, y, z, p, q) be twice continuously differentiable with respect to all five variables, andconsider

J [z] =

∫∫

R

F (x, y, z, zx, zy) dx dy, (5)

where R is some closed region, and zx and zy are the partial derivatives of z(x, y) with respect tox and y. We are looking for a function z(x, y) that

1. twice continuously differentiable with respect to x and y in R;

2. assumes given values on the boundary Γ of R;

3. yields an extremum of the functional (5).

Theorem 1 in the notes Calculus of Variations does not depend on the form of the functional J .Therefore, a necessary condition for the functional (5) to have an extremum is that its variationvanishes. We must first calculate the variation δJ . Let h(x, y) be an arbitrary function withcontinuous first and second derivatives in the region R and vanishes on it boundary Γ. Then, ifthe surface z(x, y) satisfies conditions 1–3, so does z(x, y) + h(x, y). We apply the Taylor series tothe change in the functional as follows:

∆J = J [z + h]− J [z]

=

∫∫

R

(

F (x, y, z + h, zx + hx, zy + hy)− F (x, y, z, zx, zy))

dx dy

=

∫∫

R

(Fzh+ Fzxhx + Fzyhy) dx dy + · · · . (6)

Meanwhile, we have that

∫∫

R

(Fzxhx + Fzyhy) dx dy

=

∫∫

R

(

∂x(Fzxh) +

∂y(Fzyh)

)

dx dy −∫∫

R

(

∂xFzx +

∂yFzy

)

hdx dy

=

Γ

(Fzxhdy − Fzyhdx)−∫∫

R

(

∂xFzx +

∂yFzy

)

hdx dy. (7)

where the last step used Green’s theorem:

∫∫(

∂Q

∂x− ∂P

∂y

)

dx dy =

Γ

(P dx+Qdy).

In (7), the integral along Γ is zero since h vanishes on the boundary. Substituting (7) into (6), weobtain

δJ =

∫∫

R

(

Fz −∂

∂xFzx − ∂

∂yFzy

)

h(x, y) dx dy. (8)

4

Page 5: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

Thus, the condition δJ = 0 implies that the double integral above vanishes for any h(x, y) withcontinuous derivatives up to the second order and vanishing on the boundary Γ. This leads to thesecond-order partial differential equation below 1, also known as Euler’s equation:

Fz −∂

∂xFzx −

∂yFzy = 0.

Next, we generalize the functional (5) to allow second order partial derivatives of z to appear inthe integrand function F . More specifically, let F (x, y, z, p, q, r, s, t) be a function with continuousfirst and second partial derivatives with respective to all arguments. The function z = z(x, y) hascontinuous derivatives up to the fourth order, and has given values on the boundary Γ of R. Thefunctional

J [z] =

∫∫

R

F (x, y, z, zx, zy, zxx, zxy, zyy) dx dy

has an extremum at z = z(x, y) only if the following version of Euler’s equation holds:

Fz −∂

∂xFzx −

∂yFzy +

∂2

∂x2Fzxx +

∂2

∂x∂yFzxy +

∂2

∂y2Fzyy = 0. (9)

Example 2. Surface z = z(x, y) of least area spanned by a given contour. The problem reduces to findingthe minimum of the functional

J [z] =

∫∫

R

1 + z2x + z2y dx dy,

for which Euler’s equation has the form

zxx(1 + z2y)− 2zxyzxzy + zyy(1 + z2x) = 0. (10)

To understand the geometric meaning of equation (10), we note that the mean curvature of the surfaceis given as

H =EN − 2FM +GL

2(EG− F 2),

where E,F,G are the coefficients of the first fundamental form of the surface, and L,M,N are the coefficientsof its second fundamental form. We obtain that

E = 1 + z2x, F = zxzy, G = 1 + z2y ,

L = zxx√1+z2

x+z2

y

, M =zxy√

1+z2x+z2

y

, N =zyy√

1+z2x+z2

y

,

and hence,

H =zxx(1 + z2y)− 2zxyzxzy + zyy(1 + z2x)

2(1 + z2x + z2y)3/2

.

Thus, Euler’s equation (10) implies that the mean curvature of the solution surface is zero everywhere.

A surface with zero mean curvature everywhere is thus called a minimal surface. Figure 2 plotsa minimal surface — a catenoid (2 cos u cosh(v/2), 2 sin u cosh(v/2), v) for 0 ≤ u ≤ 2π, −4 ≤ v ≤ 4.

1To be rigorous, a simple proof can be derived from (8) and that h is arbitrary under stipulated conditions.

5

Page 6: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

Figure 2: Catenoid (2 cosu cosh(v/2), 2 sinu cosh(v/2), v) over [0, 2π]× [−4, 4].

3 Several Unknown Functions

Let F (x, y1, . . . , yn, z1, . . . , zn) be a function with continuous first and second derivatives with re-spect to all its arguments. We now derive necessary conditions for an extremum of the functional

J [y1, . . . , yn] =

∫ b

a

F (x, y1, . . . , yn, y′

1, . . . , y′

n) dx,

where y1(x), . . . , yn(x) are continuously differentiable and satisfy the boundary conditions

yi(a) = ai, yi(b) = bi, for i = 1, . . . , n.

Namely, we are looking for an extremum of J defined on the set of smooth curves joining two points(a, a1, . . . , an) and (b, b1, . . . , bn) in the (n+ 1)-dimensional space R

n+1.Similar to the derivation of Euler’s equations for the variational problems studied before, we

add a continuously differentiable function hi(x) to each yi(x) such that the resulting yi(x) + hi(x)still satisfy the boundary conditions. Therefore, hi(a) = hi(b) = 0, for i = 1, . . . , n. The variationof J [y1, . . . , yn] is found to be

δJ =

∫ b

a

n∑

i=1

(Fyihi + Fy′ih′i) dx.

At each step, setting all but one of the hi to zero, we obtain the following system of Euler’s equationsthat must be satisfied at an extremum:

Fyi −d

dxFy′

i= 0, i = 1, . . . , n. (11)

6

Page 7: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

Example 3. Geodesics. Given a parametric surface

σ = σ(u, v),

the variational problem here is to find the minimum distance between p and q on the surface.Parametrize a curve from p and q as α(t) = σ(u(t), v(t)) so that p = α(t0) and q = α(t1). We denote

by ‘.’ differentiation with respect to t. The arc length between the two points is

J [u, v] =

∫ t1

t0

Eu2 + 2F uv +Gv2 dt, (12)

where E,F,G are the coefficients of the first fundamental form of the surface given as

E = σu · σu, F = σu · σv, G = σv · σv.

Euler’s equations for the functional (12) become

Euu2 + 2Fuuv +Guv

2

2√Eu2 + 2F uv +Gv2

− d

dt

(

Eu+ F v√Eu2 + 2F uv +Gv2

)

= 0, (13)

Evu2 + 2Fvuv +Gv v

2

2√Eu2 + 2F uv +Gv2

− d

dt

(

F u+Gv√Eu2 + 2F uv +Gv2

)

= 0. (14)

Since the parametrization does not change the total length of the curve, we may use the arc lengthparametrization. From surface geometry, we know that this means

Eu2 + 2F uv +Gv2 = 1.

Then equations (13) and (14) reduce to

d

dt(Eu+ F v) =

1

2(Euu

2 + 2Fuuv +Gv v2),

d

dt(F u +Gv) =

1

2(Evu

2 + 2Fvuv +Gv v2).

They are essentially the geodesic equations. This proves what we have learned before that the shortest curveon σ connecting two surface points p and q is a geodesic between the two points.

Sometimes, it is more convenient to use one of the surface parameters to parametrize the geodesic. Insuch a case, we still need to fall back on equations (13) and (14).

To illustrate, we now find the geodesics of the circular cylinder

σ = (a cosφ, a sinφ, z).

First, we obtain the coefficients of the first fundamental form:

E = a2, F = 0, G = 1.

Substitute these coefficients into (13) and (14):

d

dt

a2φ√

a2φ2 + z2

= 0,

d

dt

z√

a2φ2 + z2

= 0,

7

Page 8: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

Integrate the two equations above:

a2φ√

a2φ2 + z2= C1,

z√

a2φ2 + z2= C2.

Dividing the last equation by the one before, we obtain

dz

dφ= D1,

which has the solutionz = D1φ+D2.

The geodesic between two points on a cylinder thus is a helix lying on the cylinder. Given two pointsσ(φ0, z0) and σ(φ1, z1), the helix is described as

α(φ) =

(

a cosφ, a sinφ,z0 − z1φ0 − φ1

φ+φ0z1 − φ1z0φ0 − φ1

)

.

Figure 3 shows a geodesic (cosφ, sinφ, 2φ) connecting two points with φ0 = 0 and φ1 = 3

2on a cylinder

(cosφ, sinφ, z) which is plotted over the subdomain [0, 2π]× [−1, 4].

Figure 3: A geodesic on a cylinder.

4 Variational Problems in Parametric Form

We have considered functionals of curves given by equations of the form y = y(x). Often, it is moreconvenient to consider functionals of curves in parametric form, say, (x(t), y(t)). Given a functional

8

Page 9: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

of such a curve∫ x1

x0

F (x, y, y′) dx, (15)

over [t0, t1] such that x(t0) = x0 and x(t1) = x1, we can rewrite it as∫ t1

t0

F

(

x(t), y(t),y(t)

x(t)

)

x dt =

∫ t1

t0

Φ(x, y, x, y) dt.

Here the overdot denotes differentiation with respect to t. This becomes a functional depending ontwo unknown functions x(t) and y(t). The function Φ does not have t as an explicit argument. Itis positive-homogeneous of degree 1 in x and y:

Φ(x, y, cx, cy) ≡ cΦ(x, y, x, y),

for any c > 0.Conversely, let

∫ t1

t0

Φ(x, y, x, y) dt

be a functional whose integrand Φ is positive-homogeneous of degree 1 in x and y. We now show thatthe value of the functional is independent of the curve parameterization. Suppose we reparametrizethe curve with τ over [τ0, τ1] such that t = t(τ), and dt/dτ > 0 over [τ0, τ1]. Then

∫ τ1

τ0

Φ

(

x, y,dx

dτ,dy

)

dτ =

∫ τ1

τ0

Φ

(

x, y, xdt

dτ, y

dt

)

=

∫ t1

t0

Φ(x, y, x, y)dt

dτdτ

=

∫ t1

t0

Φ(x, y, x, y) dt.

Now, suppose the curve y = y(x) has a parameterization in t that reduces the functional (15)to the form

∫ t1

t0

Φ(x, y, x, y) dt.

Applying Euler’s equation (11), we end up with two equations:

Φx −d

dtΦx = 0,

Φy −d

dtΦy = 0. (16)

We can solve them for x and y.The two equations in (16) must be equivalent to the single Euler equation:

Fy −d

dxFy′ = 0,

which results from the variational problem for the original functional (15). Hence the two equationsare not independent.

We refer to [1] for other variational problems such as involving higher derivatives, with subsidiaryconditions, involving multiple integrals, etc. Also, we refer to [2] for application of the calculus ofvariations in theory of elasticity, quantum mechanics, and electrostatics.

9

Page 10: VariationalProblems - Department of Computer Scienceweb.cs.iastate.edu/~cs577/handouts/variational-problems.pdf · VariationalProblems ... ∗Thematerial isadaptedfrom thebookCalculus

References

[1] I. M. Gelfand and S. V. Fomin. Calculus of Variations Prentice-Hall, Inc., 1963; Dover Publi-cations, Inc., 2000.

[2] R. Weinstock. Calculus of Variations: With Applications to Physics and Engineering. DoverPublications, Inc., 1974.

10