# FunctionRange, MinValue and MaxValue unable to give result

I have the following function for which I want to know the range

FunctionRange[{1/
32 (8 - Sqrt[(-8 - 36 Abs[y] (1 + 2 Sqrt[Abs[z]]) -
27 (Abs[y] + 2 Abs[y] Sqrt[Abs[z]])^2)^2 -
64 (1 + Abs[y] + 2 Abs[y] Sqrt[Abs[z]])] +
36 Abs[y] (1 + 2 Sqrt[Abs[z]]) +
27 (Abs[y] + 2 Abs[y] Sqrt[Abs[z]])^2),
0 < Abs[y] < 1 && 0 < Abs[z] < 1}, {Abs[y], Abs[z]}, t]


But once the code starts it just keeps on running with no output. I tried to use MaxValue and MinValue too so as to get the Range but that too doesn't seem to work. Is there any other way to find the range when the above options don't work?

This can be done by the change Abs[y] -> a^2, Abs[z] -> b^2 in order to obtain a polynomial in a and b as follows.

Maximize[{1/
32 (8 - Sqrt[(-8 - 36 Abs[y] (1 + 2 Sqrt[Abs[z]]) -
27 (Abs[y] + 2 Abs[y] Sqrt[Abs[z]])^2)^2 -
64 (1 + Abs[y] + 2 Abs[y] Sqrt[Abs[z]])] +
36 Abs[y] (1 + 2 Sqrt[Abs[z]]) +  27 (Abs[y] + 2 Abs[y] Sqrt[Abs[z]])^2),
0 < Abs[y] < 1 && 0 < Abs[z] < 1 && Sqrt[Abs[y]] > 0 &&
Sqrt[Abs[z]] > 0} /.{Sqrt[Abs[y]]-> a,Sqrt[Abs[z]] -> b,Abs[y]->a^2,Abs[z] -> b^2}, {a, b}]
(*{1/4, {a -> 0, b -> Indeterminate}}*)


and the warning (not an error)

Maximize::natt: The maximum is not attained at any point satisfying the given constraints.

The result means that b may be an arbitrary value (of course, 0<b&&b<1. Making use of Minimize instead of Maximize, one obtains

(*{1/32 (359 - 35 Sqrt[105]), {a -> 1, b -> 1}}*)


and a similar warning. It remains to notice that the polynomial, being a continuous function, takes each value between its minimum value and maximum value on a (compact) set a>=0&&a<=1&&b>=0&&b<=1. Numeric calculations with NMaximize and NMinimize with Method->"DifferentialEvolutionconfirm those results. Summarizing the above, one may conclude that the range under consideration is $$(\frac{1}{32} \left(359-35 \sqrt{105}\right),\frac 1 4)$$.

• I followed the similar idea as you, and then used FunctionRange as normal and it worked like a charm,thanks. Jul 26 '20 at 15:33
• @tany pathak: Indeed, FunctionRange[{1/ 32 (8 + 36 a^2 (1 + 2 b) + 27 (a^2 + 2 a^2 b)^2 - \[Sqrt](-64 (1 + a^2 + 2 a^2 b) + (-8 - 36 a^2 (1 + 2 b) - 27 (a^2 + 2 a^2 b)^2)^2)), a > 0 && b > 0 && a < 1 && b < 1}, {a, b}, y] performs $\frac 1{32} (359 - 35 \sqrt{105} < y < 1/4$. Thank you for another realization of my idea. Jul 26 '20 at 16:45
expr = 1/32 (8 -
Sqrt[(-8 - 36 Abs[y] (1 + 2 Sqrt[Abs[z]]) -
27 (Abs[y] + 2 Abs[y] Sqrt[Abs[z]])^2)^2 -
64 (1 + Abs[y] + 2 Abs[y] Sqrt[Abs[z]])] +
36 Abs[y] (1 + 2 Sqrt[Abs[z]]) +
27 (Abs[y] + 2 Abs[y] Sqrt[Abs[z]])^2);


Looking at the plot,

Plot3D[expr, {y, -1, 1}, {z, -1, 1},
PlotPoints -> 100,
MaxRecursion -> 5,
ClippingStyle -> None,
AxesLabel -> (Style[#, 14, Bold] & /@ {y, z, t}),
WorkingPrecision -> 20,
PlotRange -> All]


max = expr /. y -> 0

(* 1/4 *)

min = Min[
Limit[expr, #] & /@ {{y -> -1, z -> -1}, {y -> -1, z -> 1}, {y -> 1,
z -> -1}, {y -> 1, z -> 1}}]

(* 1/32 (359 - 35 Sqrt[105]) *)

min // N

(* 0.0111476 *)

• One of the gaps in your answer is that in Limit[expr, #] & /@ {{y -> -1, z -> -1}, {y -> -1, z -> 1}, {y -> 1, z -> -1}, {y -> 1, z -> 1}}] you don't take into account 0 < Abs[y] < 1 && 0 < Abs[z] < 1. There are several other places built on the sand. Jul 26 '20 at 13:04