# The implementation of FunctionRange

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.

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

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}]

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}}]}]

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$

• 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]. Jun 24, 2016 at 13:07
• @J.M. I am only an amateur and would estimate supplements from you very much, please edit accordingly.
– user9660
Jun 24, 2016 at 13:10
• 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. Jun 24, 2016 at 13:13
• @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!
– user9660
Jun 24, 2016 at 13:18
• 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.
– pwl
Jun 24, 2016 at 16:02