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 want to ask a question about Reduce. I have a function, say f[x]. When I use the command Reduce[f[x] > 0, {x}], it gives me an interval for x. But, I don't want to have an interval. I want to have an upper bound for x.

For example: After the command Reduce[f[x] > 0, {x}], the output is a_1 < x < a_2. But I want to have only a_2. How can I get it?

share|improve this question
    
Make sure you use the correct "brackets", i.e. f(x) vs. f[x] –  Pinguin Dirk Apr 14 '13 at 11:46
    
@ Pinguin Dirk, you are right. i refit it. –  MATIRMAK Apr 14 '13 at 11:48
    
A direct answer would depend on the details of your f; for the example you made try Part[a1 < x < a2, -1]. –  b.gatessucks Apr 14 '13 at 11:48
    
E.g. Reduce[27 > x^3 > 8, x] // Last yields 3. –  Artes Apr 14 '13 at 12:30
    
Sometimes there just isn't an upperbound for x. Take for instance x^2-1>0. –  Sjoerd C. de Vries Apr 14 '13 at 12:33
show 1 more comment

1 Answer

I'll assume that the question is simply how to take an inequality such as

interv = a1 < x < a2

and extract the upper limit from it. This could work:

Simplify[Max[List @@ interv], interv]

(* ==> a2 *)
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.