(b) Solve the problem in part (a) with the aid of Lagrange multipliers. Use your CAS to solve the equations numerically. Compare your answers with those in part (a).
Solution: (a) Here is the geometry of the problem. The graph of the function is in green and its constraint in blue.
The maximum is roughly 325, and the minimum 0.
(b)Here is how the problem is solved with Maple. Start by defining the equations that arise using Lagrange's method. We are using the symbol t for lambda.
eqns:= {(x-3)^2+(y-3)^2=9, 3*y+3*x^2=2*t*(x-3),3*x+3*y^2=2*t*(y-3)}:
Apply the Maple command solve:
solve(eqns);
We get two sets of solutions, one of which is displayed below. (The second set of solutions is purely imaginary, so it is not applicable to this problem.)
{y = 3*RootOf(2*_Z^2-4*_Z+1), t = 33/2*RootOf(2*_Z^2-4*_Z+1)-6,
x = 3*RootOf(2*_Z^2-4*_Z+1),....},
Looking at the solutions, we see that x and yhave the same values. We use allvalues to obtain the numerical values of x and y.
allvalues(3*RootOf(2*_Z^2-4*_Z+1));
Thus the maximum is 347.33 and the minimum is 3.67.
by: nl