Introduction. Classroom Tips and Techniques: The Lagrange Multiplier Method

Similar documents
Classroom Tips and Techniques: The Lagrange Multiplier Method

Classroom Tips and Techniques: Drawing a Normal and Tangent Plane on a Surface

Classroom Tips and Techniques: Nonlinear Curve Fitting. Robert J. Lopez Emeritus Professor of Mathematics and Maple Fellow Maplesoft

Classroom Tips and Techniques: Interactive Plotting of Points on a Curve

Classroom Tips and Techniques: Stepwise Solutions in Maple - Part 2 - Linear Algebra

Integration by Parts in Maple

Visualizing Regions of Integration in 2-D Cartesian Coordinates

Classroom Tips and Techniques: Maple Meets Marden's Theorem. Robert J. Lopez Emeritus Professor of Mathematics and Maple Fellow Maplesoft

Classroom Tips and Techniques: Plotting Curves Defined Parametrically

Classroom Tips and Techniques: Solving Algebraic Equations by the Dragilev Method

Classroom Tips and Techniques: Branch Cuts for a Product of Two Square-Roots

Constrained Optimization and Lagrange Multipliers

Classroom Tips and Techniques: Least-Squares Fits. Robert J. Lopez Emeritus Professor of Mathematics and Maple Fellow Maplesoft

Mat 241 Homework Set 7 Due Professor David Schultz

A Maple Package for Solving and Displaying

Classroom Tips and Techniques: Notational Devices for ODEs

Lagrange Multipliers. Joseph Louis Lagrange was born in Turin, Italy in Beginning

In other words, we want to find the domain points that yield the maximum or minimum values (extrema) of the function.

MATH2111 Higher Several Variable Calculus Lagrange Multipliers

Maple Quick Start. Maplesoft, a division of Waterloo Maple Inc.

Activity overview. Background. Concepts. Teacher preparation and Classroom management tips. Off on a Tangent

Lagrange Multipliers and Problem Formulation

Lagrange multipliers. Contents. Introduction. From Wikipedia, the free encyclopedia

Increasing and Decreasing Functions. MATH 1003 Calculus and Linear Algebra (Lecture 20) Increasing and Decreasing Functions

Visualized Problems in the Teaching Topic "Derivative of a Function"

Lagrange Multipliers

Math 21a Homework 22 Solutions Spring, 2014

Worksheet 2.7: Critical Points, Local Extrema, and the Second Derivative Test

LECTURE 18 - OPTIMIZATION

Optimizations and Lagrange Multiplier Method

Implicit Function Explorations

Lagrange multipliers October 2013

Lagrange multipliers 14.8

Student Multivariate Calculus

MEI GeoGebra Tasks for AS Pure

HOW CAN I USE MAPLE TO HELP MY STUDENTS LEARN MULTIVARIATE CALCULUS?

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

Overview for Families

MEI Desmos Tasks for AS Pure

Maple as an Instructional Tool

Beginning of Semester To Do List Math 1314

SECTION 1.2 (e-book 2.3) Functions: Graphs & Properties

d f(g(t), h(t)) = x dt + f ( y dt = 0. Notice that we can rewrite the relationship on the left hand side of the equality using the dot product: ( f

Section 4: Extreme Values & Lagrange Multipliers.

Module 1 Lecture Notes 2. Optimization Problem and Model Formulation

Getting Students Excited About Learning Mathematics

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

II. Linear Programming

The customary introduction to hyperbolic functions mentions that the combinations and

MATH 19520/51 Class 10

Introduction to PDEs: Notation, Terminology and Key Concepts

Maple Quick Start. Introduction. Talking to Maple

1 MATH 253 LECTURE NOTES for FRIDAY SEPT. 23,1988: edited March 26, 2013.

Math 1314 Lesson 2: An Introduction to Geogebra (GGB) Course Overview

Dynamic Calculus Tools for Visualizing Calculus

MATH 19520/51 Class 8

Outcomes List for Math Multivariable Calculus (9 th edition of text) Spring

TIME 2014 Technology in Mathematics Education July 1 st -5 th 2014, Krems, Austria

User s Guide Version 4

Use Derivatives to Sketch the Graph of a Polynomial Function.

Sequence of Grade 4 Modules Aligned with the Standards

USING LINEAR FUNCTIONS TO MODEL MATH IDEAS

Core Mathematics 3 Functions

Constrained extrema of two variables functions

9-1 GCSE Maths. GCSE Mathematics has a Foundation tier (Grades 1 5) and a Higher tier (Grades 4 9).

INSTRUCTIONS FOR THE USE OF THE SUPER RULE TM

Arc Length, Curvature and The TNB Frame

Equations of planes in

UNIT 8 STUDY SHEET POLYNOMIAL FUNCTIONS

1 Thinking Proportionally

SKILL: What we want students to DO. Students will be able to: (pp. 1 61)

Absolute extrema of two variables functions

Acknowledgement: BYU-Idaho Economics Department Faculty (Principal authors: Rick Hirschi, Ryan Johnson, Allan Walburger and David Barrus)

Interesting Application. Linear Algebra

Scope and Sequence for the Maryland Voluntary State Curriculum for Mathematics

CCSSM Curriculum Analysis Project Tool 1 Interpreting Functions in Grades 9-12

Chapter 3 Numerical Methods

Pre-Calculus Notes: Chapter 3 The Nature of Graphs

5 Day 5: Maxima and minima for n variables.

USING TEMATH S VISUALIZATION TOOLS IN CALCULUS 1

Local and Global Minimum

In this first example, we build a question that asks for the derivative of sec(x) and uses Maple to grade the response.

7 Fractions. Number Sense and Numeration Measurement Geometry and Spatial Sense Patterning and Algebra Data Management and Probability

Building Concepts: Moving from Proportional Relationships to Linear Equations

Paul's Online Math Notes Calculus III (Notes) / Applications of Partial Derivatives / Lagrange Multipliers Problems][Assignment Problems]

Copyright. Anna Marie Bouboulis

Students are required to have a graphing calculator. Instructors of the course support topics using a TI-84 or TI-89.

Functions of Several Variables

1. Show that the rectangle of maximum area that has a given perimeter p is a square.

TI-92 programs in Maths lessons

Sixth Grade SOL Tracker Name:

Rational Number Operations on the Number Line

Let us start with a quick revision of algebra and how to work with variables. Now let us look at the simpler topic, namely Substitution.

This lesson gives students practice in graphing

CORE BODY OF KNOWLEDGE MATH GRADE 6

Recognizing a Function

GUIDELINES FOR COMPLETING THE ASSIGNMENT

Efofex Function Graphing

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

PURE MATHEMATICS 212 Multivariable Calculus CONTENTS. Page. 1. Assignment Summary... i 2. Introduction Timetable Assignments...

Transcription:

Classroom Tips and Techniques: The Lagrange Multiplier Method Robert J. Lopez Emeritus Professor of Mathematics and Maple Fellow Maplesoft Introduction The typical multivariate calculus course contains at least one lesson detailing constrained optimization via the Lagrange multiplier method. Once such a problem has been formulated, the hardest part in the implementation of the Lagrange multiplier method is solving the nonlinear equations that result. There is no recipe by means of which such a system of nonlinear equations can be automatically solved. Classroom lessons on the Lagrange multiplier method usually consist of a list of examples, and once each problem has been formulated, the time-sink is algebra of solving the nonlinear equations the method generates. The more examples worked, the more varied the spectrum of nonlinear systems met. Since there is no algorithm the students can be taught, it is hoped that by demonstrating the solution of enough systems that the students absorb some of the art required. Throughout, the only advice a student can be given is "do not divide by zero." Thus, every system presents its own challenges, and the only general rule that can be articulated is "during all relevant manipulations, avoid dividing by a quantity that could itself be zero." In courses where instructors are willing to consign to Maple the task of solving sets of nonlinear equations, the Lagrange multiplier method can be taught and mastered efficiently. My experience at Rose-Hulman Institute of Technology was that with five carefully chosen examples, I could explain the mechanics and theory of the Lagrange multiplier method in one fifty minute class, and give the students insight into the principal difficulties such optimization problems might present. The first example showed that constrained optima occurred at points where the graph of the constraint was tangent to a level set of the objective function. And that the Lagrange multiplier arose from the search for such points of tangency. In essence, this is all the theory needed to explain and understand the method. The second example explored the meaning of a multiplier being zero at an extremum. The third example required formulating the objective function for minimizing the distance from a point to a plane. The fourth example contained a parameter, so solving the nonlinear system required a bit more care. The fifth example contained two constraints. In this article, I will clarify what tools Maple makes available for teaching, learning, and implementing the Lagrange multiplier method at a level consistent with a first course in multivariate calculus.

Example Obtain all extrema for the objective function. subject to the constraint Solution Mathematical Solution Figure 1 contains a graph of the surface and the constraint circle (in black). The "lift" of the constraint circle onto the surface of the objective function is drawn in red. This figure suggests that there will be two local maxima and two local minima of f along the constraint circle. Figure 2 shows (in black) the level sets (curves) for the objective function f and (in red) the graph of the constraint circle. The green dots represent the four points where the circle appears to be tangent to a level curve. These points of tangency are the extrema. This can be seen by the following observations. Traverse the constraint circle in a counterclockwise direction, starting at the point. Along this path, level curves for the objective function will be crossed. Since this function increases as the level curves move outward from the origin, function values met along the constraint will increase. These values continue to increase until the point is reached, after which the values of the objective function will begin to decrease. Thus, the point of tangency is an extreme value. Figure 1 Surface, constraint Figure 2 Level sets for f (black) and g (red) The Lagrange multiplier method seeks to find points of tangency between the level sets of the objective function and the constraint. At such points of tangency, the gradients of both

functions become collinear, a condition expressed by the equation. The gradient vectors do not become equal, but merely proportional, and this constant of proportionality is often designated by. For this example, the equation expressing collinearity of the gradient vectors contains just two equations, but the coordinates of an extremum are two unknowns, and is a third unknown. The third equation that is needed is the constraint itself. Thus, the Lagrange multiplier method applied to this example requires solving three nonlinear equations in three unknowns. The slider under the graph in Figure 3 controls the gradient vectors along the constraint circle, the black vector being orthogonal to the level curves of f; the red, to g. Note that these vectors appear to be collinear at each of the four green dots, the points of tangency of the constraint circle and a level curve for the objective function. 0 60 120 180 240 300 360 = 75.000 Figure 3 Slider-controlled gradient vectors For this example, the calculations needed for the implementation of the Lagrange multiplier method consist in solving the equations or and There is no "recipe" for solving nonlinear equations, only one caution: never cancel. Equations can be factored, and the zero-principle applied, but variables should never be cancelled because such a cancellation could represent a division by zero. Thus, the first two equations can be written as and, from which it can be determined that if, then, so that ; and if, then so that. Hence, there are four extrema, namely,. Whether an extremum is a local maximum or minimum is generally determined by evaluating the objective function at each such extreme value.

and Hence, there are two local minima with value 2 and two local maxima with value 3. Maple Solution - Context Menu Initialize Tools_Load Package: Student Multivariate Calculus Loading Student:- MultivariateCalculus Apply the Lagrange multiplier option Write a sequence of the rules for the functions f and g. Context Menu: Student Multivariate Calculus_Lagrange Multipliers Complete the "Specify variables and output" dialog as per the figure on the right. Lagrange multipliers Write a sequence of the rules for the functions f and g. Context Menu: Student Multivariate Calculus_Lagrange Multipliers Select "detailed" for the Output. Lagrange multipliers The "detailed" option returns the extrema, the values of the Lagrange multiplier for each extremum, and the value of the objective function at each extremum. Assuming that the Student MultivariateCalculus package has already been installed, the LagrangeMultipliers command can be accessed directly with the syntax shown below. The output options are "value", "detailed", and "plot", with the default being "value". Maple Solution - First Principles Instead of forming and solving the equations, define, then form and solve the equations.

Define F. Context Menu: Assign Name assign Calculus palette: Partial derivative operator Press the Enter key. Context Menu: Solve_Solve solve All that remains is to evaluate f at the extrema. The astute reader will realize that the three equations so formed are the equivalent of setting the components of the "gradient" of F to zero. The essential reason for eschewing the equation is the inability to use the Nabla ( ) interactively without installing the Student VectorCalculus package. However, it is possible to access the Gradient option in the Context Menu under the aegis of the Student MultivariateCalculus package. This requires a lot more referencing and the use of Equate, as can be seen in the more tedious solution below. Write the rule for f (then repeat for g). Context Menu: Student Multivariate Calculus_Differentiate_Gradient Context Menu: Assign to a Name_gf (then gg) gradient assign to a name gradient assign to a name gf gg Form a sequence of and and press the Enter key. Context Menu: Equate Using the equation label, form a sequence of the list of equations in. Press the Enter key. Context Menu: Join Context Menu: Solve_Solve and the list

(1) equate (2) list join solve (3) (4) (5) Maple Solution - Numeric The Optimization Assistant, available from the Tools/Assistants menu, or via the command or from the Context Menu, provides a numeric solution to constrained optimization problems. Figure 4 shows the result of launching the Optimization Assistant from the Context Menu (Optimization_Optimization Assistant) applied to a sequence of objective function and constraint equation, and pressing the Solve button. Figure 5 shows one of the graphs that can be obtained by pressing the Plot button after obtaining a solution. Figure 4 Optimization Assistant Figure 5 Optimization Plotter

To obtain other extrema, modify the Initial Values, that is, the starting point for the numeric search that this tool utilizes. (Press the Edit button to the right of "Initial Values" and enter values in place of the words "default". To obtain the graph shown in Figure 6, check the "as Surfaces" box at the bottom of the Optimization Plotter. This form of the graph shows how the constraint is "lifted" to the surface representing the objective function. Figure 6 Constraint as a surface Legal Notice: Maplesoft, a division of Waterloo Maple Inc. 2017. Maplesoft and Maple are trademarks of Waterloo Maple Inc. This application may contain errors and Maplesoft is not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact Maplesoft for permission if you wish to use this application in for-profit activities.