Calculus of Variations Summer Term 2014

Similar documents
Calculus of Variations Summer Term 2016

Variational Methods & Optimal Control

Calculus of Variations Summer Term 2015

Calculus of Variations Summer Term 2014

Calculus of Variations Summer Term 2014

Calculus of Variations Summer Term 2014

Calculus of Variations Summer Term 2014

Calculus of Variations Summer Term 2015

Calculus of Variations Summer Term 2016

Variational Methods and Optimal Control

Stat 451 Lecture Notes Numerical Integration

Math 10C - Fall Final Exam

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point

Day 2 Notes: Riemann Sums In calculus, the result of f ( x)

Sufficient Conditions for Finite-variable Constrained Minimization

Physics 342 Lecture 2. Linear Algebra I. Lecture 2. Physics 342 Quantum Mechanics I

First and Second Order ODEs

Mechanical Systems II. Method of Lagrange Multipliers

Physics 342 Lecture 2. Linear Algebra I. Lecture 2. Physics 342 Quantum Mechanics I

PDE and Boundary-Value Problems Winter Term 2014/2015

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

Practice Exam 2 (Solutions)

12.0 Properties of orthogonal polynomials

Finite-Elements Method 2

LESSON 25: LAGRANGE MULTIPLIERS OCTOBER 30, 2017

6 Lecture 6b: the Euler Maclaurin formula

Multivariable Calculus and Matrix Algebra-Summer 2017

Calculus of Variations

Calculus of Variations Summer Term 2014

Optimization using Calculus. Optimization of Functions of Multiple Variables subject to Equality Constraints

Introduction to the Calculus of Variations

MATH 280 Multivariate Calculus Fall Integrating a vector field over a surface

Week 4: Calculus and Optimization (Jehle and Reny, Chapter A2)

Higher-order ordinary differential equations

28. Pendulum phase portrait Draw the phase portrait for the pendulum (supported by an inextensible rod)

Generalization to inequality constrained problem. Maximize

How to Solve Linear Differential Equations

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

MA22S3 Summary Sheet: Ordinary Differential Equations

minimize x subject to (x 2)(x 4) u,

Chapter 2: First Order DE 2.6 Exact DE and Integrating Fa

Numerical Optimization Algorithms

1 Lesson 13: Methods of Integration

Calculus: Area. Mathematics 15: Lecture 22. Dan Sloughter. Furman University. November 12, 2006

. (a) Express [ ] as a non-trivial linear combination of u = [ ], v = [ ] and w =[ ], if possible. Otherwise, give your comments. (b) Express +8x+9x a

Simple ODE Solvers - Derivation

Numerical Methods. King Saud University

LECTURE 14: REGULAR SINGULAR POINTS, EULER EQUATIONS

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

1.8. Integration using Tables and CAS

HIGHER ORDER METHODS. There are two principal means to derive higher order methods. b j f(x n j,y n j )

Numerical Analysis of Electromagnetic Fields

First Order Differential Equations

12d. Regular Singular Points

MTH301 Calculus II Glossary For Final Term Exam Preparation

Math6100 Day 8 Notes 6.1, 6.2 & 6.3, Area

Method of Lagrange Multipliers

JUST THE MATHS UNIT NUMBER NUMERICAL MATHEMATICS 6 (Numerical solution) of (ordinary differential equations (A)) A.J.Hobson

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Essential Ordinary Differential Equations

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker.

Second-Order Homogeneous Linear Equations with Constant Coefficients

LESSON 21: DIFFERENTIALS OF MULTIVARIABLE FUNCTIONS OCTOBER 18, 2017

Link lecture - Lagrange Multipliers

Reading group: Calculus of Variations and Optimal Control Theory by Daniel Liberzon

McGill University Math 325A: Differential Equations LECTURE 12: SOLUTIONS FOR EQUATIONS WITH CONSTANTS COEFFICIENTS (II)

Physics 200 Lecture 4. Integration. Lecture 4. Physics 200 Laboratory

LESSON 21: DIFFERENTIALS OF MULTIVARIABLE FUNCTIONS MATH FALL 2018

dt 2 The Order of a differential equation is the order of the highest derivative that occurs in the equation. Example The differential equation

MATH 1231 MATHEMATICS 1B Calculus Section 2: - ODEs.

Math Assignment 5

Econ Slides from Lecture 14

17.2 Nonhomogeneous Linear Equations. 27 September 2007

APPM/MATH Problem Set 6 Solutions

Monday, 6 th October 2008

01 Harmonic Oscillations

Numerical differentiation

Review for Exam 2. Review for Exam 2.

Lagrange Multipliers

COURSE Numerical integration of functions

Homogeneous Linear ODEs of Second Order Notes for Math 331

Calculus of Variations

Dynamic Programming. Macro 3: Lecture 2. Mark Huggett 2. 2 Georgetown. September, 2016

Unit #24 - Lagrange Multipliers Section 15.3

HOMEWORK 7 SOLUTIONS

EC487 Advanced Microeconomics, Part I: Lecture 2

Math RE - Calculus II Antiderivatives and the Indefinite Integral Page 1 of 5

Ordinary Differential Equations (ODEs)

Ordinary differential equations Notes for FYS3140

Preface. 2 Linear Equations and Eigenvalue Problem 22

Ch 5.4: Regular Singular Points

Mathematical Economics. Lecture Notes (in extracts)

PDE and Boundary-Value Problems Winter Term 2014/2015

Introduction to First Order Equations Sections

Exercises * on Linear Algebra

Least Squares Regression

Physics 129a Calculus of Variations Frank Porter Revision

COMP 558 lecture 18 Nov. 15, 2010

LECTURE 14 NUMERICAL INTEGRATION. Find

Integration Using Tables and Summary of Techniques

Transcription:

Calculus of Variations Summer Term 2014 Lecture 12 26. Juni 2014 c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 1 / 25

Purpose of Lesson Purpose of Lesson: To discuss numerical solutions of the variational problems To introduce Euler s Finite Difference Method and Ritz s Method. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 2 / 25

9. Numerical Solutions c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 3 / 25

Numerical Solutions: The Euler-Lagrange equations may be hard to solve. Natural response is to find numerical methods. 1 Numerical solution of the Euler-Lagrange equations We won t consider these here (see other courses) 2 Euler s finite difference method 3 Ritz (Rayleigh-Ritz) In 2D: Kantorovich s method c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 4 / 25

Numerical approximation of integrals: Numerical Approximation use an arbitrary set of mesh points a = x 0 < x 1 < x 2 < < x n = b. approximate y (x i ) = y i+1 y i x i+1 x i = y i x i rectangle rule J[y] = b a n 1 F(x, y, y )dx F i=0 Ĵ[ ] is a function of the vector y = (y 1, y 2,..., y n ). ( x i, y i, y ) i x i = x Ĵ[y] i c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 6 / 25

Finite Difference Method (FDM) Treat this as a maximization of a function of n variables, so that we require J y i = 0 for all i = 1, 2,..., n. Typically use uniform grid so x i = x = b a n. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 7 / 25

Simple Example Example 12.1 Find extremals for J[y] = with y(0) = 0 and y(1) = 0. 1 0 [ 1 2 y 2 + 1 ] 2 y 2 y dx The Euler-Lagrange equation y y = 1. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 8 / 25

Simple Example: direct solution Example 12.1 (direct solution) E-L equation: y y = 1 Solution to homogeneous equation y y = 0 is given by e λx giving characteristic equation so λ = ±1 Particular solution y = 1. λ 2 1 = 0, Final solution is y(x) = Ae x + Be x + 1. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 9 / 25

Simple Example: direct solution Example 12.1 (direct solution) The boundary conditions y(0) = y(1) = 0 constrain A + B = 1 Ae + Be 1 = 1 so A = 1 e e 2 1 and B = e e2 e 2 1. Then the exact solution to the extremal problem is y(x) = 1 e e 2 1 ex + e e2 e 2 1 e x + 1. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 10 / 25

Simple Example: Euler s FDM Example 12.1 (Euler s FDM) Find extremals for Euler s FDM: J[y] = 1 0 [ 1 2 y 2 + 1 ] 2 y 2 y dx Take the grid x i = i/n, for i = 0, 1,..., n so So end points y 0 = 0 and y n = 0 x = 1/n and y i = y i+1 y i. y i = y i / x = n(y i+1 y i ) and y 2 i = n 2 ( y 2 i 2y i y i+1 + y 2 i+1). c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 11 / 25

Simple Example: Euler s FDM Example 12.1 (Euler s FDM) Find extremals for J[y] = Its FDM approximation is 1 n 1 J[y] = F (x i, y i, y i )dx = = i=0 n 1 i=0 n 1 i=0 0 [ 1 2 y 2 + 1 ] 2 y 2 y dx 1 ( ) ( ) 2 n2 yi 2 2y i y i+1 + yi+1 2 x + yi 2 /2 y i x 1 ( ) 2 n yi 2 2y i y i+1 + yi+1 2 + y 2 i /2 y i n. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 12 / 25

Simple Example: end-conditions Example 12.1 (end-conditions) We know the end conditions y(0) = y(1) = 0, which imply that y 0 = y n = 0. Include them into the objective using Lagrange multipliers H[y] = n 1 i=0 1 ( ) 2 n yi 2 2y i y i+1 + yi+1 2 + y i 2 /2 y i n + λ 0 y 0 + λ n y n. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 13 / 25

Simple Example: Euler s FDM Example 12.1 (Euler s FDM) Taking derivatives, note that y i only appears in two terms of the FDM approximation H[y] = H[y] y i = n 1 i=0 1 ( ) 2 n yi 2 2y i y i+1 + yi+1 2 + y i 2 /2 y i n + λ 0 y 0 + λ n y n n(y 0 y 1 ) + y 0 1 + λ 0 for i = 0 n n(2y i y i+1 y i 1 ) + y i /n 1/n for i = 1,..., n 1 n(y n y n 1 ) + λ n for i = n We need to set the derivatives to all be zero, so we now have n = 3 linear equations, including y 0 = y n = 0, and n + 3 variables including the two Lagrange multipliers. We can solve this system numerically using, e.g., Maple. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 14 / 25

Simple Example: Euler s FDM Example 12.1 (Euler s FDM) Example: n = 4, solve where A = Az = b 1.00 4.25 4.00 1 4.00 8.25 4.00 4.00 8.25 4.00 4.00 8.25 4.00 4.00 4.00 1.00 1.00 and b = (0.00, 0.25, 0.25, 0.25, 0.25, 0.00, 0.00) T c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 15 / 25

Simple Example: Euler s FDM Example 12.1 (Euler s FDM) First n + 1 terms of z give y Last two terms of z give the Lagrange multipliers λ 0 and λ n. Solving the system we get for n = 4 y 1 = y 3 = 0.08492201040, y 2 = 0.1126516464 c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 16 / 25

Simple Example: results Example 12.1 (results) c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 17 / 25

Simple Example: results Example 12.1 (results) c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 18 / 25

Convergence of Euler s FDM Convergence of Euler s FDM n 1 Ĵ[y] = F i=0 ( x i, y i, y i x i Only two terms in the sum involve y i, so Ĵ y i = ( F y i = 1 F x y + F y i x i 1, y i 1, y i 1 x ( x i 1, y i 1, y i 1 x i ( x i, y i, y i x = F F (x i, y i, y i y ) y i i ) 1 x ( ) x and y i = y i+1 y i ) + F y ) i ( x i, y i, y ) i x ( F y i x i, y i, y i x ( x i, y i, y i x ) F y i x ) x i 1, y i 1, y i 1 x ) c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 19 / 25

Convergence of Euler s FDM Convergence of Euler s FDM Ĵ = F (x i, y i, y y i y i ( F i ) y i x i, y i, y i x ) ( F y i x x i 1, y i 1, y i 1 x ) = 0. In limit n, then x 0, and so we get F y d ( ) F dx y = 0 which are the Euler-Lagrange equations. i.e., the finite difference solution converges to the solution of the Euler-Lagrange equations. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 20 / 25

Comments Remarks There are lots of ways to improve Euler s FDM use a better method of numerical quadrature (integration) trapezoidal rule Simpson s rule Romberg s method use a non-uniform grid make it finer where there is more variation We can use a different approach that can be even better. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 21 / 25

Ritz s Method Ritz s Method In Ritz s method (called Kantorovich s method where there is more than one independent variable), we approximate our functions (the extremal in particular) using a family of simple functions. Again we can reduce the problem into a standard multivariable maximization problem, but now we seek coefficients for our approximation. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 22 / 25

Ritz s Method Assume we can approximate y(x) by y(x) = φ 0 (x) + c 1 φ 1 (x) + c 2 φ 2 (x) + + c n φ n (x) where we choose a convenient set of functions φ j (x) and find the values of c j which produce an extremal. For fixed end-points problem: Choose φ 0 (x) to satisfy the end conditions. Then φ j (x 0 ) = φ j (x 1 ) = 0 for j = 1, 2,..., n The φ can be chosen from standard sets of functions, e.g. power series, trigonometric functions, Bessel s functions, etc. (but must be linearly independent). c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 23 / 25

Ritz s Method Select { φ j } n j=0 Approximate y n (x) = φ 0 (x) + c 1 φ 1 (x) + c 2 φ 2 (x) + + c n φ n (x) Approximate J[y] J[y n ] = F(x, y n, y n)dx. x 0 x 1 Integrate to get J[y n ] = J n (c 1, c 2,..., c n ). J n is a known function of n variables, so we can maximize (or minimize) it as usual by J n c i = 0 for all i = 1, 2,..., n. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 24 / 25

Upper Bounds Assume the extremal of interest is a minimum, then for the extremal J[y] < J[ŷ] for all ŷ within the neighborhood of y. Assume our approximating function y n is close enough to be in that neighborhood, then J[y] J[y n ] = J n [c] so the approximation provides an upper bound on the minimum J[y]. Another way to think about it is that we optimize on a smaller set of possible functions y, so we can t get quite as good a minimum. c Daria Apushkinskaya 2014 () Calculus of variations lecture 12 26. Juni 2014 25 / 25