0
$\begingroup$

This is a problem from a Russian school math olympiad:

Minimize[(5 x^2 + 8 x*y + 5 y^2 - 14 x - 10 y + 
30)/(4 - x^2 - 10 x*y - 25 y^2)^(7/2), {x, y}]

The above code is running on my comp as well as on MathematicaOnline without any response for hours. Also

NMinimize[(5 x^2 + 8 x*y + 5 y^2 - 14 x - 10 y + 
30)/(4 - x^2 - 10 x*y - 25 y^2)^(7/2), {x, y}]

NMinimize::nrnum: The function value 0. +0.00126832 I is not a real number at {x,y} = {0.918621,0.716689}.

and

Plot3D[(5 x^2 + 8 x*y + 5 y^2 - 14 x - 10 y + 
30)/(4 - x^2 - 10 x*y - 25 y^2)^(7/2), {x, -3, 3}, {y, -2, 2},PlotPoints->50 ]

do not help.

$\endgroup$
7
  • $\begingroup$ Did you try analytical approach? $\endgroup$
    – Rom38
    Mar 30, 2019 at 9:41
  • $\begingroup$ As @Rom38 mentioned: Solve[Thread[Numerator[Together[D[(5 x^2 + 8 x*y + 5 y^2 - 14 x - 10 y + 30)/(4 - x^2 - 10 x*y - 25 y^2)^(7/2), {{x, y}}]]] == 0], {x, y}, Reals]. Then, check the solution with PositiveDefiniteMatrixQ[D[(5 x^2 + 8 x*y + 5 y^2 - 14 x - 10 y + 30)/(4 - x^2 - 10 x*y - 25 y^2)^(7/2), {{x, y}, 2}] /. First[%]]. $\endgroup$ Mar 30, 2019 at 9:42
  • $\begingroup$ @J.M., yes, my point is that global minimum corresponds to minimum of numerator and maximum of denominator. Drawing them separately, one can see that denominator is a linear fold and numerator is a smooth decreasing slope.. $\endgroup$
    – Rom38
    Mar 30, 2019 at 9:50
  • $\begingroup$ @J.M.: Thank you for your suggestions. However, on that way only a local minimum $x=5/3,y=-1/3$ is found. It's unclear whether one is a global minimum. $\endgroup$
    – user64494
    Mar 30, 2019 at 9:52
  • 1
    $\begingroup$ Okay, I now see that a very good response was deleted by its author. This seems to have happened in the wake of a derogatory comment. What exactly do you expect to attain here? Some new type of MSE badge for insults? Good grief. $\endgroup$ Mar 30, 2019 at 20:56

2 Answers 2

4
$\begingroup$

The graphical solution is simple:

Plot3D[{
(5 x^2 + 8 x*y + 5 y^2 - 14 x - 10 y + 30),
(4 - x^2 - 10 x*y - 25 y^2)^(7/2)}, 
{x, -7, 7}, {y, -5, 5}, 
 ImageSize -> 500, PlotPoints -> 50, PlotRange->All]

enter image description here

The global minimum lies on the top of blue fold and, therefore, you need find the equation of maximum of denominator as y(x) just solving the equation for its total derivative. Further, you need find the minimum of the numerator along the earlier obtained direction.

The top of the denominator surface is:

ss = Solve[D[(4-x^2-10*x*y-25*y^2)^(7/2), x]+D[(4-x^2-10*x*y-25*y^2)^(7/2), y]==0, {y}, Reals]

It gives {{y -> 1/5 (-2 - x)}, {y -> (2 - x)/5}, {y -> -(x/5)}} and only last of them corresponds to top of the fold. Next, let's find the minimum of numerator on the top of fold:

Solve[#==0,x]&@D[(5*x^2+8*x*y+5*y^2-14*x-10*y+30)/.ss[[-1]], x]

{{x -> 5/3}}

Taking in account the y=-x/5, the global minimum is:

(5*x^2+8*x*y+5*y^2-14*x-10*y+30)/(4-x^2-10*x*y-25*y^2)^(7/2)/.{y-> -(x/5)}/.{x->5/3}

5/32 at {5/3,-1/3}

$\endgroup$
8
  • $\begingroup$ Thank you. I find it rather a plausible argument than a solution of the problem under consideration. One of the ungrounded places is "The global minimum lays on the top of blue fold". $\endgroup$
    – user64494
    Mar 30, 2019 at 11:09
  • $\begingroup$ Minimal value of the fraction appears when you have minimum of numerator and maximum of denominator simultaneously. The fold is horizontal (4-(x+5y)^2)^7/2 and it clearly has a maximum on the top. $\endgroup$
    – Rom38
    Mar 30, 2019 at 11:16
  • $\begingroup$ "Minimal value of the fraction appears when you have minimum of numerator and maximum of denominator simultaneously" . Yes, but Minimize[5 x^2 + 8 xy + 5 y^2 - 14 x - 10 y + 30, {x, y}] performs {20,{x->5/3,y->-(1/3)}} and Maximize[4 - x^2 - 10 xy - 25 y^2, {x, y}] produces {4, {x -> 0, y -> 0}}. $\endgroup$
    – user64494
    Mar 30, 2019 at 11:27
  • 3
    $\begingroup$ I upvoted because it is a reasonably clever, if somewhat hand-waving, approach. Next question. $\endgroup$ Mar 30, 2019 at 20:51
  • 3
    $\begingroup$ I'm pretty much done reading any comments of yours. My advice, unsolicited though it might be, is that the comments go away. $\endgroup$ Mar 30, 2019 at 20:57
-3
$\begingroup$

My numerical solution is as follows.

NMinimize[{(  30 - 14 x + 5 x^2 - 10 y + 8 x y +  5 y^2)/(4 - x^2 - 10 x y - 25 y^2)^(7/2), 
 x^2 + 10 x y + 25 y^2 < 4},{x, y}, Method -> "RandomSearch",  WorkingPrecision -> 15]

{0.156250000000000,{x->1.66666666666667,y->-0.333333333333333}}

Addition. My exact solution is as follows.

Minimize[{(5 x^2 + 8 x*y + 5 y^2 - 14 x - 10 y + 
  30)/(4 - x^2 - 10 x*y - 25 y^2)^(7/2), 4-x^2-10 x*y- 25 y^2 >= 0} /. x -> t - 5 y, {t, y}]

{5/32, {t -> 0, y -> -(1/3)}}

PS. Even the following works.

Minimize[(5 x^2 + 8 x*y + 5 y^2 - 14 x - 10 y + 
 30)/(4 - x^2 - 10 x*y - 25 y^2)^(7/2) /. x -> t - 5 y, {t, y}]
$\endgroup$
10
  • $\begingroup$ Method -> "RandomSearch" would be, well, "built on sand" unless you can be sure the random sampling has sufficiently covered a wide enough portion of the function's domain. As for your first: what happened to the 7/2 exponent? You are getting 5 because that is the result of evaluating your "new" function at those values of x and y. $\endgroup$ Mar 30, 2019 at 16:24
  • $\begingroup$ @J. M. is slightly pensive: Do you know an option of NMinimize to this end? The DirectSearch of Maple produces the same numerical result. $\endgroup$
    – user64494
    Mar 30, 2019 at 16:28
  • $\begingroup$ There is never an assurance that NMinimize[] will return a global optimum except in the linear case (points 9 and 10 under "Details and Options" in the documentation). (Same goes for Maple's method.) Recall that the general procedure of such methods is to take multiple samples and take the "best" result out of all those samples, so there is still a nonzero chance of missing extrema. $\endgroup$ Mar 30, 2019 at 16:32
  • $\begingroup$ @J. M. is slightly pensive: When two different CASes, making use of different methods, produce the same result, then its reliability increases, is not so? $\endgroup$
    – user64494
    Mar 30, 2019 at 16:43
  • $\begingroup$ I do not see that being any more rigorous than e.g. rmw's answer, but I suppose opinions differ. $\endgroup$ Mar 30, 2019 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.