Chapter 4: Partial Differentiation
Section 4.9: Constrained Optimization
|
Example 4.9.5
|
|
Find the minimum distance from the point to the plane .
|
|
|
|
Solution
|
|
|
Mathematical Solution
|
|
•
|
The objective function should be
|
but taking the objective function as the square of this leads to much simpler algebra.
•
|
In Figure 4.9.5(a), the sphere of radius , the level surface , is tangent to the constraint plane , drawn in red.
|
|
>
|
use plots,plottools in
module()
local p1,p2,p3;
p1:=sphere([1,-3,2],sqrt(243/26));
p2:=plot3d(-(5/2)*x+(7/2)*y+3/2,x=-2..2,y=-2..2,color=red);
p3:=display(p1,p2,scaling=constrained,labels=[x,y,z],axes=frame,orientation=[15,75,0],tickmarks=[4,5,5],view=-1..5);
print(p3);
end module:
end use:
|
|
Figure 4.9.5(a) Level surface of and
|
|
|
|
|
|
•
|
To implement the Lagrange multiplier technique, solve , and the constraint , for the four unknowns .
|
•
|
The resulting equations are
|
with solution P: when , so that .
•
|
The minimum distance from to the plane is therefore .
|
|
|
Maple Solution - Interactive
|
|
Initialize
|
•
|
Tools≻Load Package:
Student Multivariate Calculus
|
|
Loading Student:-MultivariateCalculus
|
•
|
Context Panel: Assign Name
|
|
|
•
|
Context Panel: Assign Name
|
|
|
•
|
Apply the LagrangeMultipliers command in the Student MultivariateCalculus package, captured in the
task template. See Table 4.9.3(a).
|
|
|
|
Tools≻Tasks≻Browse:
Calculus - Multivariate≻Optimization≻Lagrange Multiplier Method
|
Method of Lagrange Multipliers
|
Enter objective function
|
|
Enter constraints entered as functions
|
|
Enter coordinate variables, separated by commas:
|
|
|
|
|
|
|
Table 4.9.3(a) The Lagrange Multiplier Method task template
|
|
|
Implement the Lagrange multiplier method via first principles
|
•
|
Context Panel: Assign Name
|
|
|
•
|
Write and press the Enter key.
|
•
|
Context Panel: Student Multivariate Calculus≻Differentiate≻Gradient
|
•
|
Context Panel: Conversions≻To List
|
•
|
Context Panel: Solve≻Solve
|
|
|
|
|
Optimization Assistant
The Optimization Assistant is no longer listed in Tools≻Assistants. It is now found in Tools≻Tutors≻Optimization
|
•
|
A numeric solution is available via the
, launched from the Context Panel on the sequence .
|
•
|
Figure 4.9.5(b) shows the Optimization Assistant finding the minimum of at
|
|
|
Figure 4.9.5(b) Constrained maximum
|
|
|
|
|
|
Solution via the Lines & Planes tools in the Student MultivariateCalculus package
|
•
|
Context Panel: Student Multivariate Calculus≻Lines & Planes≻Plane
|
•
|
Context Panel: Assign to a Name≻L
|
|
|
•
|
Write a sequence of the point and , the name of the plane.
|
•
|
Context Panel: Evaluate and Display Inline
|
•
|
Context Panel: Student Multivariate Calculus≻Lines & Planes≻Distance
|
|
=
|
|
|
|
|
Maple Solution - Coded
|
|
Initialize
|
•
|
Install the Student MultivariateCalculus package.
|
|
|
•
|
Define , the objective function.
|
|
|
•
|
Define , the constraint function.
|
|
|
Implement the Lagrange multiplier method
|
|
|
|
|
Implement the Lagrange multiplier method from first principles
|
|
|
•
|
Use the Gradient command to obtain .
|
•
|
Use the Equate command to equate each component of to zero.
|
•
|
Use the solve command to obtain the solutions of the equations in .
|
|
|
|
|
Solution via the Lines & Planes tools in the Student MultivariateCalculus package
|
•
|
Define the plane with the Plane command and obtain the distance with the Distance command.
|
|
=
|
|
|
|
|
|
<< Previous Example Section 4.9
Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
|