0
$\begingroup$

I want to find minimum value of the expression $$P = 13 x^2 + 12 y^2 + 22 z^2$$ such that $x y + y z + z x = 1$. I tried

Minimize[{13 x^2  + 12 y^2 + 22 z^2, x y +  y z + z x == 1}, {x, y, 

z}]

and got

{Root[-13728 + 47 #1^2 + #1^3 &, 3], {x -> (1 - Root[{-13728 + 47 #1^2 + #1^3 &, 663520 + 13728 #1 - 79 #1^2 - 791648 #2^2 - 145288 #1 #2^2 - 3105 #1^2 #2^2 + 2423278 #2^4 + 66924 #1 #2^4 + 597 #1^2 #2^4 + 679536 #2^6 + 1981 #1 #2^6 + 133908 #2^8 &}, {3, 2}] Root[{-13728 + 47 #1^2 + #1^3 &, 663520 + 13728 #1 - 79 #1^2 - 791648 #2^2 - 145288 #1 #2^2 - 3105 #1^2 #2^2 + 2423278 #2^4 + 66924 #1 #2^4 + 597 #1^2 #2^4 + 679536 #2^6 + 1981 #1 #2^6 + 133908 #2^8 &, 13 - #1 #2^2 + 12 #2^4 - 26 #2 #3 - 2 #1 #2 #3 + 24 #2^3 #3 - #1 #3^2 + 47 #2^2 #3^2 + 44 #2 #3^3 + 22 #3^4 &}, {3, 2, 2}])/(Root[{-13728 + 47 #1^2 + #1^3 &, 663520 + 13728 #1 - 79 #1^2 - 791648 #2^2 - 145288 #1 #2^2 - 3105 #1^2 #2^2 + 2423278 #2^4 + 66924 #1 #2^4 + 597 #1^2 #2^4 + 679536 #2^6 + 1981 #1 #2^6 + 133908 #2^8 &}, {3, 2}] + Root[{-13728 + 47 #1^2 + #1^3 &, 663520 + 13728 #1 - 79 #1^2 - 791648 #2^2 - 145288 #1 #2^2 - 3105 #1^2 #2^2 + 2423278 #2^4 + 66924 #1 #2^4 + 597 #1^2 #2^4 + 679536 #2^6 + 1981 #1 #2^6 + 133908 #2^8 &, 13 - #1 #2^2 + 12 #2^4 - 26 #2 #3 - 2 #1 #2 #3 + 24 #2^3 #3 - #1 #3^2 + 47 #2^2 #3^2 + 44 #2 #3^3 + 22 #3^4 &}, {3, 2, 2}]), y -> Root[{-13728 + 47 #1^2 + #1^3 &, 663520 + 13728 #1 - 79 #1^2 - 791648 #2^2 - 145288 #1 #2^2 - 3105 #1^2 #2^2 + 2423278 #2^4 + 66924 #1 #2^4 + 597 #1^2 #2^4 + 679536 #2^6 + 1981 #1 #2^6 + 133908 #2^8 &}, {3, 2}], z -> Root[{-13728 + 47 #1^2 + #1^3 &, 663520 + 13728 #1 - 79 #1^2 - 791648 #2^2 - 145288 #1 #2^2 - 3105 #1^2 #2^2 + 2423278 #2^4 + 66924 #1 #2^4 + 597 #1^2 #2^4 + 679536 #2^6 + 1981 #1 #2^6 + 133908 #2^8 &, 13 - #1 #2^2 + 12 #2^4 - 26 #2 #3 - 2 #1 #2 #3 + 24 #2^3 #3 - #1 #3^2 + 47 #2^2 #3^2 + 44 #2 #3^3 + 22 #3^4 &}, {3, 2, 2}]}}

If I tried

Clear[x, y, z]
FunctionRange[{13 x^2  + 12 y^2 + 22 z^2, x y +  y z + z x == 1}, {x,y, z}, w]

I got

w >= Root[-13728 + 47 #1^2 + #1^3 &, 3]

How to get the correct answer of this expression with commad Minimize?

$\endgroup$

closed as off-topic by Dr. belisarius, Oleksandr R., MarcoB, m_goldberg, Daniel Lichtblau Dec 14 '15 at 4:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Dr. belisarius, Oleksandr R., MarcoB, m_goldberg, Daniel Lichtblau
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Minimize[{13 x^2 + 12 y^2 + 22 z^2, x y + y z + z x == 1}, {x, y, z}] // N $\endgroup$ – Dr. belisarius Dec 14 '15 at 1:02
  • $\begingroup$ @belisariushassettled Thank you. I tried. Can I get the correc answer? $\endgroup$ – minthao_2011 Dec 14 '15 at 1:03
  • $\begingroup$ If you just need to get a good approximate answer (assuming there is no exact answer), try NMinimize: NMinimize[{13 x^2 + 12 y^2 + 22 z^2, x y + y z + z x == 1}, {x, y, z}] $\endgroup$ – JimB Dec 14 '15 at 1:10
  • 1
    $\begingroup$ It is my understanding that usually when a root object appears, there is no "nice" form (such as a rational number or a multiple of $\pi$, etc.). The following post might help: mathematica.stackexchange.com/questions/13767/… $\endgroup$ – JimB Dec 14 '15 at 1:47
  • 2
    $\begingroup$ @JimBaldwin that is OP's own question. I am not sure why the answer did not sink in, but I cannot think of anything better than to recommend a review of the documentation. As such, I vote to close. $\endgroup$ – Oleksandr R. Dec 14 '15 at 1:56
5
$\begingroup$
min = Minimize[{13 x^2 + 12 y^2 + 22 z^2, x y + y z + z x == 1}, {x, y, z}];

The Root expressions are the exact solutions. Use N to convert the Root expressions to their approximate numeric equivalent. You can specify any arbitrary precision using the second argument to N.

min // N

(*  {14.893, {x -> -0.635532, y -> -0.668213, z -> -0.441289}}  *)

This is consistent with the FunctionRange

FunctionRange[{13 x^2 + 12 y^2 + 22 z^2, x y + y z + z x == 1}, {x, y, z}, 
  w] // N

(*  w >= 14.893  *)

Alternatively, using the constraint to remove one variable and again using N to convert the Root expressions to their approximate numeric equivalent.

Minimize[13 x^2 + 12 y^2 + 22 z^2 /. Solve[x y + y z + z x == 1, z], {x, y}] //
  N

(*  {14.893, {x -> -0.635532, y -> -0.668213}}  *)
$\endgroup$
  • $\begingroup$ Well, let me just add that the "numeric equivalent" is not really equivalent. The Root object represents the solution at infinite precision; the numeric value is just an approximation to it. $\endgroup$ – Oleksandr R. Dec 14 '15 at 1:58
  • $\begingroup$ @OleksandrR. - agree. I tried to clarify above. $\endgroup$ – Bob Hanlon Dec 14 '15 at 2:05
5
$\begingroup$

If you only want the minimum value, MinValue would be adequate.

MinValue[{13 x^2 + 12 y^2 + 22 z^2, x y + y z + z x == 1}, {x, y, z}]

(*  Root[-13728 + 47 #1^2 + #1^3 &, 3] *)

If you want to use Minimize:

Minimize[{13 x^2 + 12 y^2 + 22 z^2, x y + y z + z x == 1}, {x, y, z}][[1]]

(*  Root[-13728 + 47 #1^2 + #1^3 &, 3] *)

If you want the exact value and not the Root object:

ToRadicals @ Root[-13728 + 47 #1^2 + #1^3 &, 3]

(* 1/3 (-47 + 2209/(81505 + 36 I Sqrt[3191474])^(1/3)
 + (81505 + 36 I Sqrt[3191474])^(1/3)) *)

(This works because the equation in the Root object is a cubic equation; it may not work for high-order polynomials)

Note that this expression contains imaginary terms but is a real number (Casus Irreducibilis).

$\endgroup$

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