MATH 209, Lab 5. Richard M. Slevinsky

Similar documents
MATH 209 Lab Solutions

Math 233. Lagrange Multipliers Basics

14.5 Directional Derivatives and the Gradient Vector

Math 233. Lagrange Multipliers Basics

we wish to minimize this function; to make life easier, we may minimize

(c) 0 (d) (a) 27 (b) (e) x 2 3x2

Math 113 Exam 1 Practice

3. The three points (2, 4, 1), (1, 2, 2) and (5, 2, 2) determine a plane. Which of the following points is in that plane?

Lagrange multipliers October 2013

Math 209 (Fall 2007) Calculus III. Solution #5. 1. Find the minimum and maximum values of the following functions f under the given constraints:

Lagrange multipliers 14.8

MA 243 Calculus III Fall Assignment 1. Reading assignments are found in James Stewart s Calculus (Early Transcendentals)

A small review, Second Midterm, Calculus 3, Prof. Montero 3450: , Fall 2008

Practice problems from old exams for math 233 William H. Meeks III December 21, 2009

Multivariate Calculus: Review Problems for Examination Two

REVIEW I MATH 254 Calculus IV. Exam I (Friday, April 29) will cover sections

Calculus III. Math 233 Spring In-term exam April 11th. Suggested solutions

Multivariate Calculus Review Problems for Examination Two

HOMEWORK ASSIGNMENT #4, MATH 253

Quiz 6 Practice Problems

Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves

Contents. MATH 32B-2 (18W) (L) G. Liu / (TA) A. Zhou Calculus of Several Variables. 1 Homework 1 - Solutions 3. 2 Homework 2 - Solutions 13

We can conclude that if f is differentiable in an interval containing a, then. f(x) L(x) = f(a) + f (a)(x a).

f xx (x, y) = 6 + 6x f xy (x, y) = 0 f yy (x, y) = y In general, the quantity that we re interested in is

MAT203 OVERVIEW OF CONTENTS AND SAMPLE PROBLEMS

Worksheet 3.4: Triple Integrals in Cylindrical Coordinates. Warm-Up: Cylindrical Volume Element d V

6. Find the equation of the plane that passes through the point (-1,2,1) and contains the line x = y = z.

Total. Math 2130 Practice Final (Spring 2017) (1) (2) (3) (4) (5) (6) (7) (8)

2. Give an example of a non-constant function f(x, y) such that the average value of f over is 0.

MATH. 2153, Spring 16, MWF 12:40 p.m. QUIZ 1 January 25, 2016 PRINT NAME A. Derdzinski Show all work. No calculators. The problem is worth 10 points.

Practice problems from old exams for math 233

Exam 2 Preparation Math 2080 (Spring 2011) Exam 2: Thursday, May 12.

Math 253, Section 102, Fall 2006 Practice Final Solutions

Math 213 Exam 2. Each question is followed by a space to write your answer. Please write your answer neatly in the space provided.

Math 113 Calculus III Final Exam Practice Problems Spring 2003

B.Stat / B.Math. Entrance Examination 2017

MATH 31A HOMEWORK 9 (DUE 12/6) PARTS (A) AND (B) SECTION 5.4. f(x) = x + 1 x 2 + 9, F (7) = 0

Math 241, Final Exam. 12/11/12.

1. Suppose that the equation F (x, y, z) = 0 implicitly defines each of the three variables x, y, and z as functions of the other two:

Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers

x 6 + λ 2 x 6 = for the curve y = 1 2 x3 gives f(1, 1 2 ) = λ actually has another solution besides λ = 1 2 = However, the equation λ

Curves, Tangent Planes, and Differentials ( ) Feb. 26, 2012 (Sun) Lecture 9. Partial Derivatives: Signs on Level Curves, Tangent

Parametric Surfaces and Surface Area

Winter 2012 Math 255 Section 006. Problem Set 7

Worksheet 3.5: Triple Integrals in Spherical Coordinates. Warm-Up: Spherical Coordinates (ρ, φ, θ)

Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives

18.02 Final Exam. y = 0

Section 4: Extreme Values & Lagrange Multipliers.

Solution 2. ((3)(1) (2)(1), (4 3), (4)(2) (3)(3)) = (1, 1, 1) D u (f) = (6x + 2yz, 2y + 2xz, 2xy) (0,1,1) = = 4 14

Objectives: Find a function that models a problem and apply the techniques from 4.1, 4.2, and 4.3 the find the optimal or best value.

Constrained Optimization and Lagrange Multipliers

MATH 234. Excercises on Integration in Several Variables. I. Double Integrals

HSC Mathematics - Extension 1. Workshop E2

Practice problems. 1. Given a = 3i 2j and b = 2i + j. Write c = i + j in terms of a and b.

Polar (BC Only) They are necessary to find the derivative of a polar curve in x- and y-coordinates. The derivative

Section T Similar and congruent shapes

Math 21a Tangent Lines and Planes Fall, What do we know about the gradient f? Tangent Lines to Curves in the Plane.

MATH 1020 WORKSHEET 10.1 Parametric Equations

Name: Final Exam Review. (b) Reparameterize r(t) with respect to arc length measured for the point (1, 0, 1) in the direction of increasing t.

MATH 2023 Multivariable Calculus

Differential Geometry: Circle Patterns (Part 1) [Discrete Conformal Mappinngs via Circle Patterns. Kharevych, Springborn and Schröder]

Math 213 Calculus III Practice Exam 2 Solutions Fall 2002

ID: Find all the local maxima, local minima, and saddle points of the function.

3.3 Optimizing Functions of Several Variables 3.4 Lagrange Multipliers

Chapter 8: Applications of Definite Integrals

Moore Catholic High School Math Department

while its direction is given by the right hand rule: point fingers of the right hand in a 1 a 2 a 3 b 1 b 2 b 3 A B = det i j k

Applications of Triple Integrals

Answer Key: Three-Dimensional Cross Sections

Grad operator, triple and line integrals. Notice: this material must not be used as a substitute for attending the lectures

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

27. Tangent Planes & Approximations

P1 REVISION EXERCISE: 1

Background for Surface Integration

MA 114 Worksheet #17: Average value of a function

Math Exam 2a. 1) Take the derivatives of the following. DO NOT SIMPLIFY! 2 c) y = tan(sec2 x) ) b) y= , for x 2.

Functions of Several Variables

Applications of Integration

MATH 104 Sample problems for first exam - Fall MATH 104 First Midterm Exam - Fall (d) 256 3

Section 7.6 Graphs of the Sine and Cosine Functions

f x = 2e xy +y(2x+y)e xy = (2+2xy+y 2 )e xy.

30. Constrained Optimization

Math 21a Final Exam Solutions Spring, 2009

R f da (where da denotes the differential of area dxdy (or dydx)

Name: Class: Date: 1. Use Lagrange multipliers to find the maximum and minimum values of the function subject to the given constraint.

Second Midterm Exam Math 212 Fall 2010

Daily WeBWorK, #1. This means the two planes normal vectors must be multiples of each other.

Bellman s Escape Problem for Convex Polygons

Calculus IV. Exam 2 November 13, 2003

Week 5: Geometry and Applications

Mathematics Background

1) Find. a) b) c) d) e) 2) The function g is defined by the formula. Find the slope of the tangent line at x = 1. a) b) c) e) 3) Find.

Math 2260 Exam #1 Practice Problem Solutions

MATH2111 Higher Several Variable Calculus Lagrange Multipliers

AP * Calculus Review. Area and Volume

Math 209, Fall 2009 Homework 3

Math 11 Fall 2016 Section 1 Monday, October 17, 2016

The Differential df, the Gradient f, & the Directional Derivative Dû f sec 14.4 (cont), Goals. Warm-up: Differentiability. Notes. Notes.

2.9 Linear Approximations and Differentials

Double Integrals, Iterated Integrals, Cross-sections

Transcription:

MATH 209, Lab 5 Richard M. Slevinsky Problems 1. Say the temperature T at any point (x, y, z) in space is given by T = 4 x y z 2. Find the hottest point on the sphere F = x 2 + y 2 + z 2 100 = 0; We equate gradients: T = λ F, 4 y z 2, x z 2, 2 x y z = λ 2 x, 2 y, 2 z, giving us three equations for four unknowns. Adding the constraint F = 0, we have four equations for four unknowns: 4 y z 2 = 2 λ x, 4 x z 2 = 2 λ y, 8 x y z = 2 λ z, x 2 + y 2 + z 2 = 100. Simplifying by substituting the constraint equation, we find: Again for λ: And: Or: Contact: rms8@ualberta.ca 4 y(100 x 2 y 2 ) = 2 λ x, 4 x(100 x 2 y 2 ) = 2 λ y, 8 x y = 2 λ. 4 y(100 x 2 y 2 ) = 8 x 2 y, 4 x(100 x 2 y 2 ) = 8 x y 2. 100 x 2 y 2 = 2 x 2, 100 x 2 y 2 = 2 y 2. 100 3 x 2 y 2 = 0, 100 x 2 3 y 2 = 0. 1

Therefore, the values of x and y must solve the above system. By subtraction, we find x = ±5 and y = ±5. At these values, 25 + 25 + z 2 = 100, or z 2 = 50, and z = ±5 2. The hottest point occurs when T at the highest value of T (±5, ±5, ±5 2). This occurs when the signs of the x and y values are the same. Therefore, the hottest points are located at (x, y, z) = (5, 5, ±5 2) and ( 5, 5, ±5 2). 2. Show that the product of the angles of a triangle is largest when the triangle is equilateral; We seek to: Equating gradients, we find: The four equations we have are: maximize P = θ 1 θ 2 θ 3 subject to S = θ 1 + θ 2 + θ 3 180 = 0, The top three equations can be rearranged as: P = λ S, θ 2 θ 3, θ 1 θ 3, θ 1 θ 2 = λ 1, 1, 1. θ 2 θ 3 = λ, θ 1 θ 3 = λ, θ 1 θ 2 = λ, θ 1 + θ 2 + θ 3 = 180. θ 3 (θ 2 θ 1 ) = 0, θ 1 (θ 3 θ 2 ) = 0, θ 2 (θ 3 θ 1 ) = 0, θ i > 0, i = 1, 2, 3. implying θ 1 = θ 2 = θ 3 = 60 from the angular constraint. This is the equilateral triangle. 3. Let C denote the line of intersection of the planes 3 x + 2 y + z = 6 and x 4 y + 2 z = 8. Find the point on C that is closest to the origin; The point that is closest to the origin minimizes the distance, and also the distance squared, which is simpler to work with. Equating gradients: d 2 (x, y, z) = λp 1 + µp 2, 2 x, y, z = λ 3, 2, 1 + µ 1, 4, 2, These three equations with the two planes give: 2 x 3λ µ = 0, 2 y 2λ + 4µ = 0, 2 z λ 2µ = 0, 3 x + 2 y + z = 6, x 4 y + 2 z = 8. This system of five equations and five unknowns has the solution (check) x = 116 57, y = 44 57, z = 82 λ = 20 19, µ = 52 1 57. The closest point is therefore: (x, y, z) = 57 (116, 44, 82). 57, 2

4. A container is constructed in the shape of a cylinder with a top and a bottom (e.g. a beer can). If the surface area of the container has a fixed value S, find the radius and height of the container that will maximize the enclosed volume. The volume of a cylinder is V = πr 2 h, while the surface area is S = 2πrh + 2πr 2. Therefore, we wish to: maximize V = πr 2 h subject to S = 2πrh + 2πr 2. Exercises Equating gradients, we find: These two equations are: V = λ S, π 2 r h, r 2 = 2πλ h + 2 r, r. 2π r h = 2πλ(h + 2 r), π r 2 = 2πλ r. The second equation gives r = 0 or λ = r 2. Since r = 0 won t maximize anything, inserting the second possibility into the first equation above: 2π r h = 2π r (h + 2 r), 2 2 h = h + 2 r, h = 2 r. Therefore, the height is twice the size of the radius. 1. Find the maximum value of f(x, y, z) = x + y + z on the sphere x 2 + y 2 + z 2 = 25; Equating gradients: f = λ F, 1, 1, 1 = λ 2 x, 2 y, 2 z, giving us three equations for four unknowns. Adding the constraint F = 0, we have four equations for four unknowns: 1 = 2 λ x, 1 = 2 λ y, 1 = 2 λ z, x 2 + y 2 + z 2 = 25. Simplifying by substituting into the constraint equation, we find: ( ) 1 2 ( ) 1 2 ( ) 1 2 + + = 25, 2 λ 2 λ 2 λ 3 4 = 25λ2, 3

or λ = ± 3/10. Choosing only the positive branch for the position (otherwise we actually find the minimum value of f), we find x = y = z = 5/ 3. Therefore, the maximum value of f on the sphere is f(5/ 3, 5/ 3, 5/ 3) = 5 3. 2. Let C be the curve of intersection of the surface y 2 z 2 = 1 and the plane x y = 1. Find the minimum value of f(x, y, z) = x 2 + y 2 + z 2 on C; Letting g 1 (x, y, z) = y 2 z 2 1 = 0 and g 2 (x, y, z) = x y 1 = 0, we equate gradients: f = λ g 1 + µ g 2, 2 x, 2 y, 2 z = λ 0, 2 y, 2 z + µ 1, 1, 0. These three equations with the two surfaces gives five equations for five unknowns: 2 x µ = 0, 2 y λ2 y + µ = 0, 2 z + λ2 z = 0, y 2 z 2 = 1, x y = 1. From the last and first equations x = 1 + y and therefore µ = 2(1 + y). Inserting this into the second equation and simplifying: 4 y λ2 y = 2, z + λz = 0, y 2 z 2 = 1. Therefore, from this middle equation, either z = 0 or λ = 1. If z = 0, then y = ±1 from the bottom equation and x = 1 ± 1 = 2, 0 from above. Therefore, f(x, y, z) = 0 2 + (±1) 2 + (1 ± 1) 2 = 3 ± 2. If λ = 1, then y = 1/3. However, if 1 < y < 1, then from the bottom equation z C and therefore the point is not on both curves. The minimum value is f(0, 1, 0) = 1. 3. What is the volume of the largest rectangular box (with edges parallel to the axes) which can be inscribed in the ellipsoid x2 36 + y2 9 + z2 16 = 1? Since x, y, and z are the coordinate lengths, the volumes of the rectangular boxes with edges parallel to the axes is V = 2 x2 y2 z = 8 x y z. Therefore, equating gradients: With the ellipsoidal constraint: V = λ E, x 8 y z, x z, x y = λ 18, 2 y 9, z. 8 8 y z λx 18 = 0, 8 x z 2λy 9 = 0, 8 x y λz 8 = 0, x 2 36 + y2 9 + z2 16 = 1. 4

From the first equation λ = 144 y z x. Therefore: Simplifying the top two equations: 8 x z 288 y2 z = 0, 9 x 144 y z2 8 x y = 0, 8 x x 2 36 + y2 9 + z2 16 = 1. x 2 4 y 2 = 0, 4 x 2 9 z 2 = 0, x 2 36 + y2 9 + z2 16 = 1. Solving the top two equations for y 2 and z 2 and inserting in the ellipsoidal equation, we have: y 2 = x2 4, z 2 = 4 x2 9, x 2 36 + x2 36 + x2 36 = 1. Therefore, x 2 = 12, or x = ±2 3, y = ± 3, and z = ±4/ 3. Taking only the positive points, the largest box has the volume V (2 3, 3, 4/ 3) = 64 3. 4. Find the point on the plane z = 4 x + 9 y which is closest to the point (1, 1, 2). We seek to minimize the distance (squared) from the point to the plane: minimize d 2 P = (x 1) 2 + (y 1) 2 + (z 2) 2 subject to S = 4 x + 9 y z = 0. Equating gradients, we find: With the planar constraint: d 2 P = λ S, 2 x 1, y 1, z 2 = λ 4, 9, 1. 2(x 1) 4λ = 0, 2(y 1) 9λ = 0, 2(z 1) + λ = 0, 4 x + 9 y z = 0. This system of four equations and four unknowns has the solution (check) x = 50 49, y = 5 49, z = 55 and λ = 12 49. 49, 5

This week, we will find the global minimum of the function: f (x, y) = esin(50 x) + sin(60 ey ) + sin(70 sin(x)) + sin(sin(80 y)) sin(10(x + y)) + x2 + y 2. 4 This is problem 4 in The SIAM 100-Digit Challenge [1]. For x and y large, f (x, y) is dominated by the 2 2 paraboloid x +y 4, since the values of the other terms lie in the intervals [1/e, e], [ 1, 1], [ 1, 1], [ sin 1, sin 1], and [ 1, 1], respectively. Therefore, we know the minimum will be reasonably near the origin. However, what is reasonable? We can break the problem down into three steps: 1. Find a bounded region that contains the minimum; 2. Identify the rough location of the lowest point in that region; 3. Zoom in closer to pinpoint the minimum to high precision. Part I We evaluate the function on the 2601 values of x and y from 0.25 to 0.25 in steps of 0.01. The function can be as small as 3.24. Outside the circle of radius 1, the function is at least e 1 1 1 sin 1 1 + 14 > 3.23. Therefore, the minimum must be inside the circle of radius 1. Part II Many animals and insects interact with eachother, whether this may be for the purposes of protection from predators, or for cooperation in hunting, finding shelter, or otherwise [2]. Bees, ants, birds, and fish have been studied in particular because they are all relatively easy to study. For example, bee hives host around 5,000-10,000 bees, which is few enough to be individually counted and monitored. Insects can communicate with one another by releasing pheromones into the environment. These pheromones can indicate the source and quality of food, or a threat. PSO seeks to use simple algorithmic rules from the insect interactions, apply them to agents with random motion, and hope to derive meaningful global information of the problem the agents are trying to solve. For bees and ants that are harvesting food, they may look like [2]: 1. Wander to find food; 6

2. When I find food, harvest it and lay a trail of pheromones back to hive/hill; 3. If I find a trail, follow it, harvest food, and reinforce the shortest trail with pheromones to hive/hill. Bees and ants have become the prototype species for PSO and Ant-Colony Optimization (ACO). While they are similar, the ACO is very similar to the simple rules above, while the PSO takes advantage of the ability of bees to fly. This results in the Particle Swarm Optimization algorithm [3]: 1. Initialization of agents i = 1,..., N, with random positions x i and speeds v i ; Loop over all agents 2. Evaluate the function f( x i ); 3. Compare the value of the function f( x i ) with the best value of the agent. Let this be the vector p. If the current value is the best, replace it; 4. Identify the agent with the best value p. Let this be the vector g representing the entire swarm s best value; 5. Update the agents positions and velocities as: v i ω v i + φ p U(0, 1) ( p i x i ) + φ g U(0, 1) ( p g x i ), x i x i + v i. (1) 6. Terminate when the optimal value (to an error tolerance) is obtained. End loop In (1), 0 < ω < 1 is an inertial term, 2 < φ p < 2, 2 < φ g < 2, denotes component-wise multiplication, and U(0, 1) denotes a uniformly distributed random variable on the interval [0, 1]. Part III To get really high precision result, we need something that converges very quickly. Remember the Newton- Raphson method? Suppose we want to find the solution to: Using the linear approximation to f (x i ), we have: Setting the linear approximation to 0, we solve: min f(x) = f (x) = 0. (2) L(x) = f (x i ) + (x x i )f (x i ). (3) 0 = f (x i ) + (x i+1 x i )f (x i ), (4) for x i+1 as: Suppose, now we have two variables: x i+1 = x i f (x i ) f (x i ). (5) min f(x, y) = f(x, y) = 0. (6) 7

But setting the gradient to 0 is actually a system of two equations: f x (x, y) = 0, (7) f y (x, y) = 0, (8) with two unknowns x and y. Fortunately, we can form the tangent plane approximation (the generalization of the linear approximation) to both equations: T fx (x, y) = f x (x i, y i ) + (x x i )f xx (x i, y i ) + (y y i )f xy (x i, y i ), (9) T fy (x, y) = f y (x i, y i ) + (x x i )f xy (x i, y i ) + (y y i )f yy (x i, y i ), (10) Setting both equations simultaneously to 0 at the new iterate (x i+1, y i+1 ), we have: [ ] [ ] [ ] f xx (x i, y i ) f xy (x i, y i ) x i+1 x i f x (x i, y i ) =. (11) f xy (x i, y i ) f yy (x i, y i ) y i+1 y i f y (x i, y i ) This is a familiar system of two equations for two unknowns. We can solve this! [ x i+1 y i+1 ] = [ x i y i ] [ f xx (x i, y i ) f xy (x i, y i ) f xy (x i, y i ) f yy (x i, y i ) ] 1 [ f x (x i, y i ) f y (x i, y i ) ]. (12) References [1] F. Bornemann et al. Think Globally, Act Locally in The SIAM 100-Digit Challenge, SIAM, 4:77 100, 2004. [2] M. Beekman et al. Biological Foundations of Swarm Intelligence in Swarm Intelligence, Springer-Verlag, 1:3 41, 2008. [3] J. Kennedy and R.C. Eberhart Particle swarm optimization, Proceedings of the IEEE international conference on neural networks IV, 1942 1948, 1995. 8