Find maximum of function with 3 variables

19 views (last 30 days)
ly
ly on 16 Aug 2021
Commented: Walter Roberson on 18 Aug 2021
How to find maximum of function with 3 variables?
-1<= x1 x2 x3 <=1
function =78.4802 + 5.9976*x1 - 1.94506*x2- 1.7211*x3 - 6.89185*x1^2 - 1.9625*x1*x3 - 5.97065*x2^2 - 1.5375*x2*x3 - 7.51189*x3^2;
  2 Comments
John D'Errico
John D'Errico on 16 Aug 2021
Edited: John D'Errico on 16 Aug 2021
That is literally impossible to say, since you do not show only 3 variables. I see:
x1, x2, x3, x12, x1*x3, x22, x2*x3, x32
So there are some products of variables. Then there are others that you may want to be interpreted as such, but you have named them with two numbers. Should we be able to read your mind here? Hey, maybe x32 was intended to represent the square of x3, thus x3^2. The crystal ball is so fuzzy today.
Anyway, if you think that x32 should really be seen as x3*x2, then exactly how is that different from x2*x3? I'm pretty sure that multiplication is a commutative operator, ok, as long as x2 and x3 are real numbers. Admittedly, it has been many years since I worried about that, so the new math may have changed since then. Is Pi now 3? ;-)
ly
ly on 17 Aug 2021
I editted x12, x22, and x32 to x1^2, x2^2 and x3^2.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 16 Aug 2021
  4 Comments
ly
ly on 18 Aug 2021
is to find the inflection points.
But I want to find maximum of a function:
-1<= x1 x2 x3 <=1
function =78.4802 + 5.9976*x1 - 1.94506*x2- 1.7211*x3 - 6.89185*x1^2 - 1.9625*x1*x3 - 5.97065*x2^2 - 1.5375*x2*x3 - 7.51189*x3^2;
max(function)=??? x1 x2 x3=???
Walter Roberson
Walter Roberson on 18 Aug 2021
The maximum of a continuous function over the infinite domain occurs has a positive slope on the left (increasing towards the maximum) and a negative slope towards the right (decreasing away from the maximum). It follows that the maximum on an infinite domain must be at a location where the slope is 0. The discussion I pointed to shows finding the points with slope 0. You can then assess each to determine whether it is a maximum or minimum or saddle point.
Over a finite domain, the maximum must be either at an inflection point or at a boundary.
So... catalog the inflection points and the boundary points and evaluate the function at end of the locations and whichever one is the largest is the maximum over the finite domain.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!