Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
    
-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
add comment

2 Answers

up vote 5 down vote accepted

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])}} *)
share|improve this answer
    
+ See under possible issues : "Intervals are always assumed independent" –  george2079 Jul 11 '13 at 13:09
add comment

I found Reduce is useful,

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

(* -(5/8) <= y <= 0 *)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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