Chapter 4: Partial Differentiation
Section 4.10: Optimization on Closed Domains
Find the extreme values of the function fx,y=x y+1/2 on the domain R consisting of the interior and boundary of the triangle whose sides are the x- and y-axes, and the line x+y=1.
Figure 4.10.1(a) shows that part of the surface defined by f for which the support is the domain R.
The unconstrained extrema, obtained by solving the equations fx=fy=0, is f0,0=1/2.
Taking the constraints one at a time requires solving three constrained optimization problems, with each side of the triangle being the constraint in each of the three problems.
Figure 4.10.1(b), a graph of f0,y=1/2, confirms that along the y-axis the function f is constant.
Figure 4.10.1(c), a graph of fx,0=1/2, confirms that along the x-axis the function f is also constant.
Figure 4.10.1(d), a graph of fx,1−x=x−x2+1/2, suggests that there is a maximum along this edge. In fact, elementary calculus finds this maximum to be f1/2,1/2=3/4.
Taking the constraints two at a time requires finding the values of f at the intersection of the edges of the triangle, that is, at the vertices. These values are all 1/2, so the absolute maximum for this constrained optimization problem is f1/2.1/2=3/4.
use plots in
p1:=plot3d(f,x=0..1,y=0..1-x, style = patchcontour, contours=20):
Figure 4.10.1(a) The surface over the triangle R
plot(1/2, y = 0 .. 1, labels = [y, f], tickmarks = [2, [.25, .5, .75]], view = [0 .. 1, 0 .. .75]);
Figure 4.10.1(b) Along x=0
plot(1/2, x = 0 .. 1, labels = [x, f], tickmarks = [2, [0, .25, .5, .75]]);
Figure 4.10.1(c) Along y=0
plot(x*(1-x)+1/2, x = 0 .. 1, labels = [x, f], tickmarks = [3, [0, .5, .75]], view = [0 .. 1, 0 .. .75]);
Figure 4.10.1(d) Along x+y=1
Each of the three constrained optimization problems obtained when applying the constraints one at a time is a candidate for the Lagrange multiplier method. However, in this example, the simplicity of the three optimization problems that result does not warrant the more elaborate machinery of the Lagrange multiplier approach.
Maple Solution - Interactive
Context Panel: Assign Function
fx,y=x y+1/2→assign as functionf
Solve the unconstrained problem
Calculus palette: Partial-derivative operator
Context Panel: Solve≻Solve
∂∂ x fx,y=0,∂∂ y fx,y=0
Context Panel: Evaluate and Display Inline
f0,0 = 12
Apply the constraints one at a time
Along x=0 (the y-axis)
f0,y = 12
Along y=0 (the x-axis)
fx,0 = 12
Along x+y=1: Press the Enter key.
Context Panel: Differentiate≻With Respect To≻x
→differentiate w.r.t. x
f1/2,1−1/2 = 34
Take the constraints two at a time, that is, evaluate f at the vertices of the triangle
f0,1 = 12
f1,0 = 12
Maple Solution - Coded
Define the objective function f.
Solve the unconstrained optimization problem
Apply the diff command to form the equations fx=fy=0, and the solve command to obtain their solution.
Evaluate f at the critical point.
Along x=0 (the y-axis).
Along y=0 (the x-axis).
Apply the diff and solve commands to obtain the critical number along this edge.
solvedifffx,1− x,x = 12
Apply the constraints two at a time
<< Chapter Overview Section 4.10
Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2023. 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
Download Help Document