TransWikia.com

FunctionRange, MinValue and MaxValue unable to give result

Mathematica Asked on September 4, 2021

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?

2 Answers

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)$.

Answered by user64494 on September 4, 2021

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]

enter image description here

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 *)

Answered by Bob Hanlon on September 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP