Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

We can adapt Sjoerd'sSjoerd's solution to the question, Table - find index of the maximum elementTable - find index of the maximum element. Other methods may be found here: List manipulation: position & max value combinationList manipulation: position & max value combination.

tt1 = Flatten[
   Table[Thread@{x, y, z /. Solve[z^2 == x^2 y - z, z, Method -> Reduce]},
    {x, 0, 5, 1}, {y, 0, 5, 1}],
   2];

Then this yields {x, y, max}:

tt1 ~Part~ Last @ Ordering @ tt1[[All, 3]]
(*
  {5, 5, 1/2 (-1 + Sqrt[501])}
*)

We can adapt Sjoerd's solution to the question, Table - find index of the maximum element. Other methods may be found here: List manipulation: position & max value combination.

tt1 = Flatten[
   Table[Thread@{x, y, z /. Solve[z^2 == x^2 y - z, z, Method -> Reduce]},
    {x, 0, 5, 1}, {y, 0, 5, 1}],
   2];

Then this yields {x, y, max}:

tt1 ~Part~ Last @ Ordering @ tt1[[All, 3]]
(*
  {5, 5, 1/2 (-1 + Sqrt[501])}
*)

We can adapt Sjoerd's solution to the question, Table - find index of the maximum element. Other methods may be found here: List manipulation: position & max value combination.

tt1 = Flatten[
   Table[Thread@{x, y, z /. Solve[z^2 == x^2 y - z, z, Method -> Reduce]},
    {x, 0, 5, 1}, {y, 0, 5, 1}],
   2];

Then this yields {x, y, max}:

tt1 ~Part~ Last @ Ordering @ tt1[[All, 3]]
(*
  {5, 5, 1/2 (-1 + Sqrt[501])}
*)
added link
Source Link
Michael E2
  • 244.7k
  • 18
  • 351
  • 774

We can adapt Sjoerd'sSjoerd's solution to the question, Table - find index of the maximum element. Other methods may be found here: List manipulation: position & max value combination.

tt1 = Flatten[
   Table[Thread@{x, y, z /. Solve[z^2 == x^2 y - z, z, Method -> Reduce]},
    {x, 0, 5, 1}, {y, 0, 5, 1}],
   2];

Then this yields {x, y, max}:

tt1[[Ordering[tt1[[All,tt1 3]]]~Part~ //Last Last]]@ Ordering @ tt1[[All, 3]]
(*
  {5, 5, 1/2 (-1 + Sqrt[501])}
*)

We can adapt Sjoerd's solution to the question, Table - find index of the maximum element. Other methods may be found here: List manipulation: position & max value combination.

tt1 = Flatten[
   Table[Thread@{x, y, z /. Solve[z^2 == x^2 y - z, z, Method -> Reduce]},
    {x, 0, 5, 1}, {y, 0, 5, 1}],
   2];

Then this yields {x, y, max}:

tt1[[Ordering[tt1[[All, 3]]] // Last]]
(*
  {5, 5, 1/2 (-1 + Sqrt[501])}
*)

We can adapt Sjoerd's solution to the question, Table - find index of the maximum element. Other methods may be found here: List manipulation: position & max value combination.

tt1 = Flatten[
   Table[Thread@{x, y, z /. Solve[z^2 == x^2 y - z, z, Method -> Reduce]},
    {x, 0, 5, 1}, {y, 0, 5, 1}],
   2];

Then this yields {x, y, max}:

tt1 ~Part~ Last @ Ordering @ tt1[[All, 3]]
(*
  {5, 5, 1/2 (-1 + Sqrt[501])}
*)
Source Link
Michael E2
  • 244.7k
  • 18
  • 351
  • 774

We can adapt Sjoerd's solution to the question, Table - find index of the maximum element. Other methods may be found here: List manipulation: position & max value combination.

tt1 = Flatten[
   Table[Thread@{x, y, z /. Solve[z^2 == x^2 y - z, z, Method -> Reduce]},
    {x, 0, 5, 1}, {y, 0, 5, 1}],
   2];

Then this yields {x, y, max}:

tt1[[Ordering[tt1[[All, 3]]] // Last]]
(*
  {5, 5, 1/2 (-1 + Sqrt[501])}
*)