# How can I find the range of my function

I am trying to find the range of (3 Sin[x] - 3)/(2 Cos[x] + 10), I tried this,

Function[x, (3 Sin[x] - 3)/(2 Cos[x] + 10)]@ Interval[{-Infinity, Infinity}]


Mathematica returned Interval[{-(3/4), 0}], but WolframAlpha returned -5/8 <= y <= 0. I'm sure Wolfram | Alpha is right What's wrong with my Mathematica code?

-
–  Artes Jun 29 '13 at 13:56
-3/4 is less than -5/8, so both are right. Intervals are by no means guaranteed to be tight bounds. –  Oleksandr R. Jul 11 '13 at 19:30

Your computation effectively yields the following:

(3 Interval[{-1, 1}] - 3)/(2 Interval[{-1, 1}] + 10)
(* Out: Interval[{-3/4, 0}] *)


The WolframAlpha code effectively computes the minimum and maximum of the function; it's more like so:

Minimize[(3 Sin[x] - 3)/(2 Cos[x] + 10), x] // Simplify
(* Out: {-5/8, {x -> 2*(Pi - ArcTan[3/2])}} *)

-
+ See under possible issues : "Intervals are always assumed independent" –  george2079 Jul 11 '13 at 13:09

I found Reduce is useful,

Reduce[y == (3 Sin[x] - 3)/(2 Cos[x] + 10), y, {x}, Reals]
% // Simplify

(* -(5/8) <= y <= 0 *)

-