4
$\begingroup$

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?

$\endgroup$
5
$\begingroup$

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])}} *)
$\endgroup$
  • $\begingroup$ + See under possible issues : "Intervals are always assumed independent" $\endgroup$ – george2079 Jul 11 '13 at 13:09
2
$\begingroup$

I found Reduce is useful,

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

(* -(5/8) <= y <= 0 *)
$\endgroup$

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.