25 Reputation

4 Badges

6 years, 2 days

MaplePrimes Activity

These are replies submitted by magiblot

@Carl Love I have a question. You stated:

If the original problem were specifed in a 3D region, you'd need to check the interior of the region for critical points, then check each 2D surface that forms the boundaries, then each 1D curve that forms the boundaries of those, then finally the 0D corner points.

The Lagrange Multipliers method allows solving for multiple constraints. This is a quote from Wikipedia:

 In the case of multiple constraints, the method of Lagrange seeks points not at which the gradient of is multiple of any single constraint's gradient necessarily, but in which it is a linear combination of all the constraints' gradients. 

If my objective function is defined over a 2D domain, is there any point on applying the Lagrange Multipliers method for each pair of constraints instead of just saying the corner points are also candidates and finding them directly?

@tomleslie I won't be able to run DirectSearch instructions if the packet isn't installed in the computers at college.

In addition, both me and vv have written codes that provide symbolic solutions.

@vv What would be the difference between using extrema and LagrangeMultipliers?

@Kitonum Oh, I see. How does the computation of Maximize and Minimize change when using the initialpoint parameter?

Would any point of the same quadrant, located between the origin and the absolute extreme work?

@Kitonum How do you figure out the initialpoint values from the plot?

@Carl Love Yes, I do now. Thanks.

@Carl Love Thanks, Carl! But I don't understand what you mean by stepping down the dimension.

@tomleslie There is another exercise where Optimization doesn't work well.

For  defined in the range  the candidate points are , the maximum is  (f = 66) and the minimum is (f = -245), but Maple suggests (4273/2650, 177/212) (f = 15.28) as maximum and (-1, 11/2) (f = -77) as minimum.

This is the plot with level curves:

It can be seen that the points that Maple suggests are the ones on the boundary which are in yellow.

I think I didn't make any mistakes when copying to Maple!

Optimization[Maximize](4*x*y-2*y^2+4*x+y+4,{y >= -(1/13)*x-85/13, y <= -(25/14)*x+26/7, y <= (23/12)*x+89/12})

Optimization[Maximize](4*x*y-2*y^2+4*x+y+4,{y >= -(1/13)*x-85/13, y <= -(25/14)*x+26/7, y <= (23/12)*x+89/12})

Optimization[Minimize](4*x*y-2*y^2+4*x+y+4,{y >= -(1/13)*x-85/13, y <= -(25/14)*x+26/7, y <= (23/12)*x+89/12})

Optimization[Minimize](4*x*y-2*y^2+4*x+y+4,{y >= -(1/13)*x-85/13, y <= -(25/14)*x+26/7, y <= (23/12)*x+89/12})

@tomleslie I might be wrong, but since turning the inequalities into equalities makes them become the equations of the lines, I guessed they could then be used as constraint equations for LagrangeMultipliers.

Using the optimization package, however, is much simpler and enough to answer my questions.

I'm still wondering, though, if it's possible to obtain a list of all candidate points.

For instance, in the example they are:

In the picture above, the blue level curve contains the minimum and the red level curve the maximum.

Page 1 of 1