Chapter 4: Partial Differentiation
Section 4.10: Optimization on Closed Domains
|
Example 4.10.6
|
|
Find the extreme values of the function on the domain consisting of the interior and boundary of the ellipse whose equation is .
|
|
|
|
Solution
|
|
|
Mathematical Solution
|
|
•
|
The unconstrained extrema are found by solving the equations . Thus, the equations
|
are solved for = , which is outside .
•
|
A search along the constraint can be implemented by the Lagrange multiplier technique. The equations that result from defining are
|
|
|
|
|
|
•
|
There are four exceedingly cumbersome exact solutions of these equations, so it is imperative that they be solved numerically for the following triples .
|
|
|
|
|
|
|
•
|
The first point is a relative minimum; the second, is the absolute minimum; the third, is a relative maximum; and the fourth, is the absolute maximum.
|
•
|
Figure 4.10.6(a) shows that portion of the surface that is defined on , the interior and the boundary of the ellipse .
|
•
|
The domain appears beneath the surface , and the four extrema on the lift of the ellipse to the surface are drawn as red dots on that bounding space curve.
|
|
>
|
use plots in
module()
local P1,P2,P3,P4,P5,p1,p2,p3,p4,f,g,b1,b2;
f:=3*x^2+3*x*y+2*y^2+5*x-4*y;
g:=2*x^2-4*x*y+3*y^2+4*x-5*y-1;
b1:=(2/3)*x+5/6+(1/6)*sqrt(-8*x^2-8*x+37);
b2:=(2/3)*x+5/6-(1/6)*sqrt(-8*x^2-8*x+37);
p1:=[-0.6694753468e-1, -.2319153335, .7605175013];
p2:=[-1.056335968, 1.136359769, -7.498087925];
p3:=[-2.609293059, -1.213832530, 24.68260883];
p4:=[1.679706471, 2.119055768, 28.04552051];
P1:=intersectplot(z=f,g=0,x=-3..2,y=-2..3,z=-8..30,grid=[10,10,10],color=black,thickness=3):
P2:=pointplot3d([p1,p2,p3,p4],symbol=solidsphere,symbolsize=25,color=red):
P3:=plot3d(f,x=-3..2,y=b2..b1,style=surfacecontour,lightmodel=none);
P4:=plot3d(-10,x=-2.8..1.8,y=b2..b1,lightmodel=none);
P5:=display(P1,P2,P3,P4,orientation=[125,60,0],axes=frame,tickmarks=[7,7,5],view=-10..30);
print(P5);
end module:
end use:
|
|
Figure 4.10.6(a) , , and the four extrema
|
|
|
|
|
|
|
|
Maple Solution - Interactive
|
|
Initialize
|
•
|
Context Panel: Assign Name
|
|
|
•
|
Context Panel: Assign Name
|
|
|
Obtain any unconstrained extrema
|
•
|
Calculus palette: Partial-differentiation operator
Press the Enter key.
|
•
|
Context Panel: Solve≻Solve
(The point is outside .)
|
|
|
Apply the Lagrange multiplier method via the
task template
|
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:
|
|
|
|
|
|
|
|
|
|
The Lagrange multiplier method from first principles
|
•
|
Context Panel: Assign Name
|
|
|
•
|
Calculus palette: Partial-differentiation operator
Press the Enter key.
|
•
|
Context Panel: Assign to a Name≻
|
|
|
•
|
Type the name and press the Enter key.
|
•
|
Context Panel: Solve≻Numerically Solve from point
Take in succession as , , , , for example.
|
•
|
Context Panel: Assign to a Name≻s[k],
|
|
|
|
|
|
Display the four solutions in the form
|
•
|
Expression palette: Evaluation template
Context Panel: Evaluate and Display inline
|
|
=
|
=
|
=
|
=
|
Numeric solution via the
The Optimization Assistant is no longer listed in Tools≻Assistants. It is now found in Tools≻Tutors≻Optimization
|
•
|
Type and press the Enter key.
Context Panel:
Optimization≻Optimization Assistant
|
•
|
Add the constraint shown in Figure 4.10.6(c).
|
•
|
Figure 4.10.6(c) shows the Optimization Assistant finding the global minimum.
|
•
|
Figure 4.10.6(d) shows the Optimization Assistant finding the global maximum.
|
•
|
Figure 4.10.6(b) shows the surface with the lift of the ellipse superimposed.
|
|
|
Figure 4.10.6(b) Surface and constraint
|
|
|
|
|
Figure 4.10.6(c) Finding the minimum
|
|
|
|
|
Figure 4.10.6(d) Finding the maximum
|
|
|
|
|
|
|
|
Maple Solution - Coded
|
|
Initialize
|
•
|
Install the Student MultivariateCalculus package.
|
|
|
•
|
Define the objective function .
|
|
|
•
|
Define the constraint function .
|
|
|
Obtain any unconstrained extrema
|
•
|
Use the diff command to obtain the equations , and the solve command to obtain their solution.
|
•
|
The point is outside .
|
|
|
Use the Lagrange multiplier method to search along the constraint ellipse
|
•
|
Apply the LagrangeMultipliers command to obtain the extrema along the ellipse.
Because contains a floating-point coefficient, the computations are strictly numeric.
|
•
|
Use print tilde to display the solutions one beneath the other.
|
|
|
Implement the Lagrange multiplier method from first principles
|
|
|
•
|
Use the diff command to obtain the equations .
|
|
|
•
|
Use the fsolve command to obtain numeric solutions of the equations .
|
|
|
Use a do-loop containing the eval command to evaluate , and at the four solutions just obtained.
|
|
•
|
Obtain the extrema numerically with the Maximize and Minimize commands in the Optimization package.
|
|
|
|
|
|
|
|
|
<< Previous Example Section 4.10
Next Section >>
© 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
|