5
$\begingroup$

How exactly does the FunctionRange work? What kind of algorithm does it use? I looked it up in the manual but it doesn't provide any references or even a name of the algorithm.

It also accepts a Method parameter but the only acceptable value according to the manual is Method -> {"Reduced" -> True}.

EDIT: To clarify I mean the exact internal implementation.

$\endgroup$
2
  • 2
    $\begingroup$ Looks like this is a question only Wolfram employees can answer. $\endgroup$
    – Jens
    Jun 24 '16 at 16:03
  • $\begingroup$ I was hoping they hang around here now and then. $\endgroup$
    – pwl
    Jun 25 '16 at 0:42
2
$\begingroup$

I think the OP asked from a algebraic resp. beginners point of view as of calculus, so is my answer:

It assume it is looking for Discriminant,

fr = FunctionRange[x/(1 + x^2), x, y]

$-\frac{1}{2}\leq y\leq \frac{1}{2}$

fr[[1]]; fr[[5]];
fr == x/(1 + x^2)

$\left(-\frac{1}{2}\leq y\leq \frac{1}{2}\right)=\frac{x}{x^2+1}$

Plot[{x/(1 + x^2), fr[[1]], fr[[5]]}, {x, -2, 2}]

enter image description here

Solve[x/(1 + x^2) == fr[[1]], x]

{{x->-1},{x->-1}}

Solve[x/(1 + x^2) == fr[[5]], x]

{{x -> 1}, {x -> 1}}

Plot[{x/(1 + x^2), fr[[1]], fr[[5]]}, {x, -2, 2}, 
Epilog -> {Red, PointSize[Large], Point[{{-1, -1/2}, {1, 1/2}}]}]

enter image description here

x == y*(1 + x^2)

$x=\left(x^2+1\right) y$

Expand[%]

$x=x^2 y+y$

Solve[%, x]

$\left\{\left\{x\to \frac{1-\sqrt{1-4 y^2}}{2 y}\right\},\left\{x\to \frac{\sqrt{1-4 y^2}+1}{2 y}\right\}\right\}$

$\mathrm{Because, for\:a\:quadratic\:equation\:of\:the\:form\:}ax^2+bx+c=0\mathrm{\:the\:discriminant\:is\:}b^2-4ac$

$\endgroup$
6
  • $\begingroup$ OTOH, this is certainly not the complete story, I think. FunctionRange[ArcTan[x], x, y] and FunctionRange[Sin[x], x, y] are easily done, and FunctionRange[LogisticSigmoid[x], x, y] does not work without assistance: FunctionRange[LogisticSigmoid[x] // FunctionExpand, x, y]. $\endgroup$ Jun 24 '16 at 13:07
  • $\begingroup$ @J.M. I am only an amateur and would estimate supplements from you very much, please edit accordingly. $\endgroup$
    – user9660
    Jun 24 '16 at 13:10
  • $\begingroup$ Unfortunately, I know about as much as you with respect to the internal details, so don't sell yourself short! My humble point was that what you propose might be the likely story for algebraic functions, but I am sure this is not what is done in the transcendental case. $\endgroup$ Jun 24 '16 at 13:13
  • 1
    $\begingroup$ @J.M. I think the OP asked from a algebraic resp. beginners point of view as of calculus, so was my answer. However, I estimate your opinion and your contributions exceptionally, it is sometimes even witty and always helpfully. Cheers and keep on good Coding! $\endgroup$
    – user9660
    Jun 24 '16 at 13:18
  • $\begingroup$ I certainly mean the internals of Mathematica, not the algebraic method. Say you write a proof and want to use this function to estimate something, how reliable is the estimate? I imagine that with Mathematica being closed source these things are hard to determine but it's always worth a shot to ask. $\endgroup$
    – pwl
    Jun 24 '16 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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