2 added 56 characters in body
source | link

Too long for a comment but... For your specific setup this can be a way with a v10 function:

tt1 = Table[Solve[z^2 == x^2 y - z, z, Method -> Reduce], {x, 0, 5, 1}, {y, 0, 5, 1}]
With[{v = z /. tt1}, With[{m = Max[v]}, {m, Most@FirstPosition[v, Max[v]]m]}]]]

But... whyWhy don't you solesolve analitically the problem? The command

z /. Solve[z^2 == x^2 y - z, z]

gives

{1/2 (-1 - Sqrt[1 + 4 x^2 y]), 1/2 (-1 + Sqrt[1 + 4 x^2 y])}

so it's not surprising what and where is the maximum is located at lower-right corner of the matrix, becausewhere $x=y=5$, and here

%[[2]] /. {x -> 5, y -> 5}

gives:

1/2 (-1 + Sqrt[501])

Too long for a comment but... For your specific setup this can be a way

tt1 = Table[Solve[z^2 == x^2 y - z, z, Method -> Reduce], {x, 0, 5, 1}, {y, 0, 5, 1}]
With[{v = z /. tt1}, {Max[v], Most@FirstPosition[v, Max[v]]}]

But... why don't you sole analitically the problem? The command

z /. Solve[z^2 == x^2 y - z, z]

gives

{1/2 (-1 - Sqrt[1 + 4 x^2 y]), 1/2 (-1 + Sqrt[1 + 4 x^2 y])}

so it's not surprising what and where is the maximum, because

%[[2]] /. {x -> 5, y -> 5}

gives:

1/2 (-1 + Sqrt[501])

Too long for a comment but... For your specific setup this can be a way with a v10 function:

tt1 = Table[Solve[z^2 == x^2 y - z, z, Method -> Reduce], {x, 0, 5, 1}, {y, 0, 5, 1}]
With[{v = z /. tt1}, With[{m = Max[v]}, {m, Most@FirstPosition[v, m]}]]

But... Why don't you solve analitically the problem? The command

z /. Solve[z^2 == x^2 y - z, z]

gives

{1/2 (-1 - Sqrt[1 + 4 x^2 y]), 1/2 (-1 + Sqrt[1 + 4 x^2 y])}

so it's not surprising the maximum is located at lower-right corner of the matrix, where $x=y=5$, and here

%[[2]] /. {x -> 5, y -> 5}

gives:

1/2 (-1 + Sqrt[501])
1
source | link

Too long for a comment but... For your specific setup this can be a way

tt1 = Table[Solve[z^2 == x^2 y - z, z, Method -> Reduce], {x, 0, 5, 1}, {y, 0, 5, 1}]
With[{v = z /. tt1}, {Max[v], Most@FirstPosition[v, Max[v]]}]

But... why don't you sole analitically the problem? The command

z /. Solve[z^2 == x^2 y - z, z]

gives

{1/2 (-1 - Sqrt[1 + 4 x^2 y]), 1/2 (-1 + Sqrt[1 + 4 x^2 y])}

so it's not surprising what and where is the maximum, because

%[[2]] /. {x -> 5, y -> 5}

gives:

1/2 (-1 + Sqrt[501])